]> git.baikalelectronics.ru Git - kernel.git/commit
netdevsim: fib: Add debugfs to debug route offload failure
authorAmit Cohen <amcohen@nvidia.com>
Sun, 7 Feb 2021 08:22:56 +0000 (10:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Feb 2021 00:47:03 +0000 (16:47 -0800)
commit2328eeaf8ce5dae7044003eefdedd2d25fdc3539
tree0a76789731ac3ffedb83a8a3418ce98124944a6f
parent119f2079fc9e7dd845197024911a77a0fd62091b
netdevsim: fib: Add debugfs to debug route offload failure

Add "fail_route_offload" flag to disallow offloading routes.
It is needed to test "offload failed" notifications.

Create the flag as part of nsim_fib_create() under fib directory and set
it to false by default.

When FIB_EVENT_ENTRY_{REPLACE, APPEND} are triggered and
"fail_route_offload" value is true, set the appropriate hardware flag to
make the kernel emit RTM_NEWROUTE notification with RTM_F_OFFLOAD_FAILED
flag.

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>
drivers/net/netdevsim/fib.c