mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-07 22:23:00 +00:00

Added new test cases for FQ, FQ_CODEL, FQ_PIE, and HHF qdiscs to verify queue trimming behavior when the qdisc limit is dynamically reduced. Each test injects packets, reduces the qdisc limit, and checks that the new limit is enforced. This is still best effort since timing qdisc backlog is not easy. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
215 lines
6.8 KiB
JSON
215 lines
6.8 KiB
JSON
[
|
|
{
|
|
"id": "4812",
|
|
"name": "Create HHF with default setting",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
],
|
|
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "8a92",
|
|
"name": "Create HHF with limit setting",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
],
|
|
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf limit 1500",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+ limit 1500p.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "3491",
|
|
"name": "Create HHF with quantum setting",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
],
|
|
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf quantum 9000",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*quantum 9000b hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "ba04",
|
|
"name": "Create HHF with reset_timeout setting",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
],
|
|
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf reset_timeout 100ms",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 100ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "4238",
|
|
"name": "Create HHF with admit_bytes setting",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
],
|
|
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf admit_bytes 100000",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 40ms admit_bytes 100000b evict_timeout 1s non_hh_weight 2",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "839f",
|
|
"name": "Create HHF with evict_timeout setting",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
],
|
|
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf evict_timeout 0.5s",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 500ms non_hh_weight 2",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "a044",
|
|
"name": "Create HHF with non_hh_weight setting",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
],
|
|
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf non_hh_weight 10",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 10",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "32f9",
|
|
"name": "Change HHF with limit setting",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
"$TC qdisc add dev $DUMMY handle 1: root hhf"
|
|
],
|
|
"cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root hhf limit 1500",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+ limit 1500p.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "385e",
|
|
"name": "Show HHF class",
|
|
"category": [
|
|
"qdisc",
|
|
"hhf"
|
|
],
|
|
"plugins": {
|
|
"requires": "nsPlugin"
|
|
},
|
|
"setup": [
|
|
],
|
|
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC class show dev $DUMMY",
|
|
"matchPattern": "class hhf 1:",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC qdisc del dev $DUMMY handle 1: root"
|
|
]
|
|
},
|
|
{
|
|
"id": "385f",
|
|
"name": "HHF test qdisc limit trimming",
|
|
"category": ["qdisc", "hhf"],
|
|
"plugins": {"requires": ["nsPlugin", "scapyPlugin"]},
|
|
"setup": [
|
|
"$TC qdisc add dev $DEV1 handle 1: root hhf limit 10"
|
|
],
|
|
"scapy": [
|
|
{
|
|
"iface": "$DEV0",
|
|
"count": 10,
|
|
"packet": "Ether(type=0x800)/IP(src='10.0.0.10',dst='10.0.0.20')/TCP(sport=5000,dport=10)"
|
|
}
|
|
],
|
|
"cmdUnderTest": "$TC qdisc change dev $DEV1 handle 1: root hhf limit 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC qdisc show dev $DEV1",
|
|
"matchPattern": "qdisc hhf 1: root refcnt [0-9]+ limit 1p.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
|
|
"matchCount": "1",
|
|
"teardown": ["$TC qdisc del dev $DEV1 handle 1: root"]
|
|
}
|
|
]
|