"name":"Replace existing vlan push action with new ID",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"$TC actions add action vlan push id 500 pipe index 12"
],
"cmdUnderTest":"$TC actions replace action vlan push id 700 pipe index 12",
"expExitCode":"0",
"verifyCmd":"$TC actions get action vlan index 12",
"matchPattern":"action order [0-9]+: vlan.*push id 700 protocol 802.1Q priority 0 pipe.*index 12 ref",
"matchCount":"1",
"teardown":[
"$TC actions flush action vlan"
]
},
{
"id":"9e76",
"name":"Replace existing vlan push action with new protocol",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"$TC actions add action vlan push id 1 protocol 802.1Q pipe index 1"
],
"cmdUnderTest":"$TC actions replace action vlan push id 1 protocol 802.1ad pipe index 1",
"expExitCode":"0",
"verifyCmd":"$TC actions get action vlan index 1",
"matchPattern":"action order [0-9]+: vlan.*push id 1 protocol 802.1ad priority 0 pipe.*index 1 ref",
"matchCount":"1",
"teardown":[
"$TC actions flush action vlan"
]
},
{
"id":"ede4",
"name":"Replace existing vlan push action with new priority",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"$TC actions add action vlan push id 1 protocol 802.1Q priority 3 reclassify index 1"
],
"cmdUnderTest":"$TC actions replace action vlan push id 1 priority 4 reclassify index 1",
"expExitCode":"0",
"verifyCmd":"$TC actions get action vlan index 1",
"matchPattern":"action order [0-9]+: vlan.*push id 1 protocol 802.1Q priority 4 reclassify.*index 1 ref",
"matchCount":"1",
"teardown":[
"$TC actions flush action vlan"
]
},
{
"id":"d413",
"name":"Replace existing vlan pop action with new cookie",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"$TC actions add action vlan pop continue index 1 cookie 22334455"
],
"cmdUnderTest":"$TC actions replace action vlan pop continue index 1 cookie a1b1c2d1",
"expExitCode":"0",
"verifyCmd":"$TC actions get action vlan index 1",
"matchPattern":"action order [0-9]+: vlan.*pop continue.*index 1 ref.*cookie a1b1c2d1",
"matchCount":"1",
"teardown":[
"$TC actions flush action vlan"
]
},
{
"id":"83a4",
"name":"Delete vlan pop action",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"$TC actions add action vlan pop index 44"
],
"cmdUnderTest":"$TC actions del action vlan index 44",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"action order [0-9]+: vlan.*pop.*index 44 ref",
"matchCount":"0",
"teardown":[]
},
{
"id":"ed1e",
"name":"Delete vlan push action for protocol 802.1Q",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"$TC actions add action vlan push id 4094 protocol 802.1Q index 999"
],
"cmdUnderTest":"$TC actions del action vlan index 999",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"action order [0-9]+: vlan.*push id 4094 protocol 802.1Q priority 0 pipe.*index 999 ref",
"matchCount":"0",
"teardown":[]
},
{
"id":"a2a3",
"name":"Flush vlan actions",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"$TC actions add action vlan push id 4 protocol 802.1ad index 10",
"$TC actions add action vlan push id 4 protocol 802.1ad index 11",
"$TC actions add action vlan push id 4 protocol 802.1ad index 12",
"$TC actions add action vlan push id 4 protocol 802.1ad index 13"
],
"cmdUnderTest":"$TC actions flush action vlan",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"action order [0-9]+: vlan.*push id 4 protocol 802.1ad",
"matchCount":"0",
"teardown":[]
},
{
"id":"1d78",
"name":"Add vlan push action with cookie",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
]
],
"cmdUnderTest":"$TC actions add action vlan push id 4 cookie a0a0a0a0a0a0a0",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"action order [0-9]+: vlan.*push id 4.*cookie a0a0a0a0a0a0a0",
"matchCount":"1",
"teardown":[
"$TC actions flush action vlan"
]
},
{
"id":"e394",
"name":"Replace vlan push action with invalid goto chain control",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"$TC actions add action vlan push id 500 pass index 90"
],
"cmdUnderTest":"$TC actions replace action vlan push id 500 goto chain 42 index 90 cookie c1a0c1a0",
"expExitCode":"255",
"verifyCmd":"$TC actions get action vlan index 90",
"matchPattern":"action order [0-9]+: vlan.*push id 500 protocol 802.1Q priority 0 pass.*index 90 ref",
"matchCount":"1",
"teardown":[
"$TC actions flush action vlan"
]
},
{
"id":"294e",
"name":"Add batch of 32 vlan push actions with cookie",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
]
],
"cmdUnderTest":"bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan push protocol 802.1q id 4094 priority 7 pipe index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"^[ \t]+index [0-9]+ ref",
"matchCount":"32",
"teardown":[
"$TC actions flush action vlan"
]
},
{
"id":"56f7",
"name":"Delete batch of 32 vlan push actions",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan push protocol 802.1q id 4094 priority 7 pipe index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
],
"cmdUnderTest":"bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"^[ \t]+index [0-9]+ ref",
"matchCount":"0",
"teardown":[]
},
{
"id":"759f",
"name":"Add batch of 32 vlan pop actions with cookie",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
]
],
"cmdUnderTest":"bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan pop continue index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"^[ \t]+index [0-9]+ ref",
"matchCount":"32",
"teardown":[
"$TC actions flush action vlan"
]
},
{
"id":"c84a",
"name":"Delete batch of 32 vlan pop actions",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
],
"bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan pop index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
],
"cmdUnderTest":"bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"^[ \t]+index [0-9]+ ref",
"matchCount":"0",
"teardown":[]
},
{
"id":"1a3d",
"name":"Add vlan pop action with no_percpu flag",
"category":[
"actions",
"vlan"
],
"setup":[
[
"$TC actions flush action vlan",
0,
1,
255
]
],
"cmdUnderTest":"$TC actions add action vlan pop no_percpu",
"expExitCode":"0",
"verifyCmd":"$TC actions list action vlan",
"matchPattern":"action order [0-9]+: vlan.*pop.*no_percpu",