Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Roman Mashak and committed by
David S. Miller
c23fcbbc 23c161ee

+72
+72
tools/testing/selftests/tc-testing/tc-tests/actions/ct.json
··· 24 24 ] 25 25 }, 26 26 { 27 + "id": "e38c", 28 + "name": "Add simple ct action with cookie", 29 + "category": [ 30 + "actions", 31 + "ct" 32 + ], 33 + "setup": [ 34 + [ 35 + "$TC actions flush action ct", 36 + 0, 37 + 1, 38 + 255 39 + ] 40 + ], 41 + "cmdUnderTest": "$TC actions add action ct index 42 cookie deadbeef", 42 + "expExitCode": "0", 43 + "verifyCmd": "$TC actions list action ct", 44 + "matchPattern": "action order [0-9]*: ct zone 0 pipe.*index 42 ref.*cookie deadbeef", 45 + "matchCount": "1", 46 + "teardown": [ 47 + "$TC actions flush action ct" 48 + ] 49 + }, 50 + { 27 51 "id": "9f20", 28 52 "name": "Add ct clear action", 29 53 "category": [ ··· 66 42 "expExitCode": "0", 67 43 "verifyCmd": "$TC actions list action ct", 68 44 "matchPattern": "action order [0-9]*: ct clear pipe.*index 42 ref", 45 + "matchCount": "1", 46 + "teardown": [ 47 + "$TC actions flush action ct" 48 + ] 49 + }, 50 + { 51 + "id": "0bc1", 52 + "name": "Add ct clear action with cookie of max length", 53 + "category": [ 54 + "actions", 55 + "ct" 56 + ], 57 + "setup": [ 58 + [ 59 + "$TC actions flush action ct", 60 + 0, 61 + 1, 62 + 255 63 + ] 64 + ], 65 + "cmdUnderTest": "$TC actions add action ct clear index 42 cookie aa11bb22cc33dd44ee55ff66aa11b1b2", 66 + "expExitCode": "0", 67 + "verifyCmd": "$TC actions list action ct", 68 + "matchPattern": "action order [0-9]*: ct clear pipe.*index 42 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2", 69 69 "matchCount": "1", 70 70 "teardown": [ 71 71 "$TC actions flush action ct" ··· 354 306 "expExitCode": "0", 355 307 "verifyCmd": "$TC actions list action ct", 356 308 "matchPattern": "action order [0-9]*: ct mark 66/0xf0 zone 0 pipe.*index 42 ref", 309 + "matchCount": "1", 310 + "teardown": [ 311 + "$TC actions flush action ct" 312 + ] 313 + }, 314 + { 315 + "id": "2faa", 316 + "name": "Try ct with mark + mask and cookie", 317 + "category": [ 318 + "actions", 319 + "ct" 320 + ], 321 + "setup": [ 322 + [ 323 + "$TC actions flush action ct", 324 + 0, 325 + 1, 326 + 255 327 + ] 328 + ], 329 + "cmdUnderTest": "$TC actions add action ct mark 0x42/0xf0 index 42 cookie aa11bb22cc33dd44ee55ff66aa11b1b2", 330 + "expExitCode": "0", 331 + "verifyCmd": "$TC actions list action ct", 332 + "matchPattern": "action order [0-9]*: ct mark 66/0xf0 zone 0 pipe.*index 42 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2", 357 333 "matchCount": "1", 358 334 "teardown": [ 359 335 "$TC actions flush action ct"