Skip to content

Commit

Permalink
selftests: net: Adapt ethtool mq tests to fix in qdisc graft
Browse files Browse the repository at this point in the history
Because of patch[1] the graft behaviour changed

So the command:

tcq replace parent 100:1 handle 204:

Is no longer valid and will not delete 100:4 added by command:

tcq replace parent 100:4 handle 204: pfifo_fast

So to maintain the original behaviour, this patch manually deletes 100:4
and grafts 100:1

Note: This change will also work fine without [1]

[1] https://lore.kernel.org/netdev/20250111151455.75480-1-jhs@mojatatu.com/T/#u

Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Victor Nogueira authored and David S. Miller committed Jan 15, 2025
1 parent 001ba09 commit 0a5b8ff
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ for root in mq mqprio; do
ethtool -L $NDEV combined 4
n_child_assert 4 "One real queue, rest default"

# Graft some
tcq replace parent 100:1 handle 204:
n_child_assert 3 "Grafted"
# Remove real one
tcq del parent 100:4 handle 204:

# Replace default with pfifo
tcq replace parent 100:1 handle 205: pfifo limit 1000
n_child_assert 3 "Deleting real one, replacing default one with pfifo"

ethtool -L $NDEV combined 1
n_child_assert 1 "Grafted, one"
Expand Down

0 comments on commit 0a5b8ff

Please sign in to comment.