Lines Matching +full:add +full:- +full:on

2 # SPDX-License-Identifier: GPL-2.0
29 tc qdisc add dev $h2 clsact
44 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
46 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \
49 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
50 -t ip -q
53 check_fail $? "Matched on a wrong filter"
56 check_fail $? "Did not match on correct filter"
70 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
72 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \
75 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
76 -t ip -q
79 check_fail $? "Matched on a wrong filter"
82 check_fail $? "Did not match on correct filter"
94 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
96 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \
98 tc filter add dev $h2 ingress protocol ip pref 3 handle 103 flower \
101 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
102 -t ip -q
105 check_fail $? "Matched on a wrong filter"
108 check_err $? "Did not match on correct filter"
112 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
113 -t ip -q
116 check_err $? "Did not match on correct filter with mask"
128 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
130 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \
132 tc filter add dev $h2 ingress protocol ip pref 3 handle 103 flower \
135 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
136 -t ip -q
139 check_fail $? "Matched on a wrong filter"
142 check_err $? "Did not match on correct filter"
146 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
147 -t ip -q
150 check_err $? "Did not match on correct filter with mask"
162 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
164 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \
166 tc filter add dev $h2 ingress protocol ip pref 3 handle 103 flower \
168 tc filter add dev $h2 ingress protocol ip pref 4 handle 104 flower \
171 $MZ $h1 -c 1 -p 1000 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
172 -t ip "frag=0" -q
175 check_fail $? "Matched on wrong frag filter (nofrag)"
178 check_fail $? "Matched on wrong firstfrag filter (nofrag)"
181 check_err $? "Did not match on nofirstfrag filter (nofrag) "
184 check_err $? "Did not match on nofrag filter (nofrag)"
186 $MZ $h1 -c 1 -p 1000 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
187 -t ip "frag=0,mf" -q
190 check_err $? "Did not match on frag filter (1stfrag)"
196 check_err $? "Matched on wrong nofirstfrag filter (1stfrag)"
199 check_err $? "Match on wrong nofrag filter (1stfrag)"
201 $MZ $h1 -c 1 -p 1000 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
202 -t ip "frag=256,mf" -q
203 $MZ $h1 -c 1 -p 1000 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
204 -t ip "frag=256" -q
207 check_err $? "Did not match on frag filter (no1stfrag)"
210 check_err $? "Matched on wrong firstfrag filter (no1stfrag)"
213 check_err $? "Did not match on nofirstfrag filter (no1stfrag)"
216 check_err $? "Matched on nofrag filter (no1stfrag)"
232 tc filter add dev $h2 ingress protocol 802.1q pref 1 handle 101 \
234 tc filter add dev $h2 ingress protocol 802.1q pref 2 handle 102 \
237 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -B 192.0.2.11 -Q 7:85 -t ip -q
238 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -B 192.0.2.11 -Q 0:85 -t ip -q
241 check_err $? "Matched on specified PCP when should not"
244 check_err $? "Did not match on specified PCP"
261 tc filter add dev $h2 ingress protocol 802.1q pref 1 handle 101 \
263 tc filter add dev $h2 ingress protocol 802.1q pref 2 handle 102 \
266 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -B 192.0.2.11 -Q 0:85 -t ip -q
269 check_err $? "Matched on specified VLAN when should not"
272 check_err $? "Did not match on specified VLAN"
287 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
289 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \
292 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
293 -t ip tos=18 -q
296 check_fail $? "Matched on a wrong filter (0x18)"
299 check_err $? "Did not match on correct filter (0x18)"
301 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
302 -t ip tos=20 -q
305 check_fail $? "Matched on a wrong filter (0x20)"
308 check_err $? "Did not match on correct filter (0x20)"
320 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
322 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \
325 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
326 -t ip "ttl=63" -q
328 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
329 -t ip "ttl=63,mf,frag=256" -q
332 check_fail $? "Matched on the wrong filter (no check on ttl)"
335 check_err $? "Did not match on correct filter (ttl=63)"
337 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
338 -t ip "ttl=255" -q
341 check_fail $? "Matched on a wrong filter (ttl=63)"
344 check_err $? "Did not match on correct filter (no check on ttl)"
356 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
358 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \
361 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
362 -t ip -q
365 check_fail $? "Matched on a wrong filter"
368 check_err $? "Did not match on correct filter"
401 tc filter add dev $h2 ingress protocol mpls_uc pref 1 handle 101 \
403 tc filter add dev $h2 ingress protocol mpls_uc pref 2 handle 102 \
407 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
410 check_fail $? "Matched on a wrong filter (1048575)"
413 check_err $? "Did not match on correct filter (1048575)"
416 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
419 check_fail $? "Matched on a wrong filter (0)"
422 check_err $? "Did not match on correct filter (0)"
439 tc filter add dev $h2 ingress protocol mpls_uc pref 1 handle 101 \
441 tc filter add dev $h2 ingress protocol mpls_uc pref 2 handle 102 \
445 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
448 check_fail $? "Matched on a wrong filter (7)"
451 check_err $? "Did not match on correct filter (7)"
454 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
457 check_fail $? "Matched on a wrong filter (0)"
460 check_err $? "Did not match on correct filter (0)"
477 tc filter add dev $h2 ingress protocol mpls_uc pref 1 handle 101 \
479 tc filter add dev $h2 ingress protocol mpls_uc pref 2 handle 102 \
483 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
486 check_fail $? "Matched on a wrong filter (1)"
489 check_err $? "Did not match on correct filter (1)"
491 # Need to add a second label to properly mark the Bottom of Stack
493 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
496 check_fail $? "Matched on a wrong filter (0)"
499 check_err $? "Did not match on correct filter (0)"
516 tc filter add dev $h2 ingress protocol mpls_uc pref 1 handle 101 \
518 tc filter add dev $h2 ingress protocol mpls_uc pref 2 handle 102 \
522 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
525 check_fail $? "Matched on a wrong filter (255)"
528 check_err $? "Did not match on correct filter (255)"
531 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
534 check_fail $? "Matched on a wrong filter (0)"
537 check_err $? "Did not match on correct filter (0)"
554 # Match on first LSE (minimal values for each field)
555 tc filter add dev $h2 ingress protocol mpls_uc pref 1 handle 101 \
557 tc filter add dev $h2 ingress protocol mpls_uc pref 2 handle 102 \
559 tc filter add dev $h2 ingress protocol mpls_uc pref 3 handle 103 \
561 tc filter add dev $h2 ingress protocol mpls_uc pref 4 handle 104 \
564 # Match on second LSE (maximal values for each field)
565 tc filter add dev $h2 ingress protocol mpls_uc pref 5 handle 105 \
567 tc filter add dev $h2 ingress protocol mpls_uc pref 6 handle 106 \
569 tc filter add dev $h2 ingress protocol mpls_uc pref 7 handle 107 \
571 tc filter add dev $h2 ingress protocol mpls_uc pref 8 handle 108 \
574 # Match on LSE depth
575 tc filter add dev $h2 ingress protocol mpls_uc pref 9 handle 109 \
577 tc filter add dev $h2 ingress protocol mpls_uc pref 10 handle 110 \
579 tc filter add dev $h2 ingress protocol mpls_uc pref 11 handle 111 \
584 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
586 # Make a variant of the above packet, with a non-matching value
591 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
595 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
600 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
604 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
608 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
612 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
618 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
622 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac "$pkt" -q
627 check_err $? "Did not match on correct filter"
630 check_err $? "Did not match on correct filter"
633 check_err $? "Did not match on correct filter"
636 check_err $? "Did not match on correct filter"
642 check_err $? "Did not match on correct filter"
645 check_err $? "Did not match on correct filter"
648 check_err $? "Did not match on correct filter"
651 check_err $? "Did not match on correct filter"
653 # Finally, verify the filters that only match on LSE depth
656 check_err $? "Did not match on correct filter"
659 check_err $? "Did not match on correct filter"
662 check_err $? "Did not match on correct filter"
710 if [[ $? -ne 0 ]]; then