Skip to content

Commit

Permalink
octeontx2-af: Add NPA aura and pool contexts to debugfs
Browse files Browse the repository at this point in the history
To aid in debugging NPA related issues, added support to dump
NPA (pool allocator) block LF's aura and pool hardware contexts in
debugfs. User can check which contexts are enabled currently and dump
it's current HW context.

Three new files 'qsize', 'aura_ctx', 'pool_ctx' are added to the
debugfs at 'sys/kernel/debug/octeontx2/npa/'

'echo <npalf index> > qsize' will display current enabled Aura/Pools.
'echo <npalf> [aura number/all] > aura_ctx' &
'echo <npalf> [aura number/all] > pool_ctx' will dump Aura/Pool
context info.

Signed-off-by: Christina Jacob <cjacob@marvell.com>
Signed-off-by: Prakash Brahmajyosyula <bprakash@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christina Jacob authored and David S. Miller committed Nov 15, 2019
1 parent 23205e6 commit 8756828
Show file tree
Hide file tree
Showing 3 changed files with 530 additions and 2 deletions.
12 changes: 12 additions & 0 deletions drivers/net/ethernet/marvell/octeontx2/af/rvu.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@
#define RVU_PFVF_FUNC_MASK 0x3FF

#ifdef CONFIG_DEBUG_FS
struct dump_ctx {
int lf;
int id;
bool all;
};

struct rvu_debugfs {
struct dentry *root;
struct dentry *npa;
struct dump_ctx npa_aura_ctx;
struct dump_ctx npa_pool_ctx;
int npa_qsize_id;
};
#endif

Expand Down Expand Up @@ -387,6 +397,8 @@ int rvu_mbox_handler_cgx_intlbk_disable(struct rvu *rvu, struct msg_req *req,
int rvu_npa_init(struct rvu *rvu);
void rvu_npa_freemem(struct rvu *rvu);
void rvu_npa_lf_teardown(struct rvu *rvu, u16 pcifunc, int npalf);
int rvu_npa_aq_enq_inst(struct rvu *rvu, struct npa_aq_enq_req *req,
struct npa_aq_enq_rsp *rsp);
int rvu_mbox_handler_npa_aq_enq(struct rvu *rvu,
struct npa_aq_enq_req *req,
struct npa_aq_enq_rsp *rsp);
Expand Down
Loading

0 comments on commit 8756828

Please sign in to comment.