"name":"Add basic filter with cmp ematch u8/link layer and default action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*cmp\\(u8 at 0 layer 0 mask 0xff gt 10\\)",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"2e8a",
"name":"Add basic filter with cmp ematch u8/link layer with trans flag and default action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff trans gt 10)' classid 1:1",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*cmp\\(u8 at 0 layer 0 mask 0xff trans gt 10\\)",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"4d9f",
"name":"Add basic filter with cmp ematch u16/link layer and a single action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u16 at 0 layer 0 mask 0xff00 lt 3)' action pass",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u16 at 0 layer 0 mask 0xff00 lt 3\\).*action.*gact action pass",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"4943",
"name":"Add basic filter with cmp ematch u32/link layer and miltiple actions",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u32 at 4 layer link mask 0xff00ff00 eq 3)' action skbedit mark 7 pipe action gact drop",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"name":"Add basic filter with cmp ematch u8/transport layer and default action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer transport mask 0xff gt 10)' classid 1:1",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*cmp\\(u8 at 0 layer 2 mask 0xff gt 10\\)",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"0752",
"name":"Add basic filter with cmp ematch u8/transport layer with trans flag and default action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer transport mask 0xff trans gt 10)' classid 1:1",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*cmp\\(u8 at 0 layer 2 mask 0xff trans gt 10\\)",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"7e07",
"name":"Add basic filter with cmp ematch u16/transport layer and a single action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u16 at 0 layer 2 mask 0xff00 lt 3)' action pass",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u16 at 0 layer 2 mask 0xff00 lt 3\\).*action.*gact action pass",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"62d7",
"name":"Add basic filter with cmp ematch u32/transport layer and miltiple actions",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u32 at 4 layer transport mask 0xff00ff00 eq 3)' action skbedit mark 7 pipe action gact drop",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"name":"Add basic filter with NOT cmp ematch rule and default action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'not cmp(u8 at 0 layer link mask 0xff eq 3)' classid 1:1",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*NOT cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\)",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"8ecb",
"name":"Add basic filter with two ANDed cmp ematch rules and single action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff eq 3) and cmp(u16 at 8 layer link mask 0x00ff gt 7)' action gact drop",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\).*AND cmp\\(u16 at 8 layer 0 mask 0xff gt 7\\).*action.*gact action drop",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"b1ad",
"name":"Add basic filter with two ORed cmp ematch rules and single action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff eq 3) or cmp(u16 at 8 layer link mask 0x00ff gt 7)' action gact drop",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\).*OR cmp\\(u16 at 8 layer 0 mask 0xff gt 7\\).*action.*gact action drop",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"4600",
"name":"Add basic filter with two ANDed cmp ematch rules and one ORed ematch rule and single action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff eq 3) and cmp(u16 at 8 layer link mask 0x00ff gt 7) or cmp(u32 at 4 layer network mask 0xa0a0 lt 3)' action gact drop",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\).*AND cmp\\(u16 at 8 layer 0 mask 0xff gt 7\\).*OR cmp\\(u32 at 4 layer 1 mask 0xa0a0 lt 3\\).*action.*gact action drop",
"matchCount":"1",
"teardown":[
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id":"bc59",
"name":"Add basic filter with two ANDed cmp ematch rules and one NOT ORed ematch rule and single action",
"category":[
"filter",
"basic"
],
"setup":[
"$TC qdisc add dev $DEV1 ingress"
],
"cmdUnderTest":"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff eq 3) and cmp(u16 at 8 layer link mask 0x00ff gt 7) or not cmp(u32 at 4 layer network mask 0xa0a0 lt 3)' action gact drop",
"expExitCode":"0",
"verifyCmd":"$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
"matchPattern":"^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\).*AND cmp\\(u16 at 8 layer 0 mask 0xff gt 7\\).*OR NOT cmp\\(u32 at 4 layer 1 mask 0xa0a0 lt 3\\).*action.*gact action drop",