Skip to content

Commit 5d1271f

Browse files
vbnogueirakuba-moo
authored andcommitted
selftests/tc-testing: Add tests exercising act_ife metalist replace behaviour
Add 2 test cases to exercise fix in act_ife's internal metalist behaviour. - Update decode ife action into encode with tcindex metadata - Update decode ife action into encode with multiple metadata Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Victor Nogueira <victor@mojatatu.com> Link: https://patch.msgid.link/20260304140603.76500-2-jhs@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent e2cedd4 commit 5d1271f

File tree

1 file changed

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

1 file changed

+99
-0
lines changed

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

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,5 +1279,104 @@
12791279
"teardown": [
12801280
"$TC actions flush action ife"
12811281
]
1282+
},
1283+
{
1284+
"id": "f2a0",
1285+
"name": "Update decode ife action with encode metadata",
1286+
"category": [
1287+
"actions",
1288+
"ife"
1289+
],
1290+
"plugins": {
1291+
"requires": "nsPlugin"
1292+
},
1293+
"setup": [
1294+
[
1295+
"$TC actions flush action ife",
1296+
0,
1297+
1,
1298+
255
1299+
],
1300+
"$TC actions add action ife decode index 10"
1301+
],
1302+
"cmdUnderTest": "$TC actions replace action ife encode use tcindex 1 index 10",
1303+
"expExitCode": "0",
1304+
"verifyCmd": "$TC -j actions get action ife index 10",
1305+
"matchJSON": [
1306+
{
1307+
"total acts": 0
1308+
},
1309+
{
1310+
"actions": [
1311+
{
1312+
"order": 1,
1313+
"kind": "ife",
1314+
"mode": "encode",
1315+
"control_action": {
1316+
"type": "pipe"
1317+
},
1318+
"type": "0xed3e",
1319+
"tcindex": 1,
1320+
"index": 10,
1321+
"ref": 1,
1322+
"bind": 0,
1323+
"not_in_hw": true
1324+
}
1325+
]
1326+
}
1327+
],
1328+
"teardown": [
1329+
"$TC actions flush action ife"
1330+
]
1331+
},
1332+
{
1333+
"id": "d352",
1334+
"name": "Update decode ife action into encode with multiple metadata",
1335+
"category": [
1336+
"actions",
1337+
"ife"
1338+
],
1339+
"plugins": {
1340+
"requires": "nsPlugin"
1341+
},
1342+
"setup": [
1343+
[
1344+
"$TC actions flush action ife",
1345+
0,
1346+
1,
1347+
255
1348+
],
1349+
"$TC actions add action ife decode index 10"
1350+
],
1351+
"cmdUnderTest": "$TC actions replace action ife encode use tcindex 1 use mark 22 index 10",
1352+
"expExitCode": "0",
1353+
"verifyCmd": "$TC -j actions get action ife index 10",
1354+
"matchJSON": [
1355+
{
1356+
"total acts": 0
1357+
},
1358+
{
1359+
"actions": [
1360+
{
1361+
"order": 1,
1362+
"kind": "ife",
1363+
"mode": "encode",
1364+
"control_action": {
1365+
"type": "pipe"
1366+
},
1367+
"type": "0xed3e",
1368+
"tcindex": 1,
1369+
"mark": 22,
1370+
"index": 10,
1371+
"ref": 1,
1372+
"bind": 0,
1373+
"not_in_hw": true
1374+
}
1375+
]
1376+
}
1377+
],
1378+
"teardown": [
1379+
"$TC actions flush action ife"
1380+
]
12821381
}
12831382
]

0 commit comments

Comments
 (0)