Skip to content

Commit

Permalink
selftests: fib_nexthops: Test cleanup of FDB entries following nextho…
Browse files Browse the repository at this point in the history
…p deletion

Commit c7cdbe2 ("vxlan: support for nexthop notifiers") registered
a listener in the VXLAN driver to the nexthop notification chain. Its
purpose is to cleanup FDB entries that use a nexthop that is being
deleted.

Test that such FDB entries are removed when the nexthop group that they
use is deleted. Test that entries are not deleted when a single nexthop
in the group is deleted.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ido Schimmel authored and David S. Miller committed Sep 15, 2020
1 parent 0695564 commit 7a5e9d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/testing/selftests/net/fib_nexthops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,16 @@ ipv6_fdb_grp_fcnal()
run_cmd "$IP -6 ro add 2001:db8:101::1/128 nhid 103"
log_test $? 2 "Route add with fdb nexthop group"

run_cmd "$IP nexthop del id 61"
run_cmd "$BRIDGE fdb get to 02:02:00:00:00:13 dev vx10 self"
log_test $? 0 "Fdb entry after deleting a single nexthop"

run_cmd "$IP nexthop del id 102"
log_test $? 0 "Fdb nexthop delete"

run_cmd "$BRIDGE fdb get to 02:02:00:00:00:13 dev vx10 self"
log_test $? 254 "Fdb entry after deleting a nexthop group"

$IP link del dev vx10
}

Expand Down Expand Up @@ -484,9 +491,16 @@ ipv4_fdb_grp_fcnal()
run_cmd "$IP ro add 172.16.0.0/22 nhid 103"
log_test $? 2 "Route add with fdb nexthop group"

run_cmd "$IP nexthop del id 12"
run_cmd "$BRIDGE fdb get to 02:02:00:00:00:13 dev vx10 self"
log_test $? 0 "Fdb entry after deleting a single nexthop"

run_cmd "$IP nexthop del id 102"
log_test $? 0 "Fdb nexthop delete"

run_cmd "$BRIDGE fdb get to 02:02:00:00:00:13 dev vx10 self"
log_test $? 254 "Fdb entry after deleting a nexthop group"

$IP link del dev vx10
}

Expand Down

0 comments on commit 7a5e9d8

Please sign in to comment.