Message ID | 20210408133829.2135103-8-petrm@nvidia.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | tc: Introduce a trap-and-forward action | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 2 maintainers not CCed: linux-kselftest@vger.kernel.org shuah@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | warning | WARNING: line length of 81 exceeds 80 columns |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
diff --git a/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_control.sh b/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_control.sh index a37273473c1b..8bca4c58819b 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_control.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_control.sh @@ -83,6 +83,7 @@ ALL_TESTS=" ptp_general_test flow_action_sample_test flow_action_trap_test + flow_action_trap_fwd_test " NUM_NETIFS=4 source $lib_dir/lib.sh @@ -663,14 +664,18 @@ flow_action_sample_test() tc qdisc del dev $rp1 clsact } -flow_action_trap_test() +__flow_action_trap_test() { + local action=$1; shift + local trap=$1; shift + local description=$1; shift + # Install a filter that traps a specific flow. tc qdisc add dev $rp1 clsact tc filter add dev $rp1 ingress proto ip pref 1 handle 101 flower \ - skip_sw ip_proto udp src_port 12345 dst_port 54321 action trap + skip_sw ip_proto udp src_port 12345 dst_port 54321 action $action - devlink_trap_stats_test "Flow Trapping (Logging)" "flow_action_trap" \ + devlink_trap_stats_test "$description" $trap \ $MZ $h1 -c 1 -a own -b $(mac_get $rp1) \ -A 192.0.2.1 -B 198.51.100.1 -t udp sp=12345,dp=54321 -p 100 -q @@ -678,6 +683,18 @@ flow_action_trap_test() tc qdisc del dev $rp1 clsact } +flow_action_trap_test() +{ + __flow_action_trap_test trap flow_action_trap \ + "Flow Trapping (Logging)" +} + +flow_action_trap_fwd_test() +{ + __flow_action_trap_test trap_fwd flow_action_trap_fwd \ + "Flow Trap-and-forwarding (Logging)" +} + trap cleanup EXIT setup_prepare