Commit a8fad545 authored by Roman Mashak's avatar Roman Mashak Committed by David S. Miller

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: default avatarRoman Mashak <mrv@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7170debe
......@@ -846,6 +846,206 @@
"$TC actions flush action pedit"
]
},
{
"id": "cc8a",
"name": "Add pedit action with LAYERED_OP ip set tos",
"category": [
"actions",
"pedit",
"layered_op"
],
"setup": [
[
"$TC actions flush action pedit",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action pedit munge ip tos set 0x4 continue",
"expExitCode": "0",
"verifyCmd": "$TC actions list action pedit",
"matchPattern": "action order [0-9]+: pedit action continue keys 1.*key #0 at 0: val 00040000 mask ff00ffff",
"matchCount": "1",
"teardown": [
"$TC actions flush action pedit"
]
},
{
"id": "7a17",
"name": "Add pedit action with LAYERED_OP ip set precedence",
"category": [
"actions",
"pedit",
"layered_op"
],
"setup": [
[
"$TC actions flush action pedit",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action pedit munge ip precedence set 3 jump 2",
"expExitCode": "0",
"verifyCmd": "$TC actions list action pedit",
"matchPattern": "action order [0-9]+: pedit action jump 2 keys 1.*key #0 at 0: val 00030000 mask ff00ffff",
"matchCount": "1",
"teardown": [
"$TC actions flush action pedit"
]
},
{
"id": "c3b6",
"name": "Add pedit action with LAYERED_OP ip add tos",
"category": [
"actions",
"pedit",
"layered_op"
],
"setup": [
[
"$TC actions flush action pedit",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action pedit ex munge ip tos add 0x1 pass",
"expExitCode": "0",
"verifyCmd": "$TC actions list action pedit",
"matchPattern": "action order [0-9]+: pedit action pass keys 1.*key #0 at ipv4\\+0: val 00010000 mask ff00ffff",
"matchCount": "1",
"teardown": [
"$TC actions flush action pedit"
]
},
{
"id": "43d3",
"name": "Add pedit action with LAYERED_OP ip add precedence",
"category": [
"actions",
"pedit",
"layered_op"
],
"setup": [
[
"$TC actions flush action pedit",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action pedit ex munge ip precedence add 0x1 pipe",
"expExitCode": "0",
"verifyCmd": "$TC actions list action pedit",
"matchPattern": "action order [0-9]+: pedit action pipe keys 1.*key #0 at ipv4\\+0: val 00010000 mask ff00ffff",
"matchCount": "1",
"teardown": [
"$TC actions flush action pedit"
]
},
{
"id": "438e",
"name": "Add pedit action with LAYERED_OP ip clear tos",
"category": [
"actions",
"pedit",
"layered_op"
],
"setup": [
[
"$TC actions flush action pedit",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action pedit munge ip tos clear continue",
"expExitCode": "0",
"verifyCmd": "$TC actions list action pedit",
"matchPattern": "action order [0-9]+: pedit action continue keys 1.*key #0 at 0: val 00000000 mask ff00ffff",
"matchCount": "1",
"teardown": [
"$TC actions flush action pedit"
]
},
{
"id": "6b1b",
"name": "Add pedit action with LAYERED_OP ip clear precedence",
"category": [
"actions",
"pedit",
"layered_op"
],
"setup": [
[
"$TC actions flush action pedit",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action pedit munge ip precedence clear jump 2",
"expExitCode": "0",
"verifyCmd": "$TC actions list action pedit",
"matchPattern": "action order [0-9]+: pedit action jump 2 keys 1.*key #0 at 0: val 00000000 mask ff00ffff",
"matchCount": "1",
"teardown": [
"$TC actions flush action pedit"
]
},
{
"id": "824a",
"name": "Add pedit action with LAYERED_OP ip invert tos",
"category": [
"actions",
"pedit",
"layered_op"
],
"setup": [
[
"$TC actions flush action pedit",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action pedit munge ip tos invert pipe",
"expExitCode": "0",
"verifyCmd": "$TC actions list action pedit",
"matchPattern": "action order [0-9]+: pedit action pipe keys 1.*key #0 at 0: val 00ff0000 mask ffffffff",
"matchCount": "1",
"teardown": [
"$TC actions flush action pedit"
]
},
{
"id": "106f",
"name": "Add pedit action with LAYERED_OP ip invert precedence",
"category": [
"actions",
"pedit",
"layered_op"
],
"setup": [
[
"$TC actions flush action pedit",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action pedit munge ip precedence invert reclassify",
"expExitCode": "0",
"verifyCmd": "$TC actions list action pedit",
"matchPattern": "action order [0-9]+: pedit action reclassify keys 1.*key #0 at 0: val 00ff0000 mask ffffffff",
"matchCount": "1",
"teardown": [
"$TC actions flush action pedit"
]
},
{
"id": "6829",
"name": "Add pedit action with LAYERED_OP beyond ip set dport & sport",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment