From: Ido Schimmel <ido...@nvidia.com> This is a complementary series to the one merged in commit 389cb1ecc86e ("Merge branch 'add-notifications-when-route-hardware-flags-change'").
The previous series added RTM_NEWROUTE notifications to user space whenever a route was successfully installed in hardware or when its state in hardware changed. This allows routing daemons to delay advertisement of routes until they are installed in hardware. However, if route installation failed, a routing daemon will wait indefinitely for a notification that will never come. The aim of this series is to provide a failure notification via a new flag (RTM_F_OFFLOAD_FAILED) in the RTM_NEWROUTE message. Upon such a notification a routing daemon may decide to withdraw the route from the FIB. Series overview: Patch #1 adds the new RTM_F_OFFLOAD_FAILED flag Patches #2-#3 and #4-#5 add failure notifications to IPv4 and IPv6, respectively Patches #6-#8 teach netdevsim to fail route installation via a new knob in debugfs Patch #9 extends mlxsw to mark routes with the new flag Patch #10 adds test cases for the new notification over netdevsim Amit Cohen (9): rtnetlink: Add RTM_F_OFFLOAD_FAILED flag IPv4: Add "offload failed" indication to routes IPv4: Extend 'fib_notify_on_flag_change' sysctl IPv6: Add "offload failed" indication to routes IPv6: Extend 'fib_notify_on_flag_change' sysctl netdevsim: fib: Do not warn if route was not found for several events netdevsim: fib: Add debugfs to debug route offload failure mlxsw: spectrum_router: Set offload_failed flag selftests: netdevsim: Test route offload failure notifications Ido Schimmel (1): netdevsim: dev: Initialize FIB module after debugfs Documentation/networking/ip-sysctl.rst | 6 +- .../ethernet/mellanox/mlxsw/spectrum_router.c | 58 +++++++- drivers/net/netdevsim/dev.c | 40 +++--- drivers/net/netdevsim/fib.c | 123 +++++++++++++++- include/net/ip6_fib.h | 5 +- include/net/ip_fib.h | 3 +- include/uapi/linux/rtnetlink.h | 5 + net/ipv4/fib_lookup.h | 3 +- net/ipv4/fib_semantics.c | 3 + net/ipv4/fib_trie.c | 13 +- net/ipv4/route.c | 1 + net/ipv4/sysctl_net_ipv4.c | 2 +- net/ipv6/route.c | 14 +- net/ipv6/sysctl_net_ipv6.c | 2 +- .../net/netdevsim/fib_notifications.sh | 134 +++++++++++++++++- 15 files changed, 372 insertions(+), 40 deletions(-) -- 2.29.2