]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests: mlxsw: Test unresolved neigh trap with resilient nexthop groups
authorIdo Schimmel <idosch@nvidia.com>
Wed, 24 Mar 2021 20:14:23 +0000 (22:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Mar 2021 23:34:58 +0000 (16:34 -0700)
commit861584724c44e63bfb684090c70ade660dae6c69
tree69c1d2967183e1e167480054ba9825a44fab6fbd
parent03490a8239156933366f5595250fe3dc5d0e18aa
selftests: mlxsw: Test unresolved neigh trap with resilient nexthop groups

The number of nexthop buckets in a resilient nexthop group never
changes, so when the gateway address of a nexthop cannot be resolved,
the nexthop buckets are programmed to trap packets to the CPU in order
to trigger resolution. For example:

 # ip nexthop add id 1 via 198.51.100.1 dev swp3
 # ip nexthop add id 10 group 1 type resilient buckets 32
 # ip nexthop bucket get id 10 index 0
 id 10 index 0 idle_time 1.44 nhid 1 trap

Where 198.51.100.1 is a made-up IP.

Test that in this case packets are indeed trapped to the CPU via the
unresolved neigh trap.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l3_exceptions.sh