Skip to content

Commit a8fad54

Browse files
Roman Mashakdavem330
authored andcommitted
tc-testing: updated pedit TDC tests
Added test cases for IP header operations: - set tos/precedence - add value to tos/precedence - clear tos/precedence - invert tos/precedence Signed-off-by: Roman Mashak <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7170deb commit a8fad54

File tree

1 file changed

+200
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/actions

1 file changed

+200
-0
lines changed

tools/testing/selftests/tc-testing/tc-tests/actions/pedit.json

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,206 @@
846846
"$TC actions flush action pedit"
847847
]
848848
},
849+
{
850+
"id": "cc8a",
851+
"name": "Add pedit action with LAYERED_OP ip set tos",
852+
"category": [
853+
"actions",
854+
"pedit",
855+
"layered_op"
856+
],
857+
"setup": [
858+
[
859+
"$TC actions flush action pedit",
860+
0,
861+
1,
862+
255
863+
]
864+
],
865+
"cmdUnderTest": "$TC actions add action pedit munge ip tos set 0x4 continue",
866+
"expExitCode": "0",
867+
"verifyCmd": "$TC actions list action pedit",
868+
"matchPattern": "action order [0-9]+: pedit action continue keys 1.*key #0 at 0: val 00040000 mask ff00ffff",
869+
"matchCount": "1",
870+
"teardown": [
871+
"$TC actions flush action pedit"
872+
]
873+
},
874+
{
875+
"id": "7a17",
876+
"name": "Add pedit action with LAYERED_OP ip set precedence",
877+
"category": [
878+
"actions",
879+
"pedit",
880+
"layered_op"
881+
],
882+
"setup": [
883+
[
884+
"$TC actions flush action pedit",
885+
0,
886+
1,
887+
255
888+
]
889+
],
890+
"cmdUnderTest": "$TC actions add action pedit munge ip precedence set 3 jump 2",
891+
"expExitCode": "0",
892+
"verifyCmd": "$TC actions list action pedit",
893+
"matchPattern": "action order [0-9]+: pedit action jump 2 keys 1.*key #0 at 0: val 00030000 mask ff00ffff",
894+
"matchCount": "1",
895+
"teardown": [
896+
"$TC actions flush action pedit"
897+
]
898+
},
899+
{
900+
"id": "c3b6",
901+
"name": "Add pedit action with LAYERED_OP ip add tos",
902+
"category": [
903+
"actions",
904+
"pedit",
905+
"layered_op"
906+
],
907+
"setup": [
908+
[
909+
"$TC actions flush action pedit",
910+
0,
911+
1,
912+
255
913+
]
914+
],
915+
"cmdUnderTest": "$TC actions add action pedit ex munge ip tos add 0x1 pass",
916+
"expExitCode": "0",
917+
"verifyCmd": "$TC actions list action pedit",
918+
"matchPattern": "action order [0-9]+: pedit action pass keys 1.*key #0 at ipv4\\+0: val 00010000 mask ff00ffff",
919+
"matchCount": "1",
920+
"teardown": [
921+
"$TC actions flush action pedit"
922+
]
923+
},
924+
{
925+
"id": "43d3",
926+
"name": "Add pedit action with LAYERED_OP ip add precedence",
927+
"category": [
928+
"actions",
929+
"pedit",
930+
"layered_op"
931+
],
932+
"setup": [
933+
[
934+
"$TC actions flush action pedit",
935+
0,
936+
1,
937+
255
938+
]
939+
],
940+
"cmdUnderTest": "$TC actions add action pedit ex munge ip precedence add 0x1 pipe",
941+
"expExitCode": "0",
942+
"verifyCmd": "$TC actions list action pedit",
943+
"matchPattern": "action order [0-9]+: pedit action pipe keys 1.*key #0 at ipv4\\+0: val 00010000 mask ff00ffff",
944+
"matchCount": "1",
945+
"teardown": [
946+
"$TC actions flush action pedit"
947+
]
948+
},
949+
{
950+
"id": "438e",
951+
"name": "Add pedit action with LAYERED_OP ip clear tos",
952+
"category": [
953+
"actions",
954+
"pedit",
955+
"layered_op"
956+
],
957+
"setup": [
958+
[
959+
"$TC actions flush action pedit",
960+
0,
961+
1,
962+
255
963+
]
964+
],
965+
"cmdUnderTest": "$TC actions add action pedit munge ip tos clear continue",
966+
"expExitCode": "0",
967+
"verifyCmd": "$TC actions list action pedit",
968+
"matchPattern": "action order [0-9]+: pedit action continue keys 1.*key #0 at 0: val 00000000 mask ff00ffff",
969+
"matchCount": "1",
970+
"teardown": [
971+
"$TC actions flush action pedit"
972+
]
973+
},
974+
{
975+
"id": "6b1b",
976+
"name": "Add pedit action with LAYERED_OP ip clear precedence",
977+
"category": [
978+
"actions",
979+
"pedit",
980+
"layered_op"
981+
],
982+
"setup": [
983+
[
984+
"$TC actions flush action pedit",
985+
0,
986+
1,
987+
255
988+
]
989+
],
990+
"cmdUnderTest": "$TC actions add action pedit munge ip precedence clear jump 2",
991+
"expExitCode": "0",
992+
"verifyCmd": "$TC actions list action pedit",
993+
"matchPattern": "action order [0-9]+: pedit action jump 2 keys 1.*key #0 at 0: val 00000000 mask ff00ffff",
994+
"matchCount": "1",
995+
"teardown": [
996+
"$TC actions flush action pedit"
997+
]
998+
},
999+
{
1000+
"id": "824a",
1001+
"name": "Add pedit action with LAYERED_OP ip invert tos",
1002+
"category": [
1003+
"actions",
1004+
"pedit",
1005+
"layered_op"
1006+
],
1007+
"setup": [
1008+
[
1009+
"$TC actions flush action pedit",
1010+
0,
1011+
1,
1012+
255
1013+
]
1014+
],
1015+
"cmdUnderTest": "$TC actions add action pedit munge ip tos invert pipe",
1016+
"expExitCode": "0",
1017+
"verifyCmd": "$TC actions list action pedit",
1018+
"matchPattern": "action order [0-9]+: pedit action pipe keys 1.*key #0 at 0: val 00ff0000 mask ffffffff",
1019+
"matchCount": "1",
1020+
"teardown": [
1021+
"$TC actions flush action pedit"
1022+
]
1023+
},
1024+
{
1025+
"id": "106f",
1026+
"name": "Add pedit action with LAYERED_OP ip invert precedence",
1027+
"category": [
1028+
"actions",
1029+
"pedit",
1030+
"layered_op"
1031+
],
1032+
"setup": [
1033+
[
1034+
"$TC actions flush action pedit",
1035+
0,
1036+
1,
1037+
255
1038+
]
1039+
],
1040+
"cmdUnderTest": "$TC actions add action pedit munge ip precedence invert reclassify",
1041+
"expExitCode": "0",
1042+
"verifyCmd": "$TC actions list action pedit",
1043+
"matchPattern": "action order [0-9]+: pedit action reclassify keys 1.*key #0 at 0: val 00ff0000 mask ffffffff",
1044+
"matchCount": "1",
1045+
"teardown": [
1046+
"$TC actions flush action pedit"
1047+
]
1048+
},
8491049
{
8501050
"id": "6829",
8511051
"name": "Add pedit action with LAYERED_OP beyond ip set dport & sport",

0 commit comments

Comments
 (0)