|
4 | 4 |
|
5 | 5 | Configure a custom priority to traffic class map on a port with the two |
6 | 6 | lowest classes sharing 67:33 and the rest strict priority, and verify the |
7 | | -root qdisc reflects it. A driver with mqprio offload shows an offloaded |
8 | | -mqprio with the same map; otherwise the kernel runs an ets qdisc with the |
9 | | -strict bands first, the shares as quanta of one frame per percent, and |
10 | | -the priomap inverted as 802.1Q numbering requires. |
| 7 | +root qdisc reflects it: an ets qdisc with the strict bands first, the |
| 8 | +shares as quanta of one frame per percent, and the priomap inverted as |
| 9 | +802.1Q numbering requires. A driver that offloads it marks the qdisc |
| 10 | +offloaded. |
11 | 11 |
|
12 | 12 | The port's class count comes from its transmit queues, or eight for a |
13 | 13 | single-queue port. Switching the table to the ieee-sr preset must put |
@@ -69,8 +69,6 @@ def qdisc_matches(qdisc, num_tc, prio_map, strict, quanta): |
69 | 69 | if not qdisc: |
70 | 70 | return False |
71 | 71 | opts = qdisc.get("options", {}) |
72 | | - if qdisc["kind"] == "mqprio": |
73 | | - return opts.get("map", [])[:8] == prio_map |
74 | 72 | if qdisc["kind"] == "ets": |
75 | 73 | return (opts.get("bands") == num_tc and opts.get("strict") == strict |
76 | 74 | and opts.get("quanta", []) == quanta |
@@ -122,9 +120,9 @@ def qdisc_matches(qdisc, num_tc, prio_map, strict, quanta): |
122 | 120 | print(json.dumps(root_qdisc(tgtssh, port))) |
123 | 121 |
|
124 | 122 | with test.step("Verify the offload capability matches the qdisc"): |
125 | | - kind = root_qdisc(tgtssh, port)["kind"] |
| 123 | + taken = root_qdisc(tgtssh, port).get("offloaded", False) |
126 | 124 | until(lambda: ("transmission-selection" in capabilities(target, port).get("offload", [])) |
127 | | - == (kind == "mqprio")) |
| 125 | + == taken) |
128 | 126 |
|
129 | 127 | with test.step("Switch to the ieee-sr preset and verify SR classes on top"): |
130 | 128 | target.delete_xpath(qos_xpath(port, "/egress")) |
|
0 commit comments