linux/drivers/net/netdevsim
Amit Cohen 36c5100e85 IPv4: Add "offload failed" indication to routes
After installing a route to the kernel, user space receives an
acknowledgment, which means the route was installed in the kernel, but not
necessarily in hardware.

The asynchronous nature of route installation in hardware can lead to a
routing daemon advertising a route before it was actually installed in
hardware. This can result in packet loss or mis-routed packets until the
route is installed in hardware.

To avoid such cases, previous patch set added the ability to emit
RTM_NEWROUTE notifications whenever RTM_F_OFFLOAD/RTM_F_TRAP flags
are changed, this behavior is controlled by sysctl.

With the above mentioned behavior, it is possible to know from user-space
if the route was offloaded, but if the offload fails there is no indication
to user-space. Following a failure, a routing daemon will wait indefinitely
for a notification that will never come.

This patch adds an "offload_failed" indication to IPv4 routes, so that
users will have better visibility into the offload process.

'struct fib_alias', and 'struct fib_rt_info' are extended with new field
that indicates if route offload failed. Note that the new field is added
using unused bit and therefore there is no need to increase structs size.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-02-08 16:47:03 -08:00
..
bpf.c netdevsim: Add debugfs toggle to reject BPF programs in verifier 2020-12-09 16:27:42 +01:00
bus.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dev.c devlink: move flash end and begin to core devlink 2020-11-19 21:41:02 -08:00
ethtool.c netdevsim: support ethtool ring and coalesce settings 2020-11-20 12:51:54 -08:00
fib.c IPv4: Add "offload failed" indication to routes 2021-02-08 16:47:03 -08:00
health.c netdevsim: set .owner to THIS_MODULE 2020-11-17 14:08:59 -08:00
ipsec.c net: netdevsim: Use scnprintf() for avoiding potential buffer overflow 2020-03-15 17:06:22 -07:00
Makefile netdevsim: add pause frame stats 2020-09-15 13:26:28 -07:00
netdev.c net: remove ndo_udp_tunnel_* callbacks 2021-01-07 12:53:29 -08:00
netdevsim.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
udp_tunnels.c netdevsim: set .owner to THIS_MODULE 2020-11-17 14:08:59 -08:00