net/sched: mqprio: allow offloading drivers to request queue count validation
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 4 Feb 2023 13:52:59 +0000 (15:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Feb 2023 10:06:44 +0000 (10:06 +0000)
commit19278d76915d6b28269e1af1d7b6754c16576572
treedeb96fb48b3cb4988feb369e93c8db70e084d423
parentd7045f520a74eac28d54fa96cc020c5344baea98
net/sched: mqprio: allow offloading drivers to request queue count validation

mqprio_parse_opt() proudly has a comment:

/* If hardware offload is requested we will leave it to the device
 * to either populate the queue counts itself or to validate the
 * provided queue counts.
 */

Unfortunately some device drivers did not get this memo, and don't
validate the queue counts, or populate them.

In case drivers don't want to populate the queue counts themselves, just
act upon the requested configuration, it makes sense to introduce a tc
capability, and make mqprio query it, so they don't have to do the
validation themselves.

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>
include/net/pkt_sched.h
net/sched/sch_mqprio.c