tools/testing/selftests/tc-testing/tc-tests/filters/u32.json

Source file repositories/reference/linux-study-clean/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
Extension
.json
Size
13761 bytes
Lines
358
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

[
    {
        "id": "afa9",
        "name": "Add u32 with source match",
        "category": [
            "filter",
            "u32"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$TC qdisc add dev $DEV1 ingress"
        ],
        "cmdUnderTest": "$TC filter add dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.1/32 flowid 1:1 action ok",
        "expExitCode": "0",
        "verifyCmd": "$TC filter show dev $DEV1 ingress",
        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1.*match 7f000001/ffffffff at 12)",
        "matchCount": "3",
        "teardown": [
            "$TC qdisc del dev $DEV1 ingress"
        ]
    },
    {
        "id": "6aa7",
        "name": "Add/Replace u32 with source match and invalid indev",
        "category": [
            "filter",
            "u32"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$TC qdisc add dev $DEV1 ingress"
        ],
        "cmdUnderTest": "$TC filter replace dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.1/32 indev notexist20 flowid 1:1 action ok",
        "expExitCode": "2",
        "verifyCmd": "$TC filter show dev $DEV1 ingress",
        "matchPattern": "filter protocol ip pref 1 u32 chain 0",
        "matchCount": "0",
        "teardown": [
            "$TC qdisc del dev $DEV1 ingress"
        ]
    },
    {
        "id": "bc4d",
        "name": "Replace valid u32 with source match and invalid indev",
        "category": [
            "filter",
            "u32"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$TC qdisc add dev $DEV1 ingress",
            "$TC filter add dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.3/32 flowid 1:3 action ok"
        ],
        "cmdUnderTest": "$TC filter replace dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.2/32 indev notexist20 flowid 1:2 action ok",
        "expExitCode": "2",
        "verifyCmd": "$TC filter show dev $DEV1 ingress",
        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:3.*match 7f000003/ffffffff at 12)",
        "matchCount": "3",
        "teardown": [
            "$TC qdisc del dev $DEV1 ingress"
        ]
    },
    {
        "id": "648b",

Annotation

Implementation Notes