b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From 2b19aa3f602c9d9d71959c6306c385927fb9578c Mon Sep 17 00:00:00 2001 |
| 2 | From: Ioana Radulescu <ruxandra.radulescu@nxp.com> |
| 3 | Date: Tue, 17 Sep 2019 16:53:03 +0300 |
| 4 | Subject: [PATCH] dpaa2-eth: Trim debugfs FQ stats |
| 5 | |
| 6 | With the addition of multiple traffic classes support, the number |
| 7 | of available frame queues grew significantly, overly inflating the |
| 8 | debugfs FQ statistics entry. Update it to only show the queues |
| 9 | which are actually in use (i.e. have a non-zero frame counter). |
| 10 | |
| 11 | Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> |
| 12 | --- |
| 13 | drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c | 4 ++++ |
| 14 | 1 file changed, 4 insertions(+) |
| 15 | |
| 16 | --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c |
| 17 | +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c |
| 18 | @@ -90,6 +90,10 @@ static int dpaa2_dbg_fqs_show(struct seq |
| 19 | if (err) |
| 20 | fcnt = 0; |
| 21 | |
| 22 | + /* Skip FQs with no traffic */ |
| 23 | + if (!fq->stats.frames && !fcnt) |
| 24 | + continue; |
| 25 | + |
| 26 | seq_printf(file, "%5d%16d%16d%16s%16llu%16u\n", |
| 27 | fq->fqid, |
| 28 | fq->target_cpu, |