-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tc-testing: Add control-plane selftests for sch_mq
Recently we added multi-queue support to netdevsim in commit d4861fc ("netdevsim: Add multi-queue support"); add a few control-plane selftests for sch_mq using this new feature. Use nsPlugin.py to avoid network interface name collisions. Reviewed-by: Cong Wang <cong.wang@bytedance.com> Signed-off-by: Peilin Ye <peilin.ye@bytedance.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Peilin Ye
authored and
David S. Miller
committed
Aug 4, 2021
1 parent
a54182b
commit 625af9f
Showing
2 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
137 changes: 137 additions & 0 deletions
137
tools/testing/selftests/tc-testing/tc-tests/qdiscs/mq.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
[ | ||
{ | ||
"id": "ce7d", | ||
"name": "Add mq Qdisc to multi-queue device (4 queues)", | ||
"category": [ | ||
"qdisc", | ||
"mq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"echo \"1 1 4\" > /sys/bus/netdevsim/new_device" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: mq", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $ETH", | ||
"matchPattern": "qdisc pfifo_fast 0: parent 1:[1-4] bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1", | ||
"matchCount": "4", | ||
"teardown": [ | ||
"echo \"1\" > /sys/bus/netdevsim/del_device" | ||
] | ||
}, | ||
{ | ||
"id": "2f82", | ||
"name": "Add mq Qdisc to multi-queue device (256 queues)", | ||
"category": [ | ||
"qdisc", | ||
"mq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"echo \"1 1 256\" > /sys/bus/netdevsim/new_device" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: mq", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $ETH", | ||
"matchPattern": "qdisc pfifo_fast 0: parent 1:[1-9,a-f][0-9,a-f]{0,2} bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1", | ||
"matchCount": "256", | ||
"teardown": [ | ||
"echo \"1\" > /sys/bus/netdevsim/del_device" | ||
] | ||
}, | ||
{ | ||
"id": "c525", | ||
"name": "Add duplicate mq Qdisc", | ||
"category": [ | ||
"qdisc", | ||
"mq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"echo \"1 1 4\" > /sys/bus/netdevsim/new_device", | ||
"$TC qdisc add dev $ETH root handle 1: mq" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: mq", | ||
"expExitCode": "2", | ||
"verifyCmd": "$TC qdisc show dev $ETH", | ||
"matchPattern": "qdisc pfifo_fast 0: parent 1:[1-4] bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1", | ||
"matchCount": "4", | ||
"teardown": [ | ||
"echo \"1\" > /sys/bus/netdevsim/del_device" | ||
] | ||
}, | ||
{ | ||
"id": "128a", | ||
"name": "Delete nonexistent mq Qdisc", | ||
"category": [ | ||
"qdisc", | ||
"mq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"echo \"1 1 4\" > /sys/bus/netdevsim/new_device" | ||
], | ||
"cmdUnderTest": "$TC qdisc del dev $ETH root handle 1: mq", | ||
"expExitCode": "2", | ||
"verifyCmd": "$TC qdisc show dev $ETH", | ||
"matchPattern": "qdisc pfifo_fast 0: parent 1:[1-4] bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1", | ||
"matchCount": "0", | ||
"teardown": [ | ||
"echo \"1\" > /sys/bus/netdevsim/del_device" | ||
] | ||
}, | ||
{ | ||
"id": "03a9", | ||
"name": "Delete mq Qdisc twice", | ||
"category": [ | ||
"qdisc", | ||
"mq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"echo \"1 1 4\" > /sys/bus/netdevsim/new_device", | ||
"$TC qdisc add dev $ETH root handle 1: mq", | ||
"$TC qdisc del dev $ETH root handle 1: mq" | ||
], | ||
"cmdUnderTest": "$TC qdisc del dev $ETH root handle 1: mq", | ||
"expExitCode": "2", | ||
"verifyCmd": "$TC qdisc show dev $ETH", | ||
"matchPattern": "qdisc pfifo_fast 0: parent 1:[1-4] bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1", | ||
"matchCount": "0", | ||
"teardown": [ | ||
"echo \"1\" > /sys/bus/netdevsim/del_device" | ||
] | ||
}, | ||
{ | ||
"id": "be0f", | ||
"name": "Add mq Qdisc to single-queue device", | ||
"category": [ | ||
"qdisc", | ||
"mq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"echo \"1 1\" > /sys/bus/netdevsim/new_device" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: mq", | ||
"expExitCode": "2", | ||
"verifyCmd": "$TC qdisc show dev $ETH", | ||
"matchPattern": "qdisc pfifo_fast 0: parent 1:[1-4] bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1", | ||
"matchCount": "0", | ||
"teardown": [ | ||
"echo \"1\" > /sys/bus/netdevsim/del_device" | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters