2 # SPDX-License-Identifier: GPL-2.0
4 # This test is for checking the FIB offload API on top of mlxsw.
6 lib_dir=$(dirname $0)/../../../net/forwarding
23 ipv6_replace_multipath
24 ipv6_append_multipath_to_single
31 source $lib_dir/lib.sh
32 source $lib_dir/devlink_lib.sh
33 source $lib_dir/fib_offload_lib.sh
35 ipv4_identical_routes()
37 fib_ipv4_identical_routes_test "testns1"
42 fib_ipv4_tos_test "testns1"
47 fib_ipv4_metric_test "testns1"
52 fib_ipv4_replace_test "testns1"
57 fib_ipv4_delete_test "testns1"
62 fib_ipv4_plen_test "testns1"
67 fib_ipv4_replay_metric_test "testns1" "$DEVLINK_DEV"
72 fib_ipv4_replay_tos_test "testns1" "$DEVLINK_DEV"
77 fib_ipv4_replay_plen_test "testns1" "$DEVLINK_DEV"
89 fib_ipv4_flush_test "testns1"
94 fib_ipv6_add_test "testns1"
99 fib_ipv6_metric_test "testns1"
104 fib_ipv6_append_single_test "testns1"
107 ipv6_replace_single()
109 fib_ipv6_replace_single_test "testns1"
112 ipv6_metric_multipath()
114 fib_ipv6_metric_multipath_test "testns1"
117 ipv6_append_multipath()
119 fib_ipv6_append_multipath_test "testns1"
122 ipv6_replace_multipath()
124 fib_ipv6_replace_multipath_test "testns1"
127 ipv6_append_multipath_to_single()
129 fib_ipv6_append_multipath_to_single_test "testns1"
134 fib_ipv6_delete_single_test "testns1"
137 ipv6_delete_multipath()
139 fib_ipv6_delete_multipath_test "testns1"
144 fib_ipv6_replay_single_test "testns1" "$DEVLINK_DEV"
147 ipv6_replay_multipath()
149 fib_ipv6_replay_multipath_test "testns1" "$DEVLINK_DEV"
155 if [ $? -ne 0 ]; then
156 echo "Failed to add netns \"testns1\""
160 devlink dev reload $DEVLINK_DEV netns testns1
161 if [ $? -ne 0 ]; then
162 echo "Failed to reload into netns \"testns1\""
170 devlink -N testns1 dev reload $DEVLINK_DEV netns $$