octeontx2-af: Add debugfs support to dump NIX TM topology
PATCH v3 1/1 octeontx2-af: Add debugfs support to dump NIX TM topology
This patch adds support to dump NIX transmit queue topology. There are multiple levels of scheduling/shaping supported by NIX and a packet traverses through multiple levels before sending the packet out. At each level, there are set of scheduling/shaping rules applied to a packet flow.
Each packet traverses through multiple levels SQ->SMQ->TL4->TL3->TL2->TL1 and these levels are mapped in a parent-child relationship.
This patch dumps the debug information related to all TM Levels in the following way.
Example:
$ echo <nixlf> > /sys/kernel/debug/octeontx2/nix/tm_tree $ cat /sys/kernel/debug/octeontx2/nix/tm_tree
A more desriptive set of registers at each level can be dumped in the following way.
Example:
$ echo <nixlf> > /sys/kernel/debug/octeontx2/nix/tm_topo $ cat /sys/kernel/debug/octeontx2/nix/tm_topo
---
v3:
- Addressed review comments given by Wojciech Drewek
1. Removed unnecessary goto statement
2. Moved valid SQ check before AF mbox
v2:
- Addressed review comments given by Simon Horman
1. Resolved indentation issues
.../net/ethernet/marvell/octeontx2/af/rvu.h | 1 + .../marvell/octeontx2/af/rvu_debugfs.c | 365 ++++++++++++++++++ .../ethernet/marvell/octeontx2/af/rvu_reg.h | 7 + 3 files changed, 373 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 -0
@@ -76,6 +76,7 @@ struct rvu_debugfs {struct dump_ctx nix_cq_ctx;struct dump_ctx nix_rq_ctx;struct dump_ctx nix_sq_ctx; +struct dump_ctx nix_tm_ctx;struct cpt_ctx cpt_ctx[MAX_CPT_BLKS ];int npa_qsize_id;int nix_qsize_id;
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +365 -0
377 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h +7 -0
@@ -429,6 +429,8 @@#define NIX_AF_RX_ACTIVE_CYCLES_PCX (a) (0x4800 | (a) << 16)#define NIX_AF_LINKX_CFG (a) (0x4010 | (a) << 17)#define NIX_AF_MDQX_IN_MD_COUNT (a) (0x14e0 | (a) << 16) +#define NIX_AF_SMQX_STATUS (a) (0x730 | (a) << 16) +#define NIX_AF_MDQX_OUT_MD_COUNT (a) (0xdb0 | (a) << 16)#define NIX_PRIV_AF_INT_CFG (0x8000000)#define NIX_PRIV_LFX_CFG (0x8000010)
@@ -442,6 +444,11 @@#define NIX_CONST_MAX_BPIDS GENMASK_ULL(23, 12)#define NIX_CONST_SDP_CHANS GENMASK_ULL(11, 0) +#define NIX_AF_MDQ_PARENT_MASK GENMASK_ULL(24, 16) +#define NIX_AF_TL4_PARENT_MASK GENMASK_ULL(23, 16) +#define NIX_AF_TL3_PARENT_MASK GENMASK_ULL(23, 16) +#define NIX_AF_TL2_PARENT_MASK GENMASK_ULL(20, 16) +/* SSO */ #define SSO_AF_CONST (0x1000)#define SSO_AF_CONST1 (0x1008)
Signature · 1 line
2.39.0.198.ga38d39a4c5
Quoted 20 lines · Anshumali Gaur
This patch adds support to dump NIX transmit queue topology. There are multiple levels of scheduling/shaping supported by NIX and a packet traverses through multiple levels before sending the packet out. At each level, there are set of scheduling/shaping rules applied to a packet flow.
Each packet traverses through multiple levels
SQ->SMQ->TL4->TL3->TL2->TL1and these levels are mapped in a parent-child relationship.This patch dumps the debug information related to all TM Levels in the following way.
Example:
$ echo <nixlf> > /sys/kernel/debug/octeontx2/nix/tm_tree $ cat /sys/kernel/debug/octeontx2/nix/tm_treeA more desriptive set of registers at each level can be dumped in the following way.
Quoted 6 lines
Example:
$ echo <nixlf> > /sys/kernel/debug/octeontx2/nix/tm_topo $ cat /sys/kernel/debug/octeontx2/nix/tm_topoSigned-off-by Anshumali Gaur <[email protected]>---
Thx,
Quoted 13 lines
v3:
- Addressed review comments given by Wojciech Drewek
1. Removed unnecessary goto statement
2. Moved valid SQ check before AF mbox
v2:
- Addressed review comments given by Simon Horman
1. Resolved indentation issues.../net/ethernet/marvell/octeontx2/af/rvu.h | 1 + .../marvell/octeontx2/af/rvu_debugfs.c | 365 ++++++++++++++++++ .../ethernet/marvell/octeontx2/af/rvu_reg.h | 7 + 3 files changed, 373 insertions(+)
<...>
Quoted 25 lines · Anshumali Gaur
This patch adds support to dump NIX transmit queue topology. There are multiple levels of scheduling/shaping supported by NIX and a packet traverses through multiple levels before sending the packet out. At each level, there are set of scheduling/shaping rules applied to a packet flow.
Each packet traverses through multiple levels
SQ->SMQ->TL4->TL3->TL2->TL1and these levels are mapped in a parent-child relationship.This patch dumps the debug information related to all TM Levels in the following way.
Example:
$ echo <nixlf> > /sys/kernel/debug/octeontx2/nix/tm_tree $ cat /sys/kernel/debug/octeontx2/nix/tm_treeA more desriptive set of registers at each level can be dumped in the following way.
Example:
$ echo <nixlf> > /sys/kernel/debug/octeontx2/nix/tm_topo $ cat /sys/kernel/debug/octeontx2/nix/tm_topoSigned-off-by Anshumali Gaur <[email protected]>
Quoted 8 lines
---
v3:
- Addressed review comments given by Wojciech Drewek
1. Removed unnecessary goto statement
2. Moved valid SQ check before AF mbox
v2:
- Addressed review comments given by Simon Horman
1. Resolved indentation issues
Hi Anshumali,
Thanks for the updates.
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 11 lines · On Mon, 3 Jun 2024 16:52:48 +0530 you wrote:
This patch adds support to dump NIX transmit queue topology. There are multiple levels of scheduling/shaping supported by NIX and a packet traverses through multiple levels before sending the packet out. At each level, there are set of scheduling/shaping rules applied to a packet flow.
Each packet traverses through multiple levels
SQ->SMQ->TL4->TL3->TL2->TL1and these levels are mapped in a parent-child relationship.[...]
Here is the summary with links:
- [net-next,v3] octeontx2-af: Add debugfs support to dump NIX TM topology
https://git.kernel.org/netdev/net-next/c/b907194a5d5b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html