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 missing mandatory id parameter",
93 "$TC actions flush action tunnel_key",
99 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2",
100 "expExitCode": "255",
101 "verifyCmd": "$TC actions list action tunnel_key",
102 "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2",
106 "$TC actions flush action tunnel_key",
115 "name": "Add tunnel_key set action with invalid src_ip parameter",
122 "$TC actions flush action tunnel_key",
128 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 300.168.100.1 dst_ip 192.168.200.1 id 7 index 1",
130 "verifyCmd": "$TC actions get action tunnel_key index 1",
131 "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",
135 "$TC actions flush action tunnel_key",
144 "name": "Add tunnel_key set action with invalid dst_ip parameter",
151 "$TC actions flush action tunnel_key",
157 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.100.1 dst_ip 192.168.800.1 id 10 index 11",
159 "verifyCmd": "$TC actions get action tunnel_key index 11",
160 "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",
164 "$TC actions flush action tunnel_key",
173 "name": "Add tunnel_key set action with invalid id 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 112233445566778899 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 112233445566778899.*index 1 ref",
193 "$TC actions flush action tunnel_key",
202 "name": "Add tunnel_key set action with invalid dst_port parameter",
209 "$TC actions flush action tunnel_key",
215 "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",
216 "expExitCode": "255",
217 "verifyCmd": "$TC actions get action tunnel_key index 1",
218 "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",
222 "$TC actions flush action tunnel_key",
231 "name": "Add tunnel_key set action with optional dst_port parameter",
238 "$TC actions flush action tunnel_key",
244 "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",
246 "verifyCmd": "$TC actions get action tunnel_key index 10",
247 "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",
250 "$TC actions flush action tunnel_key"
255 "name": "Add tunnel_key set action with index at 32-bit maximum",
262 "$TC actions flush action tunnel_key",
268 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 11 index 4294967295",
270 "verifyCmd": "$TC actions get action tunnel_key index 4294967295",
271 "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",
274 "$TC actions flush action tunnel_key"
279 "name": "Add tunnel_key set action with index exceeding 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 11 index 4294967295678",
293 "expExitCode": "255",
294 "verifyCmd": "$TC actions get action tunnel_key index 4294967295678",
295 "matchPattern": "action order [0-9]+: tunnel_key set.*index 4294967295678 ref",
299 "$TC actions flush action tunnel_key",
308 "name": "Add tunnel_key set action with id value at 32-bit maximum",
315 "$TC actions flush action tunnel_key",
321 "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 4294967295 index 1",
323 "verifyCmd": "$TC actions get action tunnel_key index 1",
324 "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",
327 "$TC actions flush action tunnel_key"
332 "name": "Add tunnel_key set action with id value exceeding 32-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 42949672955 index 1",
346 "expExitCode": "255",
347 "verifyCmd": "$TC actions get action tunnel_key index 4294967295",
348 "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",
352 "$TC actions flush action tunnel_key",
361 "name": "Add tunnel_key set action with dst_port value at 16-bit maximum",
368 "$TC actions flush action tunnel_key",
374 "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",
376 "verifyCmd": "$TC actions get action tunnel_key index 1",
377 "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",
380 "$TC actions flush action tunnel_key"
385 "name": "Add tunnel_key set action with dst_port value exceeding 16-bit maximum",
392 "$TC actions flush action tunnel_key",
398 "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",
399 "expExitCode": "255",
400 "verifyCmd": "$TC actions get action tunnel_key index 1",
401 "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",
405 "$TC actions flush action tunnel_key",
414 "name": "Add tunnel_key unset action",
421 "$TC actions flush action tunnel_key",
427 "cmdUnderTest": "$TC actions add action tunnel_key unset index 1",
429 "verifyCmd": "$TC actions get action tunnel_key index 1",
430 "matchPattern": "action order [0-9]+: tunnel_key.*unset.*index 1 ref",
433 "$TC actions flush action tunnel_key"
438 "name": "Add tunnel_key unset continue action",
445 "$TC actions flush action tunnel_key",
451 "cmdUnderTest": "$TC actions add action tunnel_key unset continue index 1",
453 "verifyCmd": "$TC actions get action tunnel_key index 1",
454 "matchPattern": "action order [0-9]+: tunnel_key.*unset continue.*index 1 ref",
457 "$TC actions flush action tunnel_key"
462 "name": "Add tunnel_key set continue action with cookie",
469 "$TC actions flush action tunnel_key",
475 "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",
477 "verifyCmd": "$TC actions get action tunnel_key index 1",
478 "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",
481 "$TC actions flush action tunnel_key"
486 "name": "Add tunnel_key set continue action with invalid cookie",
493 "$TC actions flush action tunnel_key",
499 "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",
500 "expExitCode": "255",
501 "verifyCmd": "$TC actions get action tunnel_key index 1",
502 "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",
506 "$TC actions flush action tunnel_key",
515 "name": "Add tunnel_key action with no set/unset command specified",
522 "$TC actions flush action tunnel_key",
528 "cmdUnderTest": "$TC actions add action tunnel_key src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1",
529 "expExitCode": "255",
530 "verifyCmd": "$TC actions get action tunnel_key index 1",
531 "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1",
535 "$TC actions flush action tunnel_key",
544 "name": "Add tunnel_key action with csum option",
551 "$TC actions flush action tunnel_key",
557 "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",
559 "verifyCmd": "$TC actions get action tunnel_key index 99",
560 "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",
563 "$TC actions flush action tunnel_key"
568 "name": "Add tunnel_key action with nocsum option",
575 "$TC actions flush action tunnel_key",
581 "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",
583 "verifyCmd": "$TC actions get action tunnel_key index 234",
584 "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",
587 "$TC actions flush action tunnel_key"
592 "name": "Add tunnel_key action with not-supported 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 foobar 999 index 4",
606 "expExitCode": "255",
607 "verifyCmd": "$TC actions get action tunnel_key index 4",
608 "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",
612 "$TC actions flush action tunnel_key",
621 "name": "Add tunnel_key action with cookie parameter",
628 "$TC actions flush action tunnel_key",
634 "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",
636 "verifyCmd": "$TC actions get action tunnel_key index 4",
637 "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 7.*dst_port 0.*csum pipe.*index 4 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
640 "$TC actions flush action tunnel_key"
645 "name": "Add tunnel_key action with a single geneve option parameter",
652 "$TC actions flush action tunnel_key",
658 "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",
660 "verifyCmd": "$TC actions get action tunnel_key index 1",
661 "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",
664 "$TC actions flush action tunnel_key"
669 "name": "Add tunnel_key action with multiple geneve options parameter",
676 "$TC actions flush action tunnel_key",
682 "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",
684 "verifyCmd": "$TC actions get action tunnel_key index 1",
685 "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",
688 "$TC actions flush action tunnel_key"
693 "name": "Add tunnel_key action with invalid class geneve option parameter",
700 "$TC actions flush action tunnel_key",
706 "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",
707 "expExitCode": "255",
708 "verifyCmd": "$TC actions get action tunnel_key index 1",
709 "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",
712 "$TC actions flush action tunnel_key"
717 "name": "Add tunnel_key action with invalid type geneve option parameter",
724 "$TC actions flush action tunnel_key",
730 "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",
731 "expExitCode": "255",
732 "verifyCmd": "$TC actions get action tunnel_key index 1",
733 "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",
736 "$TC actions flush action tunnel_key"
741 "name": "Add tunnel_key action with short data length geneve option parameter",
748 "$TC actions flush action tunnel_key",
754 "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",
755 "expExitCode": "255",
756 "verifyCmd": "$TC actions get action tunnel_key index 1",
757 "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",
760 "$TC actions flush action tunnel_key"
765 "name": "Add tunnel_key action with non-multiple of 4 data length geneve option parameter",
772 "$TC actions flush action tunnel_key",
778 "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",
779 "expExitCode": "255",
780 "verifyCmd": "$TC actions get action tunnel_key index 1",
781 "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",
784 "$TC actions flush action tunnel_key"
789 "name": "Add tunnel_key action with incomplete geneve options parameter",
796 "$TC actions flush action tunnel_key",
802 "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",
803 "expExitCode": "255",
804 "verifyCmd": "$TC actions get action tunnel_key index 1",
805 "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",
808 "$TC actions flush action tunnel_key"
813 "name": "Replace tunnel_key set action with all parameters",
820 "$TC actions flush action tunnel_key",
825 "$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"
827 "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",
829 "verifyCmd": "$TC actions get action tunnel_key index 1",
830 "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",
833 "$TC actions flush action tunnel_key"
838 "name": "Replace tunnel_key set action with all parameters and cookie",
845 "$TC actions flush action tunnel_key",
850 "$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"
852 "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",
854 "verifyCmd": "$TC actions get action tunnel_key index 1",
855 "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",
858 "$TC actions flush action tunnel_key"
863 "name": "Fetch all existing tunnel_key actions",
870 "$TC actions flush action tunnel_key",
875 "$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",
876 "$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",
877 "$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",
878 "$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"
880 "cmdUnderTest": "$TC actions list action tunnel_key",
882 "verifyCmd": "$TC actions list action tunnel_key",
883 "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",
886 "$TC actions flush action tunnel_key"
891 "name": "Flush all existing tunnel_key actions",
898 "$TC actions flush action tunnel_key",
903 "$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",
904 "$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",
905 "$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",
906 "$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"
908 "cmdUnderTest": "$TC actions flush action tunnel_key",
910 "verifyCmd": "$TC actions list action tunnel_key",
911 "matchPattern": "action order [0-9]+:.*",
914 "$TC actions flush action tunnel_key"