OSDN Git Service

net/sched: mqprio: add extack messages for queue count validation
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 4 Feb 2023 13:53:00 +0000 (15:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Feb 2023 10:06:44 +0000 (10:06 +0000)
commitd404959fa23a6fc79ba3989f0491a1e747e30532
tree1332397375b9def70c00bcaed95e0fe1081852e5
parent19278d76915d6b28269e1af1d7b6754c16576572
net/sched: mqprio: add extack messages for queue count validation

To make mqprio more user-friendly, create netlink extended ack messages
which say exactly what is wrong about the queue counts. This uses the
new support for printf-formatted extack messages.

Example:

$ tc qdisc add dev eno0 root handle 1: mqprio num_tc 8 \
map 0 1 2 3 4 5 6 7 queues 3@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0
Error: sch_mqprio: TC 0 queues 3@0 overlap with TC 1 queues 1@1.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_mqprio.c