netdevsim: Add dummy implementation for nexthop offload
authorIdo Schimmel <idosch@nvidia.com>
Wed, 4 Nov 2020 13:30:38 +0000 (15:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Nov 2020 19:28:50 +0000 (11:28 -0800)
commit8fa84742d66625281a14b5db4c1f64f06c5b106a
tree3dcd5dc6509f6bb5b79711eb061048a423284ef4
parent35266255d61c777abd69c2faaa44c92b5a0483c2
netdevsim: Add dummy implementation for nexthop offload

Implement dummy nexthop "offload" in the driver by storing currently
"programmed" nexthops in a hash table. Each nexthop in the hash table is
marked with "trap" indication and increments the nexthops resource
occupancy.

This will later allow us to test the nexthop offload API on top of
netdevsim.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/netdevsim/fib.c