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

tc-testing: added tests with cookie for mpls TC action

Signed-off-by: default avatarRoman Mashak <mrv@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd4b3558
...@@ -167,6 +167,54 @@ ...@@ -167,6 +167,54 @@
"$TC actions flush action mpls" "$TC actions flush action mpls"
] ]
}, },
{
"id": "09d2",
"name": "Add mpls dec_ttl action with opcode and cookie",
"category": [
"actions",
"mpls"
],
"setup": [
[
"$TC actions flush action mpls",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action mpls dec_ttl pipe index 8 cookie aabbccddeeff",
"expExitCode": "0",
"verifyCmd": "$TC actions list action mpls",
"matchPattern": "action order [0-9]+: mpls.*dec_ttl pipe.*index 8 ref.*cookie aabbccddeeff",
"matchCount": "1",
"teardown": [
"$TC actions flush action mpls"
]
},
{
"id": "c170",
"name": "Add mpls dec_ttl action with opcode and cookie of max length",
"category": [
"actions",
"mpls"
],
"setup": [
[
"$TC actions flush action mpls",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action mpls dec_ttl continue index 8 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
"expExitCode": "0",
"verifyCmd": "$TC actions list action mpls",
"matchPattern": "action order [0-9]+: mpls.*dec_ttl continue.*index 8 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
"matchCount": "1",
"teardown": [
"$TC actions flush action mpls"
]
},
{ {
"id": "9118", "id": "9118",
"name": "Add mpls dec_ttl action with invalid opcode", "name": "Add mpls dec_ttl action with invalid opcode",
...@@ -301,6 +349,30 @@ ...@@ -301,6 +349,30 @@
"$TC actions flush action mpls" "$TC actions flush action mpls"
] ]
}, },
{
"id": "91fb",
"name": "Add mpls pop action with ip proto and cookie",
"category": [
"actions",
"mpls"
],
"setup": [
[
"$TC actions flush action mpls",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 cookie 12345678",
"expExitCode": "0",
"verifyCmd": "$TC actions list action mpls",
"matchPattern": "action order [0-9]+: mpls.*pop.*protocol.*ip.*pipe.*ref 1.*cookie 12345678",
"matchCount": "1",
"teardown": [
"$TC actions flush action mpls"
]
},
{ {
"id": "92fe", "id": "92fe",
"name": "Add mpls pop action with mpls proto", "name": "Add mpls pop action with mpls proto",
...@@ -507,6 +579,30 @@ ...@@ -507,6 +579,30 @@
"$TC actions flush action mpls" "$TC actions flush action mpls"
] ]
}, },
{
"id": "7c34",
"name": "Add mpls push action with label, tc ttl and cookie of max length",
"category": [
"actions",
"mpls"
],
"setup": [
[
"$TC actions flush action mpls",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action mpls push label 20 tc 3 ttl 128 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
"expExitCode": "0",
"verifyCmd": "$TC actions list action mpls",
"matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*tc.*3.*ttl.*128.*pipe.*ref 1.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
"matchCount": "1",
"teardown": [
"$TC actions flush action mpls"
]
},
{ {
"id": "16eb", "id": "16eb",
"name": "Add mpls push action with label and bos", "name": "Add mpls push action with label and bos",
...@@ -827,6 +923,30 @@ ...@@ -827,6 +923,30 @@
"$TC actions flush action mpls" "$TC actions flush action mpls"
] ]
}, },
{
"id": "77c1",
"name": "Add mpls mod action with mpls ttl and cookie",
"category": [
"actions",
"mpls"
],
"setup": [
[
"$TC actions flush action mpls",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action mpls mod ttl 128 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
"expExitCode": "0",
"verifyCmd": "$TC actions list action mpls",
"matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*128.*pipe.*ref 1.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
"matchCount": "1",
"teardown": [
"$TC actions flush action mpls"
]
},
{ {
"id": "b80f", "id": "b80f",
"name": "Add mpls mod action with mpls max ttl", "name": "Add mpls mod action with mpls max ttl",
...@@ -1036,6 +1156,31 @@ ...@@ -1036,6 +1156,31 @@
"$TC actions flush action mpls" "$TC actions flush action mpls"
] ]
}, },
{
"id": "95a9",
"name": "Replace existing mpls push action with new label, tc, ttl and cookie",
"category": [
"actions",
"mpls"
],
"setup": [
[
"$TC actions flush action mpls",
0,
1,
255
],
"$TC actions add action mpls push label 20 tc 3 ttl 128 index 1 cookie aa11bb22cc33dd44ee55ff66aa11b1b2"
],
"cmdUnderTest": "$TC actions replace action mpls push label 30 tc 2 ttl 125 pipe index 1 cookie aa11bb22cc33",
"expExitCode": "0",
"verifyCmd": "$TC actions get action mpls index 1",
"matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*30 tc 2 ttl 125 pipe.*index 1.*cookie aa11bb22cc33",
"matchCount": "1",
"teardown": [
"$TC actions flush action mpls"
]
},
{ {
"id": "6cce", "id": "6cce",
"name": "Delete mpls pop action", "name": "Delete mpls pop action",
......
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