Commit 3e455b7d authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'nexthop-API-sysctl'



Roopa Prabhu says:

====================
New sysctl to turn off nexthop API compat mode

Currently route nexthop API maintains user space compatibility
with old route API by default. Dumps and netlink notifications
support both new and old API format. In systems which have
moved to the new API, this compatibility mode cancels some
of the performance benefits provided by the new nexthop API.

This patch adds new sysctl nexthop_compat_mode which is on
by default but provides the ability to turn off compatibility
mode allowing systems to run entirely with the new routing
API if they wish to. Old route API behaviour and support is
not modified by this sysctl

v4:
	- Use davids note for Documenting the sysctl
	- test with latest iproute2 and adjust 'pref'

v3:
	- Document new sysctl
	- move sysctl to use proc_dointvec_minmax with 0 and 1 values
	- selftest: remove pref medium in ipv6 test

v2:
       - Incorporate David Aherns pointers on covering dumps and
         nexthop deletes. Also use one ipv4 sysctl to cover
         both ipv4 and ipv6 (I see it is done that way for many
         others)
       - Added a selftest to cover dump and notfications for nexthop
	 api compat mode
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2ac757e4 4dddb5be
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1560,6 +1560,18 @@ skip_notify_on_dev_down - BOOLEAN
	on userspace caches to track link events and evict routes.
	Default: false (generate message)

nexthop_compat_mode - BOOLEAN
	New nexthop API provides a means for managing nexthops independent of
	prefixes. Backwards compatibilty with old route format is enabled by
	default which means route dumps and notifications contain the new
	nexthop attribute but also the full, expanded nexthop definition.
	Further, updates or deletes of a nexthop configuration generate route
	notifications for each fib entry using the nexthop. Once a system
	understands the new API, this sysctl can be disabled to achieve full
	performance benefits of the new API by disabling the nexthop expansion
	and extraneous notifications.
	Default: true (backward compat mode)

IPv6 Fragmentation:

ip6frag_high_thresh - INTEGER
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg);
int ip6_route_add(struct fib6_config *cfg, gfp_t gfp_flags,
		  struct netlink_ext_ack *extack);
int ip6_ins_rt(struct net *net, struct fib6_info *f6i);
int ip6_del_rt(struct net *net, struct fib6_info *f6i);
int ip6_del_rt(struct net *net, struct fib6_info *f6i, bool skip_notify);

void rt6_flush_exceptions(struct fib6_info *f6i);
void rt6_age_exceptions(struct fib6_info *f6i, struct fib6_gc_args *gc_args,
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ struct ipv6_stub {
			    struct netlink_ext_ack *extack);
	void (*fib6_nh_release)(struct fib6_nh *fib6_nh);
	void (*fib6_update_sernum)(struct net *net, struct fib6_info *rt);
	int (*ip6_del_rt)(struct net *net, struct fib6_info *rt);
	int (*ip6_del_rt)(struct net *net, struct fib6_info *rt, bool skip_notify);
	void (*fib6_rt_update)(struct net *net, struct fib6_info *rt,
			       struct nl_info *info);

+2 −0
Original line number Diff line number Diff line
@@ -111,6 +111,8 @@ struct netns_ipv4 {
	int sysctl_tcp_early_demux;
	int sysctl_udp_early_demux;

	int sysctl_nexthop_compat_mode;

	int sysctl_fwmark_reflect;
	int sysctl_tcp_fwmark_accept;
#ifdef CONFIG_NET_L3_MASTER_DEV
+1 −0
Original line number Diff line number Diff line
@@ -1835,6 +1835,7 @@ static __net_init int inet_init_net(struct net *net)
	net->ipv4.sysctl_ip_early_demux = 1;
	net->ipv4.sysctl_udp_early_demux = 1;
	net->ipv4.sysctl_tcp_early_demux = 1;
	net->ipv4.sysctl_nexthop_compat_mode = 1;
#ifdef CONFIG_SYSCTL
	net->ipv4.sysctl_ip_prot_sock = PROT_SOCK;
#endif
Loading