dpaa2-eth: trim debugfs FQ stats
authorIoana Radulescu <ruxandra.radulescu@nxp.com>
Wed, 24 Jun 2020 11:34:17 +0000 (14:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2020 23:03:39 +0000 (16:03 -0700)
With the addition of multiple traffic classes support, the number
of available frame queues grew significantly, overly inflating the
debugfs FQ statistics entry. Update it to only show the queues
which are actually in use (i.e. have a non-zero frame counter).

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c

index c453a23045c11cf83b2c3e8dc476332e44608119..2880ca02d7e78442cff8a3e039816b3d46cae487 100644 (file)
@@ -90,6 +90,10 @@ static int dpaa2_dbg_fqs_show(struct seq_file *file, void *offset)
                if (err)
                        fcnt = 0;
 
+               /* Skip FQs with no traffic */
+               if (!fq->stats.frames && !fcnt)
+                       continue;
+
                seq_printf(file, "%5d%16d%16d%16s%16llu%16u\n",
                           fq->fqid,
                           fq->target_cpu,