OSDN Git Service

netdevsim: fib: Add dummy implementation for FIB offload
authorIdo Schimmel <idosch@mellanox.com>
Tue, 14 Jan 2020 11:23:15 +0000 (13:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jan 2020 02:53:35 +0000 (18:53 -0800)
commit48bb9eb47b2708bd3ded16684ddd258e53bd402c
tree2d81eb8e88dec69d155f2e8235cb7ba072c21c52
parentee5a0448e72b0857260e04f68126b2bfa27c154e
netdevsim: fib: Add dummy implementation for FIB offload

Implement dummy IPv4 and IPv6 FIB "offload" in the driver by storing
currently "programmed" routes in a hash table. Each route in the hash
table is marked with "trap" indication. The indication is cleared when
the route is replaced or when the netdevsim instance is deleted.

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

v2:
* Convert to new fib_alias_hw_flags_set() interface

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/Kconfig
drivers/net/netdevsim/fib.c