summaryrefslogtreecommitdiff
path: root/net/sched/sch_taprio.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2023-06-09 16:59:16 +0300
committerDavid S. Miller <davem@davemloft.net>2023-06-12 09:43:30 +0100
commit2b84960fc5dd38a19241388fb33f20936cb217e2 (patch)
tree4ba8bdaaffeaac3c1da110fede5214671d5b6aa7 /net/sched/sch_taprio.c
parentf2ea0c3582abc721ce9e090cf496b96e6b204e2c (diff)
net/sched: taprio: report class offload stats per TXQ, not per TC
The taprio Qdisc creates child classes per netdev TX queue, but taprio_dump_class_stats() currently reports offload statistics per traffic class. Traffic classes are groups of TXQs sharing the same dequeue priority, so this is incorrect and we shouldn't be bundling up the TXQ stats when reporting them, as we currently do in enetc. Modify the API from taprio to drivers such that they report TXQ offload stats and not TC offload stats. There is no change in the UAPI or in the global Qdisc stats. Fixes: 6c1adb650c8d ("net/sched: taprio: add netlink reporting for offload statistics counters") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_taprio.c')
-rw-r--r--net/sched/sch_taprio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
index 4a4e6ff894c1..c6627f5abdfa 100644
--- a/net/sched/sch_taprio.c
+++ b/net/sched/sch_taprio.c
@@ -2458,9 +2458,9 @@ static int taprio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
{
struct netdev_queue *dev_queue = taprio_queue_get(sch, cl);
struct tc_taprio_qopt_offload offload = {
- .cmd = TAPRIO_CMD_TC_STATS,
- .tc_stats = {
- .tc = cl - 1,
+ .cmd = TAPRIO_CMD_QUEUE_STATS,
+ .queue_stats = {
+ .queue = cl - 1,
},
};
struct Qdisc *child;
@@ -2470,7 +2470,7 @@ static int taprio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
qdisc_qstats_copy(d, child) < 0)
return -1;
- return taprio_dump_xstats(sch, d, &offload, &offload.tc_stats.stats);
+ return taprio_dump_xstats(sch, d, &offload, &offload.queue_stats.stats);
}
static void taprio_walk(struct Qdisc *sch, struct qdisc_walker *arg)