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
 
        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
 
        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
 
                        goto nla_put_failure;
                if (nexthop_is_blackhole(fi->nh))
                        rtm->rtm_type = RTN_BLACKHOLE;
+               if (!fi->fib_net->ipv4.sysctl_nexthop_compat_mode)
+                       goto offload;
        }
 
        if (nhs == 1) {
                        goto nla_put_failure;
        }
 
+offload:
        if (fri->offload)
                rtm->rtm_flags |= RTM_F_OFFLOAD;
        if (fri->trap)
 
        list_for_each_entry_safe(f6i, tmp, &nh->f6i_list, nh_list) {
                /* __ip6_del_rt does a release, so do a hold here */
                fib6_info_hold(f6i);
-               ipv6_stub->ip6_del_rt(net, f6i, false);
+               ipv6_stub->ip6_del_rt(net, f6i,
+                                     !net->ipv4.sysctl_nexthop_compat_mode);
        }
 }
 
        if (!rc) {
                nh_base_seq_inc(net);
                nexthop_notify(RTM_NEWNEXTHOP, new_nh, &cfg->nlinfo);
-               if (replace_notify)
+               if (replace_notify && net->ipv4.sysctl_nexthop_compat_mode)
                        nexthop_replace_notify(net, new_nh, &cfg->nlinfo);
        }
 
 
                .mode           = 0644,
                .proc_handler   = proc_tcp_early_demux
        },
+       {
+               .procname       = "nexthop_compat_mode",
+               .data           = &init_net.ipv4.sysctl_nexthop_compat_mode,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
+       },
        {
                .procname       = "ip_default_ttl",
                .data           = &init_net.ipv4.sysctl_ip_default_ttl,
 
                if (nexthop_is_blackhole(rt->nh))
                        rtm->rtm_type = RTN_BLACKHOLE;
 
-               if (rt6_fill_node_nexthop(skb, rt->nh, &nh_flags) < 0)
+               if (net->ipv4.sysctl_nexthop_compat_mode &&
+                   rt6_fill_node_nexthop(skb, rt->nh, &nh_flags) < 0)
                        goto nla_put_failure;
 
                rtm->rtm_flags |= nh_flags;