4 "name": "Add tunnel_key set action with mandatory parameters",
11 "$TC actions flush action tunnel_key",
17 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1",
19 "verifyCmd": "$TC actions list action tunnel_key",
20 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1",
23 "$TC actions flush action tunnel_key"
28 "name": "Add tunnel_key set action with missing mandatory src_ip parameter",
35 "$TC actions flush action tunnel_key",
41 "cmdUnderTest": "$TC actions add action tunnel_key set dst_ip 20.20.20.2 id 100",
43 "verifyCmd": "$TC actions list action tunnel_key",
44 "matchPattern": "action order [0-9]+: tunnel_key set.*dst_ip 20.20.20.2.*key_id 100",
48 "$TC actions flush action tunnel_key",
57 "name": "Add tunnel_key set action with missing mandatory dst_ip parameter",
64 "$TC actions flush action tunnel_key",
70 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 id 100",
72 "verifyCmd": "$TC actions list action tunnel_key",
73 "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 10.10.10.1.*key_id 100",
77 "$TC actions flush action tunnel_key",
86 "name": "Add tunnel_key set action with invalid src_ip parameter",
93 "$TC actions flush action tunnel_key",
99 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 300.168.100.1 dst_ip 192.168.200.1 id 7 index 1",
101 "verifyCmd": "$TC actions get action tunnel_key index 1",
102 "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 300.168.100.1.*dst_ip 192.168.200.1.*key_id 7.*index 1 ref",
106 "$TC actions flush action tunnel_key",
115 "name": "Add tunnel_key set action with invalid dst_ip parameter",
122 "$TC actions flush action tunnel_key",
128 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.100.1 dst_ip 192.168.800.1 id 10 index 11",
130 "verifyCmd": "$TC actions get action tunnel_key index 11",
131 "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 192.168.100.1.*dst_ip 192.168.800.1.*key_id 10.*index 11 ref",
135 "$TC actions flush action tunnel_key",
144 "name": "Add tunnel_key set action with invalid id parameter",
151 "$TC actions flush action tunnel_key",
157 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 112233445566778899 index 1",
158 "expExitCode": "255",
159 "verifyCmd": "$TC actions get action tunnel_key index 1",
160 "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 112233445566778899.*index 1 ref",
164 "$TC actions flush action tunnel_key",
173 "name": "Add tunnel_key set action with invalid dst_port parameter",
180 "$TC actions flush action tunnel_key",
186 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 11 dst_port 998877 index 1",
187 "expExitCode": "255",
188 "verifyCmd": "$TC actions get action tunnel_key index 1",
189 "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 11.*dst_port 998877.*index 1 ref",
193 "$TC actions flush action tunnel_key",
202 "name": "Add tunnel_key set action with optional dst_port parameter",
209 "$TC actions flush action tunnel_key",
215 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.100.1 dst_ip 192.168.200.1 id 789 dst_port 4000 index 10",
217 "verifyCmd": "$TC actions get action tunnel_key index 10",
218 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 192.168.100.1.*dst_ip 192.168.200.1.*key_id 789.*dst_port 4000.*index 10 ref",
221 "$TC actions flush action tunnel_key"
226 "name": "Add tunnel_key set action with index at 32-bit maximum",
233 "$TC actions flush action tunnel_key",
239 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 11 index 4294967295",
241 "verifyCmd": "$TC actions get action tunnel_key index 4294967295",
242 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*id 11.*index 4294967295 ref",
245 "$TC actions flush action tunnel_key"
250 "name": "Add tunnel_key set action with index exceeding 32-bit maximum",
257 "$TC actions flush action tunnel_key",
263 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 11 index 4294967295678",
264 "expExitCode": "255",
265 "verifyCmd": "$TC actions get action tunnel_key index 4294967295678",
266 "matchPattern": "action order [0-9]+: tunnel_key set.*index 4294967295678 ref",
270 "$TC actions flush action tunnel_key",
279 "name": "Add tunnel_key set action with id value at 32-bit maximum",
286 "$TC actions flush action tunnel_key",
292 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 4294967295 index 1",
294 "verifyCmd": "$TC actions get action tunnel_key index 1",
295 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 4294967295.*index 1",
298 "$TC actions flush action tunnel_key"
303 "name": "Add tunnel_key set action with id value exceeding 32-bit maximum",
310 "$TC actions flush action tunnel_key",
316 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42949672955 index 1",
317 "expExitCode": "255",
318 "verifyCmd": "$TC actions get action tunnel_key index 4294967295",
319 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42949672955.*index 1",
323 "$TC actions flush action tunnel_key",
332 "name": "Add tunnel_key set action with dst_port value at 16-bit maximum",
339 "$TC actions flush action tunnel_key",
345 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 429 dst_port 65535 index 1",
347 "verifyCmd": "$TC actions get action tunnel_key index 1",
348 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 429.*dst_port 65535.*index 1",
351 "$TC actions flush action tunnel_key"
356 "name": "Add tunnel_key set action with dst_port value exceeding 16-bit maximum",
363 "$TC actions flush action tunnel_key",
369 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 429 dst_port 65535789 index 1",
370 "expExitCode": "255",
371 "verifyCmd": "$TC actions get action tunnel_key index 1",
372 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 429.*dst_port 65535789.*index 1",
376 "$TC actions flush action tunnel_key",
385 "name": "Add tunnel_key unset action",
392 "$TC actions flush action tunnel_key",
398 "cmdUnderTest": "$TC actions add action tunnel_key unset index 1",
400 "verifyCmd": "$TC actions get action tunnel_key index 1",
401 "matchPattern": "action order [0-9]+: tunnel_key.*unset.*index 1 ref",
404 "$TC actions flush action tunnel_key"
409 "name": "Add tunnel_key unset continue action",
416 "$TC actions flush action tunnel_key",
422 "cmdUnderTest": "$TC actions add action tunnel_key unset continue index 1",
424 "verifyCmd": "$TC actions get action tunnel_key index 1",
425 "matchPattern": "action order [0-9]+: tunnel_key.*unset continue.*index 1 ref",
428 "$TC actions flush action tunnel_key"
433 "name": "Add tunnel_key set continue action with cookie",
440 "$TC actions flush action tunnel_key",
446 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.10.1 dst_ip 192.168.20.2 id 123 continue index 1 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
448 "verifyCmd": "$TC actions get action tunnel_key index 1",
449 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 192.168.10.1.*dst_ip 192.168.20.2.*key_id 123.*csum continue.*index 1.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
452 "$TC actions flush action tunnel_key"
457 "name": "Add tunnel_key set continue action with invalid cookie",
464 "$TC actions flush action tunnel_key",
470 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.10.1 dst_ip 192.168.20.2 id 123 continue index 1 cookie aa11bb22cc33dd44ee55ff66aa11b1b2777888",
471 "expExitCode": "255",
472 "verifyCmd": "$TC actions get action tunnel_key index 1",
473 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 192.168.10.1.*dst_ip 192.168.20.2.*key_id 123.*csum continue.*index 1.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2777888",
477 "$TC actions flush action tunnel_key",
486 "name": "Add tunnel_key action with no set/unset command specified",
493 "$TC actions flush action tunnel_key",
499 "cmdUnderTest": "$TC actions add action tunnel_key src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1",
500 "expExitCode": "255",
501 "verifyCmd": "$TC actions get action tunnel_key index 1",
502 "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1",
506 "$TC actions flush action tunnel_key",
515 "name": "Add tunnel_key action with csum option",
522 "$TC actions flush action tunnel_key",
528 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1 csum index 99",
530 "verifyCmd": "$TC actions get action tunnel_key index 99",
531 "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*csum pipe.*index 99",
534 "$TC actions flush action tunnel_key"
539 "name": "Add tunnel_key action with nocsum option",
546 "$TC actions flush action tunnel_key",
552 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 10.10.10.2 id 7823 nocsum index 234",
554 "verifyCmd": "$TC actions get action tunnel_key index 234",
555 "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 7823.*nocsum pipe.*index 234",
558 "$TC actions flush action tunnel_key"
563 "name": "Add tunnel_key action with not-supported parameter",
570 "$TC actions flush action tunnel_key",
576 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 10.10.10.2 id 7 foobar 999 index 4",
577 "expExitCode": "255",
578 "verifyCmd": "$TC actions get action tunnel_key index 4",
579 "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 7.*foobar 999.*index 4",
583 "$TC actions flush action tunnel_key",
592 "name": "Add tunnel_key action with cookie parameter",
599 "$TC actions flush action tunnel_key",
605 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 10.10.10.2 id 7 index 4 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
607 "verifyCmd": "$TC actions get action tunnel_key index 4",
608 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 7.*csum pipe.*index 4 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
611 "$TC actions flush action tunnel_key"
616 "name": "Add tunnel_key action with a single geneve option parameter",
623 "$TC actions flush action tunnel_key",
629 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022 index 1",
631 "verifyCmd": "$TC actions get action tunnel_key index 1",
632 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:00880022.*index 1",
635 "$TC actions flush action tunnel_key"
640 "name": "Add tunnel_key action with multiple geneve options parameter",
647 "$TC actions flush action tunnel_key",
653 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022,0408:42:0040007611223344,0111:02:1020304011223344 index 1",
655 "verifyCmd": "$TC actions get action tunnel_key index 1",
656 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:00880022,0408:42:0040007611223344,0111:02:1020304011223344.*index 1",
659 "$TC actions flush action tunnel_key"
664 "name": "Add tunnel_key action with invalid class geneve option parameter",
671 "$TC actions flush action tunnel_key",
677 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 824212:80:00880022 index 1",
678 "expExitCode": "255",
679 "verifyCmd": "$TC actions get action tunnel_key index 1",
680 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 824212:80:00880022.*index 1",
683 "$TC actions flush action tunnel_key"
688 "name": "Add tunnel_key action with invalid type geneve option parameter",
695 "$TC actions flush action tunnel_key",
701 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:4224:00880022 index 1",
702 "expExitCode": "255",
703 "verifyCmd": "$TC actions get action tunnel_key index 1",
704 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:4224:00880022.*index 1",
707 "$TC actions flush action tunnel_key"
712 "name": "Add tunnel_key action with short data length geneve option parameter",
719 "$TC actions flush action tunnel_key",
725 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:4288 index 1",
726 "expExitCode": "255",
727 "verifyCmd": "$TC actions get action tunnel_key index 1",
728 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:4288.*index 1",
731 "$TC actions flush action tunnel_key"
736 "name": "Add tunnel_key action with non-multiple of 4 data length geneve option parameter",
743 "$TC actions flush action tunnel_key",
749 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:4288428822 index 1",
750 "expExitCode": "255",
751 "verifyCmd": "$TC actions get action tunnel_key index 1",
752 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:4288428822.*index 1",
755 "$TC actions flush action tunnel_key"
760 "name": "Add tunnel_key action with incomplete geneve options parameter",
767 "$TC actions flush action tunnel_key",
773 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022,0408:42: index 1",
774 "expExitCode": "255",
775 "verifyCmd": "$TC actions get action tunnel_key index 1",
776 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt 0102:80:00880022,0408:42:.*index 1",
779 "$TC actions flush action tunnel_key"
784 "name": "Replace tunnel_key set action with all parameters",
791 "$TC actions flush action tunnel_key",
796 "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 csum id 1 index 1"
798 "cmdUnderTest": "$TC actions replace action tunnel_key set src_ip 11.11.11.1 dst_ip 21.21.21.2 dst_port 3129 nocsum id 11 index 1",
800 "verifyCmd": "$TC actions get action tunnel_key index 1",
801 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 11.11.11.1.*dst_ip 21.21.21.2.*key_id 11.*dst_port 3129.*nocsum pipe.*index 1",
804 "$TC actions flush action tunnel_key"
809 "name": "Replace tunnel_key set action with all parameters and cookie",
816 "$TC actions flush action tunnel_key",
821 "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 nocsum id 1 index 1 cookie aabbccddeeff112233445566778800a"
823 "cmdUnderTest": "$TC actions replace action tunnel_key set src_ip 11.11.11.1 dst_ip 21.21.21.2 dst_port 3129 id 11 csum reclassify index 1 cookie a1b1c1d1",
825 "verifyCmd": "$TC actions get action tunnel_key index 1",
826 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 11.11.11.1.*dst_ip 21.21.21.2.*key_id 11.*dst_port 3129.*csum reclassify.*index 1.*cookie a1b1c1d1",
829 "$TC actions flush action tunnel_key"
834 "name": "Fetch all existing tunnel_key actions",
841 "$TC actions flush action tunnel_key",
846 "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 nocsum id 1 pipe index 1",
847 "$TC actions add action tunnel_key set src_ip 11.10.10.1 dst_ip 21.20.20.2 dst_port 3129 csum id 2 jump 10 index 2",
848 "$TC actions add action tunnel_key set src_ip 12.10.10.1 dst_ip 22.20.20.2 dst_port 3130 csum id 3 pass index 3",
849 "$TC actions add action tunnel_key set src_ip 13.10.10.1 dst_ip 23.20.20.2 dst_port 3131 nocsum id 4 continue index 4"
851 "cmdUnderTest": "$TC actions list action tunnel_key",
853 "verifyCmd": "$TC actions list action tunnel_key",
854 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*dst_port 3128.*nocsum pipe.*index 1.*set.*src_ip 11.10.10.1.*dst_ip 21.20.20.2.*key_id 2.*dst_port 3129.*csum jump 10.*index 2.*set.*src_ip 12.10.10.1.*dst_ip 22.20.20.2.*key_id 3.*dst_port 3130.*csum pass.*index 3.*set.*src_ip 13.10.10.1.*dst_ip 23.20.20.2.*key_id 4.*dst_port 3131.*nocsum continue.*index 4",
857 "$TC actions flush action tunnel_key"
862 "name": "Flush all existing tunnel_key actions",
869 "$TC actions flush action tunnel_key",
874 "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 nocsum id 1 pipe index 1",
875 "$TC actions add action tunnel_key set src_ip 11.10.10.1 dst_ip 21.20.20.2 dst_port 3129 csum id 2 reclassify index 2",
876 "$TC actions add action tunnel_key set src_ip 12.10.10.1 dst_ip 22.20.20.2 dst_port 3130 csum id 3 pass index 3",
877 "$TC actions add action tunnel_key set src_ip 13.10.10.1 dst_ip 23.20.20.2 dst_port 3131 nocsum id 4 continue index 4"
879 "cmdUnderTest": "$TC actions flush action tunnel_key",
881 "verifyCmd": "$TC actions list action tunnel_key",
882 "matchPattern": "action order [0-9]+:.*",
885 "$TC actions flush action tunnel_key"
890 "name": "Replace tunnel_key set action with invalid goto chain",
897 "$TC actions flush action tunnel_key",
902 "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 nocsum id 1 pass index 90"
904 "cmdUnderTest": "$TC actions replace action tunnel_key set src_ip 10.10.10.2 dst_ip 20.20.20.1 dst_port 3129 id 2 csum goto chain 42 index 90 cookie c1a0c1a0",
905 "expExitCode": "255",
906 "verifyCmd": "$TC actions get action tunnel_key index 90",
907 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*dst_port 3128.*csum pass.*index 90 ref",
910 "$TC actions flush action tunnel_key"
915 "name": "Add tunnel_key set action with no_percpu flag",
922 "$TC actions flush action tunnel_key",
928 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1 no_percpu",
930 "verifyCmd": "$TC actions list action tunnel_key",
931 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*no_percpu",
934 "$TC actions flush action tunnel_key"