[net-next PATCH] octeontx2-af: Skip TM tree print for disabled SQs

Anshumali Gaur posted 1 patch 1 week, 6 days ago
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 3 +++
1 file changed, 3 insertions(+)
[net-next PATCH] octeontx2-af: Skip TM tree print for disabled SQs
Posted by Anshumali Gaur 1 week, 6 days ago
Currently, the TM tree is printing all SQ topology including those
which are not enabled, this results in redundant output for SQs
which are not active. This patch adds a check in print_tm_tree()
to skip printing the TM tree hierarchy if the SQ is not enabled.

Signed-off-by: Anshumali Gaur <agaur@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
index 7370812ece2a..15d3cb0b9da6 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
@@ -1663,6 +1663,9 @@ static void print_tm_tree(struct seq_file *m,
 	int blkaddr;
 	u64 cfg;
 
+	if (!sq_ctx->ena)
+		return;
+
 	blkaddr = nix_hw->blkaddr;
 	schq = sq_ctx->smq;
 
-- 
2.25.1
Re: [net-next PATCH] octeontx2-af: Skip TM tree print for disabled SQs
Posted by Simon Horman 1 week, 6 days ago
On Tue, Nov 18, 2025 at 11:12:34AM +0530, Anshumali Gaur wrote:
> Currently, the TM tree is printing all SQ topology including those
> which are not enabled, this results in redundant output for SQs
> which are not active. This patch adds a check in print_tm_tree()
> to skip printing the TM tree hierarchy if the SQ is not enabled.
> 
> Signed-off-by: Anshumali Gaur <agaur@marvell.com>

Thanks Anshumali,

As per my feedback on the 'net' variant of this patch,
this looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>