Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: mirror: Drop dual SW/HW testing

The mirroring tests are currently run in a skip_hw and optionally a skip_sw
mode. The former tests the SW datapath, the latter the HW datapath, if
available. In order to be able to test SW datapath on HW loopbacks, traps
are installed on ingress to get traffic from the HW datapath to the SW one.
This adds an unnecessary complexity when it would be much simpler to just
use a veth-based topology to test the SW datapath. Thus drop all the code
that supports this dual testing.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Petr Machata and committed by
David S. Miller
d361d78f a86e0df9

+77 -378
+6 -27
tools/testing/selftests/drivers/net/mlxsw/mirror_gre.sh
··· 118 118 RET=0 119 119 120 120 ip link set dev $tundev type $type ttl inherit 121 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 121 + mirror_install $swp1 ingress $tundev "matchall" 122 122 fail_test_span_gre_dir $tundev 123 123 124 124 ip link set dev $tundev type $type ttl 100 ··· 126 126 quick_test_span_gre_dir $tundev 127 127 mirror_uninstall $swp1 ingress 128 128 129 - log_test "$what: no offload on TTL of inherit ($tcflags)" 129 + log_test "$what: no offload on TTL of inherit" 130 130 } 131 131 132 132 test_span_gre_tos_fixed() ··· 138 138 RET=0 139 139 140 140 ip link set dev $tundev type $type tos 0x10 141 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 141 + mirror_install $swp1 ingress $tundev "matchall" 142 142 fail_test_span_gre_dir $tundev 143 143 144 144 ip link set dev $tundev type $type tos inherit 145 145 quick_test_span_gre_dir $tundev 146 146 mirror_uninstall $swp1 ingress 147 147 148 - log_test "$what: no offload on a fixed TOS ($tcflags)" 148 + log_test "$what: no offload on a fixed TOS" 149 149 } 150 150 151 151 test_span_failable() ··· 156 156 157 157 RET=0 158 158 159 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 159 + mirror_install $swp1 ingress $tundev "matchall" 160 160 if ((should_fail)); then 161 161 fail_test_span_gre_dir $tundev 162 162 else ··· 164 164 fi 165 165 mirror_uninstall $swp1 ingress 166 166 167 - log_test "$what: should_fail=$should_fail ($tcflags)" 167 + log_test "$what: should_fail=$should_fail" 168 168 } 169 169 170 170 test_failable() ··· 173 173 174 174 test_span_failable $should_fail gt6-key "mirror to keyful gretap" 175 175 test_span_failable $should_fail gt6-soft "mirror to gretap w/ soft underlay" 176 - } 177 - 178 - test_sw() 179 - { 180 - slow_path_trap_install $swp1 ingress 181 - slow_path_trap_install $swp1 egress 182 - 183 - test_failable 0 184 - 185 - slow_path_trap_uninstall $swp1 egress 186 - slow_path_trap_uninstall $swp1 ingress 187 176 } 188 177 189 178 test_hw() ··· 191 202 setup_prepare 192 203 setup_wait 193 204 194 - if ! tc_offload_check; then 195 - check_err 1 "Could not test offloaded functionality" 196 - log_test "mlxsw-specific tests for mirror to gretap" 197 - exit 198 - fi 199 - 200 - tcflags="skip_hw" 201 - test_sw 202 - 203 - tcflags="skip_sw" 204 205 test_hw 205 206 206 207 exit $EXIT_STATUS
+2 -16
tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh
··· 79 79 cat >> $MIRROR_GRE_BATCH_FILE <<-EOF 80 80 filter add dev $swp1 ingress pref 1000 \ 81 81 protocol ipv6 \ 82 - flower $tcflags dst_ip $match_dip \ 82 + flower skip_sw dst_ip $match_dip \ 83 83 action mirred egress mirror dev $tun 84 84 EOF 85 85 done ··· 107 107 done 108 108 } 109 109 110 - __mirror_gre_test() 110 + mirror_gre_test() 111 111 { 112 112 local count=$1; shift 113 113 local should_fail=$1; shift ··· 129 129 mirror_test v$h1 $sip $dip $htun 100 10 130 130 icmp6_capture_uninstall $htun 131 131 done 132 - } 133 - 134 - mirror_gre_test() 135 - { 136 - local count=$1; shift 137 - local should_fail=$1; shift 138 - 139 - if ! tc_offload_check $TC_FLOWER_NUM_NETIFS; then 140 - check_err 1 "Could not test offloaded functionality" 141 - return 142 - fi 143 - 144 - tcflags="skip_sw" 145 - __mirror_gre_test $count $should_fail 146 132 } 147 133 148 134 mirror_gre_setup_prepare()
+7 -26
tools/testing/selftests/net/forwarding/mirror_gre.sh
··· 74 74 75 75 RET=0 76 76 77 - mirror_install $swp1 $direction $tundev "matchall $tcflags" 77 + mirror_install $swp1 $direction $tundev "matchall" 78 78 icmp_capture_install h3-${tundev} "src_mac $src_mac dst_mac $dst_mac" 79 79 80 80 mirror_test v$h1 192.0.2.1 192.0.2.2 h3-${tundev} 100 10 ··· 82 82 icmp_capture_uninstall h3-${tundev} 83 83 mirror_uninstall $swp1 $direction 84 84 85 - log_test "$direction $what: envelope MAC ($tcflags)" 85 + log_test "$direction $what: envelope MAC" 86 86 } 87 87 88 88 test_two_spans() 89 89 { 90 90 RET=0 91 91 92 - mirror_install $swp1 ingress gt4 "matchall $tcflags" 93 - mirror_install $swp1 egress gt6 "matchall $tcflags" 92 + mirror_install $swp1 ingress gt4 "matchall" 93 + mirror_install $swp1 egress gt6 "matchall" 94 94 quick_test_span_gre_dir gt4 8 0 95 95 quick_test_span_gre_dir gt6 0 8 96 96 ··· 98 98 fail_test_span_gre_dir gt4 8 0 99 99 quick_test_span_gre_dir gt6 0 8 100 100 101 - mirror_install $swp1 ingress gt4 "matchall $tcflags" 101 + mirror_install $swp1 ingress gt4 "matchall" 102 102 mirror_uninstall $swp1 egress 103 103 quick_test_span_gre_dir gt4 8 0 104 104 fail_test_span_gre_dir gt6 0 8 105 105 106 106 mirror_uninstall $swp1 ingress 107 - log_test "two simultaneously configured mirrors ($tcflags)" 107 + log_test "two simultaneously configured mirrors" 108 108 } 109 109 110 110 test_gretap() ··· 131 131 test_span_gre_mac gt6 egress "mirror to ip6gretap" 132 132 } 133 133 134 - test_all() 135 - { 136 - slow_path_trap_install $swp1 ingress 137 - slow_path_trap_install $swp1 egress 138 - 139 - tests_run 140 - 141 - slow_path_trap_uninstall $swp1 egress 142 - slow_path_trap_uninstall $swp1 ingress 143 - } 144 - 145 134 trap cleanup EXIT 146 135 147 136 setup_prepare 148 137 setup_wait 149 138 150 - tcflags="skip_hw" 151 - test_all 152 - 153 - if ! tc_offload_check; then 154 - echo "WARN: Could not test offloaded functionality" 155 - else 156 - tcflags="skip_sw" 157 - test_all 158 - fi 139 + tests_run 159 140 160 141 exit $EXIT_STATUS
+1 -22
tools/testing/selftests/net/forwarding/mirror_gre_bound.sh
··· 196 196 full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap w/ UL" 197 197 } 198 198 199 - test_all() 200 - { 201 - RET=0 202 - 203 - slow_path_trap_install $swp1 ingress 204 - slow_path_trap_install $swp1 egress 205 - 206 - tests_run 207 - 208 - slow_path_trap_uninstall $swp1 egress 209 - slow_path_trap_uninstall $swp1 ingress 210 - } 211 - 212 199 trap cleanup EXIT 213 200 214 201 setup_prepare 215 202 setup_wait 216 203 217 - tcflags="skip_hw" 218 - test_all 219 - 220 - if ! tc_offload_check; then 221 - echo "WARN: Could not test offloaded functionality" 222 - else 223 - tcflags="skip_sw" 224 - test_all 225 - fi 204 + tests_run 226 205 227 206 exit $EXIT_STATUS
+1 -20
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d.sh
··· 108 108 full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap" 109 109 } 110 110 111 - test_all() 112 - { 113 - slow_path_trap_install $swp1 ingress 114 - slow_path_trap_install $swp1 egress 115 - 116 - tests_run 117 - 118 - slow_path_trap_uninstall $swp1 egress 119 - slow_path_trap_uninstall $swp1 ingress 120 - } 121 - 122 111 trap cleanup EXIT 123 112 124 113 setup_prepare 125 114 setup_wait 126 115 127 - tcflags="skip_hw" 128 - test_all 129 - 130 - if ! tc_offload_check; then 131 - echo "WARN: Could not test offloaded functionality" 132 - else 133 - tcflags="skip_sw" 134 - test_all 135 - fi 116 + tests_run 136 117 137 118 exit $EXIT_STATUS
+1 -20
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh
··· 104 104 full_test_span_gre_stp gt6 $swp3.555 "mirror to ip6gretap" 105 105 } 106 106 107 - test_all() 108 - { 109 - slow_path_trap_install $swp1 ingress 110 - slow_path_trap_install $swp1 egress 111 - 112 - tests_run 113 - 114 - slow_path_trap_uninstall $swp1 egress 115 - slow_path_trap_uninstall $swp1 ingress 116 - } 117 - 118 107 trap cleanup EXIT 119 108 120 109 setup_prepare 121 110 setup_wait 122 111 123 - tcflags="skip_hw" 124 - test_all 125 - 126 - if ! tc_offload_check; then 127 - echo "WARN: Could not test offloaded functionality" 128 - else 129 - tcflags="skip_sw" 130 - test_all 131 - fi 112 + tests_run 132 113 133 114 exit $EXIT_STATUS
+1 -20
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh
··· 104 104 full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap" 105 105 } 106 106 107 - tests() 108 - { 109 - slow_path_trap_install $swp1 ingress 110 - slow_path_trap_install $swp1 egress 111 - 112 - tests_run 113 - 114 - slow_path_trap_uninstall $swp1 egress 115 - slow_path_trap_uninstall $swp1 ingress 116 - } 117 - 118 107 trap cleanup EXIT 119 108 120 109 setup_prepare 121 110 setup_wait 122 111 123 - tcflags="skip_hw" 124 - tests 125 - 126 - if ! tc_offload_check; then 127 - echo "WARN: Could not test offloaded functionality" 128 - else 129 - tcflags="skip_sw" 130 - tests 131 - fi 112 + tests_run 132 113 133 114 exit $EXIT_STATUS
+4 -23
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh
··· 227 227 RET=0 228 228 229 229 tc filter add dev $swp1 ingress pref 999 \ 230 - proto 802.1q flower vlan_ethtype arp $tcflags \ 230 + proto 802.1q flower vlan_ethtype arp \ 231 231 action pass 232 232 mirror_install $swp1 ingress gt4 \ 233 - "proto 802.1q flower vlan_id 333 $tcflags" 233 + "proto 802.1q flower vlan_id 333" 234 234 235 235 # Test connectivity through $up_dev when $down_dev is set down. 236 236 ip link set dev $down_dev down ··· 252 252 mirror_uninstall $swp1 ingress 253 253 tc filter del dev $swp1 ingress pref 999 254 254 255 - log_test "$what ($tcflags)" 255 + log_test "$what" 256 256 } 257 257 258 258 test_mirror_gretap_first() ··· 265 265 test_lag_slave $h4 $swp4 $swp3 "mirror to gretap: LAG second slave" 266 266 } 267 267 268 - test_all() 269 - { 270 - slow_path_trap_install $swp1 ingress 271 - slow_path_trap_install $swp1 egress 272 - 273 - tests_run 274 - 275 - slow_path_trap_uninstall $swp1 egress 276 - slow_path_trap_uninstall $swp1 ingress 277 - } 278 - 279 268 trap cleanup EXIT 280 269 281 270 setup_prepare 282 271 setup_wait 283 272 284 - tcflags="skip_hw" 285 - test_all 286 - 287 - if ! tc_offload_check; then 288 - echo "WARN: Could not test offloaded functionality" 289 - else 290 - tcflags="skip_sw" 291 - test_all 292 - fi 273 + tests_run 293 274 294 275 exit $EXIT_STATUS
+14 -33
tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
··· 73 73 RET=0 74 74 75 75 mirror_install $swp1 ingress $tundev \ 76 - "prot ip flower $tcflags ip_prot icmp" 76 + "prot ip flower ip_prot icmp" 77 77 tc filter add dev $h3 ingress pref 77 prot $prot \ 78 78 flower skip_hw ip_ttl 50 action pass 79 79 ··· 87 87 tc filter del dev $h3 ingress pref 77 88 88 mirror_uninstall $swp1 ingress 89 89 90 - log_test "$what: TTL change ($tcflags)" 90 + log_test "$what: TTL change" 91 91 } 92 92 93 93 test_span_gre_tun_up() ··· 98 98 RET=0 99 99 100 100 ip link set dev $tundev down 101 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 101 + mirror_install $swp1 ingress $tundev "matchall" 102 102 fail_test_span_gre_dir $tundev 103 103 104 104 ip link set dev $tundev up ··· 106 106 quick_test_span_gre_dir $tundev 107 107 mirror_uninstall $swp1 ingress 108 108 109 - log_test "$what: tunnel down/up ($tcflags)" 109 + log_test "$what: tunnel down/up" 110 110 } 111 111 112 112 test_span_gre_egress_up() ··· 118 118 RET=0 119 119 120 120 ip link set dev $swp3 down 121 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 121 + mirror_install $swp1 ingress $tundev "matchall" 122 122 fail_test_span_gre_dir $tundev 123 123 124 124 # After setting the device up, wait for neighbor to get resolved so that ··· 130 130 quick_test_span_gre_dir $tundev 131 131 mirror_uninstall $swp1 ingress 132 132 133 - log_test "$what: egress down/up ($tcflags)" 133 + log_test "$what: egress down/up" 134 134 } 135 135 136 136 test_span_gre_remote_ip() ··· 144 144 RET=0 145 145 146 146 ip link set dev $tundev type $type remote $wrong_ip 147 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 147 + mirror_install $swp1 ingress $tundev "matchall" 148 148 fail_test_span_gre_dir $tundev 149 149 150 150 ip link set dev $tundev type $type remote $correct_ip 151 151 quick_test_span_gre_dir $tundev 152 152 mirror_uninstall $swp1 ingress 153 153 154 - log_test "$what: remote address change ($tcflags)" 154 + log_test "$what: remote address change" 155 155 } 156 156 157 157 test_span_gre_tun_del() ··· 165 165 166 166 RET=0 167 167 168 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 168 + mirror_install $swp1 ingress $tundev "matchall" 169 169 quick_test_span_gre_dir $tundev 170 170 ip link del dev $tundev 171 171 fail_test_span_gre_dir $tundev ··· 176 176 # Recreating the tunnel doesn't reestablish mirroring, so reinstall it 177 177 # and verify it works for the follow-up tests. 178 178 mirror_uninstall $swp1 ingress 179 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 179 + mirror_install $swp1 ingress $tundev "matchall" 180 180 quick_test_span_gre_dir $tundev 181 181 mirror_uninstall $swp1 ingress 182 182 183 - log_test "$what: tunnel deleted ($tcflags)" 183 + log_test "$what: tunnel deleted" 184 184 } 185 185 186 186 test_span_gre_route_del() ··· 192 192 193 193 RET=0 194 194 195 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 195 + mirror_install $swp1 ingress $tundev "matchall" 196 196 quick_test_span_gre_dir $tundev 197 197 198 198 ip route del $route dev $edev ··· 203 203 204 204 mirror_uninstall $swp1 ingress 205 205 206 - log_test "$what: underlay route removal ($tcflags)" 206 + log_test "$what: underlay route removal" 207 207 } 208 208 209 209 test_ttl() ··· 244 244 test_span_gre_route_del gt6 $swp3 2001:db8:2::/64 "mirror to ip6gretap" 245 245 } 246 246 247 - test_all() 248 - { 249 - slow_path_trap_install $swp1 ingress 250 - slow_path_trap_install $swp1 egress 251 - 252 - tests_run 253 - 254 - slow_path_trap_uninstall $swp1 egress 255 - slow_path_trap_uninstall $swp1 ingress 256 - } 257 - 258 247 trap cleanup EXIT 259 248 260 249 setup_prepare 261 250 setup_wait 262 251 263 - tcflags="skip_hw" 264 - test_all 265 - 266 - if ! tc_offload_check; then 267 - echo "WARN: Could not test offloaded functionality" 268 - else 269 - tcflags="skip_sw" 270 - test_all 271 - fi 252 + tests_run 272 253 273 254 exit $EXIT_STATUS
+3 -22
tools/testing/selftests/net/forwarding/mirror_gre_flower.sh
··· 91 91 RET=0 92 92 93 93 mirror_install $swp1 $direction $tundev \ 94 - "protocol ip flower $tcflags dst_ip $match_dip" 94 + "protocol ip flower dst_ip $match_dip" 95 95 fail_test_span_gre_dir $tundev 96 96 test_span_gre_dir_acl "$tundev" "$forward_type" "$backward_type" 97 97 mirror_uninstall $swp1 $direction ··· 99 99 # Test lack of mirroring after ACL mirror is uninstalled. 100 100 fail_test_span_gre_dir_acl "$tundev" 101 101 102 - log_test "$direction $what ($tcflags)" 102 + log_test "$direction $what" 103 103 } 104 104 105 105 test_gretap() ··· 114 114 full_test_span_gre_dir_acl gt6 egress 0 8 192.0.2.3 "ACL mirror to ip6gretap" 115 115 } 116 116 117 - test_all() 118 - { 119 - slow_path_trap_install $swp1 ingress 120 - slow_path_trap_install $swp1 egress 121 - 122 - tests_run 123 - 124 - slow_path_trap_uninstall $swp1 egress 125 - slow_path_trap_uninstall $swp1 ingress 126 - } 127 - 128 117 trap cleanup EXIT 129 118 130 119 setup_prepare 131 120 setup_wait 132 121 133 - tcflags="skip_hw" 134 - test_all 135 - 136 - if ! tc_offload_check; then 137 - echo "WARN: Could not test offloaded functionality" 138 - else 139 - tcflags="skip_sw" 140 - test_all 141 - fi 122 + tests_run 142 123 143 124 exit $EXIT_STATUS
+3 -22
tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh
··· 223 223 RET=0 224 224 225 225 mirror_install $swp1 ingress gt4 \ 226 - "proto 802.1q flower vlan_id 333 $tcflags" 226 + "proto 802.1q flower vlan_id 333" 227 227 vlan_capture_install gt4-dst "vlan_ethtype ipv4 ip_proto icmp type 8" 228 228 229 229 # Move $down_dev away from the team. That will prompt change in ··· 250 250 # Wait for ${h,swp}{3,4}. 251 251 setup_wait 252 252 253 - log_test "$what ($tcflags)" 253 + log_test "$what" 254 254 } 255 255 256 256 test_mirror_gretap_first() ··· 263 263 test_lag_slave $h4 $h3 "mirror to gretap: LAG second slave" 264 264 } 265 265 266 - test_all() 267 - { 268 - slow_path_trap_install $swp1 ingress 269 - slow_path_trap_install $swp1 egress 270 - 271 - tests_run 272 - 273 - slow_path_trap_uninstall $swp1 egress 274 - slow_path_trap_uninstall $swp1 ingress 275 - } 276 - 277 266 trap cleanup EXIT 278 267 279 268 setup_prepare 280 269 setup_wait 281 270 282 - tcflags="skip_hw" 283 - test_all 284 - 285 - if ! tc_offload_check; then 286 - echo "WARN: Could not test offloaded functionality" 287 - else 288 - tcflags="skip_sw" 289 - test_all 290 - fi 271 + tests_run 291 272 292 273 exit $EXIT_STATUS
+6 -6
tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
··· 47 47 48 48 RET=0 49 49 50 - mirror_install $swp1 $direction $tundev "matchall $tcflags" 50 + mirror_install $swp1 $direction $tundev "matchall" 51 51 test_span_dir_ips "h3-$tundev" "$forward_type" \ 52 52 "$backward_type" "$ip1" "$ip2" 53 53 mirror_uninstall $swp1 $direction 54 54 55 - log_test "$direction $what ($tcflags)" 55 + log_test "$direction $what" 56 56 } 57 57 58 58 full_test_span_gre_dir_vlan_ips() ··· 68 68 69 69 RET=0 70 70 71 - mirror_install $swp1 $direction $tundev "matchall $tcflags" 71 + mirror_install $swp1 $direction $tundev "matchall" 72 72 73 73 test_span_dir_ips "h3-$tundev" "$forward_type" \ 74 74 "$backward_type" "$ip1" "$ip2" ··· 81 81 82 82 mirror_uninstall $swp1 $direction 83 83 84 - log_test "$direction $what ($tcflags)" 84 + log_test "$direction $what" 85 85 } 86 86 87 87 quick_test_span_gre_dir() ··· 151 151 152 152 RET=0 153 153 154 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 154 + mirror_install $swp1 ingress $tundev "matchall" 155 155 quick_test_span_gre_dir_ips $tundev $ip1 $ip2 \ 156 156 "$forward_type" "$backward_type" 157 157 ··· 166 166 167 167 mirror_uninstall $swp1 ingress 168 168 169 - log_test "$what: STP state ($tcflags)" 169 + log_test "$what: STP state" 170 170 } 171 171 172 172 full_test_span_gre_stp()
+3 -22
tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh
··· 67 67 RET=0 68 68 69 69 ip neigh replace dev $swp3 $addr lladdr 00:11:22:33:44:55 70 - mirror_install $swp1 $direction $tundev "matchall $tcflags" 70 + mirror_install $swp1 $direction $tundev "matchall" 71 71 fail_test_span_gre_dir $tundev "$forward_type" "$backward_type" 72 72 ip neigh del dev $swp3 $addr 73 73 quick_test_span_gre_dir $tundev "$forward_type" "$backward_type" 74 74 mirror_uninstall $swp1 $direction 75 75 76 - log_test "$direction $what: neighbor change ($tcflags)" 76 + log_test "$direction $what: neighbor change" 77 77 } 78 78 79 79 test_gretap() ··· 88 88 test_span_gre_neigh 2001:db8:2::2 gt6 egress 0 8 "mirror to ip6gretap" 89 89 } 90 90 91 - test_all() 92 - { 93 - slow_path_trap_install $swp1 ingress 94 - slow_path_trap_install $swp1 egress 95 - 96 - tests_run 97 - 98 - slow_path_trap_uninstall $swp1 egress 99 - slow_path_trap_uninstall $swp1 ingress 100 - } 101 - 102 91 trap cleanup EXIT 103 92 104 93 setup_prepare 105 94 setup_wait 106 95 107 - tcflags="skip_hw" 108 - test_all 109 - 110 - if ! tc_offload_check; then 111 - echo "WARN: Could not test offloaded functionality" 112 - else 113 - tcflags="skip_sw" 114 - test_all 115 - fi 96 + tests_run 116 97 117 98 exit $EXIT_STATUS
+5 -24
tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
··· 75 75 test_gretap() 76 76 { 77 77 RET=0 78 - mirror_install $swp1 ingress gt4 "matchall $tcflags" 78 + mirror_install $swp1 ingress gt4 "matchall" 79 79 80 80 # For IPv4, test that there's no mirroring without the route directing 81 81 # the traffic to tunnel remote address. Then add it and test that ··· 88 88 ip route del 192.0.2.130/32 via 192.0.2.162 89 89 90 90 mirror_uninstall $swp1 ingress 91 - log_test "mirror to gre with next-hop remote ($tcflags)" 91 + log_test "mirror to gre with next-hop remote" 92 92 } 93 93 94 94 test_ip6gretap() 95 95 { 96 96 RET=0 97 97 98 - mirror_install $swp1 ingress gt6 "matchall $tcflags" 98 + mirror_install $swp1 ingress gt6 "matchall" 99 99 quick_test_span_gre_dir gt6 100 100 mirror_uninstall $swp1 ingress 101 101 102 - log_test "mirror to ip6gre with next-hop remote ($tcflags)" 103 - } 104 - 105 - test_all() 106 - { 107 - slow_path_trap_install $swp1 ingress 108 - slow_path_trap_install $swp1 egress 109 - 110 - tests_run 111 - 112 - slow_path_trap_uninstall $swp1 egress 113 - slow_path_trap_uninstall $swp1 ingress 102 + log_test "mirror to ip6gre with next-hop remote" 114 103 } 115 104 116 105 trap cleanup EXIT ··· 107 118 setup_prepare 108 119 setup_wait 109 120 110 - tcflags="skip_hw" 111 - test_all 112 - 113 - if ! tc_offload_check; then 114 - echo "WARN: Could not test offloaded functionality" 115 - else 116 - tcflags="skip_sw" 117 - test_all 118 - fi 121 + tests_run 119 122 120 123 exit $EXIT_STATUS
+1 -20
tools/testing/selftests/net/forwarding/mirror_gre_vlan.sh
··· 63 63 full_test_span_gre_dir gt4 egress 0 8 "mirror to gretap" 64 64 } 65 65 66 - test_all() 67 - { 68 - slow_path_trap_install $swp1 ingress 69 - slow_path_trap_install $swp1 egress 70 - 71 - tests_run 72 - 73 - slow_path_trap_uninstall $swp1 egress 74 - slow_path_trap_uninstall $swp1 ingress 75 - } 76 - 77 66 trap cleanup EXIT 78 67 79 68 setup_prepare 80 69 setup_wait 81 70 82 - tcflags="skip_hw" 83 - test_all 84 - 85 - if ! tc_offload_check; then 86 - echo "WARN: Could not test offloaded functionality" 87 - else 88 - tcflags="skip_sw" 89 - test_all 90 - fi 71 + tests_run 91 72 92 73 exit $EXIT_STATUS
+10 -29
tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
··· 153 153 RET=0 154 154 155 155 # Run the pass-test first, to prime neighbor table. 156 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 156 + mirror_install $swp1 ingress $tundev "matchall" 157 157 quick_test_span_gre_dir $tundev 158 158 159 159 # Now forbid the VLAN at the bridge and see it fail. ··· 167 167 168 168 mirror_uninstall $swp1 ingress 169 169 170 - log_test "$what: vlan forbidden at a bridge ($tcflags)" 170 + log_test "$what: vlan forbidden at a bridge" 171 171 } 172 172 173 173 test_gretap_forbidden_cpu() ··· 187 187 188 188 RET=0 189 189 190 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 190 + mirror_install $swp1 ingress $tundev "matchall" 191 191 quick_test_span_gre_dir $tundev 192 192 193 193 bridge vlan del dev $swp3 vid 555 ··· 202 202 203 203 mirror_uninstall $swp1 ingress 204 204 205 - log_test "$what: vlan forbidden at a bridge egress ($tcflags)" 205 + log_test "$what: vlan forbidden at a bridge egress" 206 206 } 207 207 208 208 test_gretap_forbidden_egress() ··· 223 223 224 224 RET=0 225 225 226 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 226 + mirror_install $swp1 ingress $tundev "matchall" 227 227 228 228 quick_test_span_gre_dir $tundev 229 229 quick_test_span_vlan_dir $h3 555 "$ul_proto" ··· 246 246 247 247 mirror_uninstall $swp1 ingress 248 248 249 - log_test "$what: vlan untagged at a bridge egress ($tcflags)" 249 + log_test "$what: vlan untagged at a bridge egress" 250 250 } 251 251 252 252 test_gretap_untagged_egress() ··· 267 267 268 268 RET=0 269 269 270 - mirror_install $swp1 ingress $tundev "matchall $tcflags" 270 + mirror_install $swp1 ingress $tundev "matchall" 271 271 quick_test_span_gre_dir $tundev 272 272 273 273 while ((RET == 0)); do ··· 279 279 if ! bridge fdb sh dev $swp2 vlan 555 master \ 280 280 | grep -q $h3mac; then 281 281 printf "TEST: %-60s [RETRY]\n" \ 282 - "$what: MAC roaming ($tcflags)" 282 + "$what: MAC roaming" 283 283 # ARP or ND probably reprimed the FDB while the test 284 284 # was running. We would get a spurious failure. 285 285 RET=0 ··· 296 296 297 297 mirror_uninstall $swp1 ingress 298 298 299 - log_test "$what: MAC roaming ($tcflags)" 299 + log_test "$what: MAC roaming" 300 300 } 301 301 302 302 test_gretap_fdb_roaming() ··· 319 319 full_test_span_gre_stp gt6 $swp3 "mirror to ip6gretap" 320 320 } 321 321 322 - test_all() 323 - { 324 - slow_path_trap_install $swp1 ingress 325 - slow_path_trap_install $swp1 egress 326 - 327 - tests_run 328 - 329 - slow_path_trap_uninstall $swp1 egress 330 - slow_path_trap_uninstall $swp1 ingress 331 - } 332 - 333 322 trap cleanup EXIT 334 323 335 324 setup_prepare 336 325 setup_wait 337 326 338 - tcflags="skip_hw" 339 - test_all 340 - 341 - if ! tc_offload_check; then 342 - echo "WARN: Could not test offloaded functionality" 343 - else 344 - tcflags="skip_sw" 345 - test_all 346 - fi 327 + tests_run 347 328 348 329 exit $EXIT_STATUS
+9 -26
tools/testing/selftests/net/forwarding/mirror_vlan.sh
··· 40 40 41 41 vlan_create $h2 111 v$h2 192.0.2.18/28 42 42 bridge vlan add dev $swp2 vid 111 43 + 44 + trap_install $h3 ingress 43 45 } 44 46 45 47 cleanup() 46 48 { 47 49 pre_cleanup 50 + 51 + trap_uninstall $h3 ingress 48 52 49 53 vlan_destroy $h2 111 50 54 vlan_destroy $h1 111 ··· 67 63 68 64 RET=0 69 65 70 - mirror_install $swp1 $direction $swp3.555 "matchall $tcflags" 66 + mirror_install $swp1 $direction $swp3.555 "matchall" 71 67 test_span_dir "$h3.555" "$forward_type" "$backward_type" 72 68 mirror_uninstall $swp1 $direction 73 69 74 - log_test "$direction mirror to vlan ($tcflags)" 70 + log_test "$direction mirror to vlan" 75 71 } 76 72 77 73 test_vlan() ··· 88 84 89 85 RET=0 90 86 91 - mirror_install $swp1 $direction $swp3.555 "matchall $tcflags" 87 + mirror_install $swp1 $direction $swp3.555 "matchall" 92 88 do_test_span_vlan_dir_ips '>= 10' "$h3.555" 111 ip 192.0.2.17 192.0.2.18 93 89 do_test_span_vlan_dir_ips 0 "$h3.555" 555 ip 192.0.2.17 192.0.2.18 94 90 mirror_uninstall $swp1 $direction 95 91 96 - log_test "$direction mirror tagged to vlan ($tcflags)" 92 + log_test "$direction mirror tagged to vlan" 97 93 } 98 94 99 95 test_tagged_vlan() ··· 102 98 test_tagged_vlan_dir egress 0 8 103 99 } 104 100 105 - test_all() 106 - { 107 - slow_path_trap_install $swp1 ingress 108 - slow_path_trap_install $swp1 egress 109 - trap_install $h3 ingress 110 - 111 - tests_run 112 - 113 - trap_uninstall $h3 ingress 114 - slow_path_trap_uninstall $swp1 egress 115 - slow_path_trap_uninstall $swp1 ingress 116 - } 117 - 118 101 trap cleanup EXIT 119 102 120 103 setup_prepare 121 104 setup_wait 122 105 123 - tcflags="skip_hw" 124 - test_all 125 - 126 - if ! tc_offload_check; then 127 - echo "WARN: Could not test offloaded functionality" 128 - else 129 - tcflags="skip_sw" 130 - test_all 131 - fi 106 + tests_run 132 107 133 108 exit $EXIT_STATUS