Commit 8756828a authored by Christina Jacob's avatar Christina Jacob Committed by David S. Miller

octeontx2-af: Add NPA aura and pool contexts to debugfs

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: default avatarChristina Jacob <cjacob@marvell.com>
Signed-off-by: default avatarPrakash Brahmajyosyula <bprakash@marvell.com>
Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 23205e6d
...@@ -36,8 +36,18 @@ ...@@ -36,8 +36,18 @@
#define RVU_PFVF_FUNC_MASK 0x3FF #define RVU_PFVF_FUNC_MASK 0x3FF
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
struct dump_ctx {
int lf;
int id;
bool all;
};
struct rvu_debugfs { struct rvu_debugfs {
struct dentry *root; struct dentry *root;
struct dentry *npa;
struct dump_ctx npa_aura_ctx;
struct dump_ctx npa_pool_ctx;
int npa_qsize_id;
}; };
#endif #endif
...@@ -387,6 +397,8 @@ int rvu_mbox_handler_cgx_intlbk_disable(struct rvu *rvu, struct msg_req *req, ...@@ -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); int rvu_npa_init(struct rvu *rvu);
void rvu_npa_freemem(struct rvu *rvu); void rvu_npa_freemem(struct rvu *rvu);
void rvu_npa_lf_teardown(struct rvu *rvu, u16 pcifunc, int npalf); 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, int rvu_mbox_handler_npa_aq_enq(struct rvu *rvu,
struct npa_aq_enq_req *req, struct npa_aq_enq_req *req,
struct npa_aq_enq_rsp *rsp); struct npa_aq_enq_rsp *rsp);
......
...@@ -52,8 +52,8 @@ static int npa_aq_enqueue_wait(struct rvu *rvu, struct rvu_block *block, ...@@ -52,8 +52,8 @@ static int npa_aq_enqueue_wait(struct rvu *rvu, struct rvu_block *block,
return 0; return 0;
} }
static int rvu_npa_aq_enq_inst(struct rvu *rvu, struct npa_aq_enq_req *req, int rvu_npa_aq_enq_inst(struct rvu *rvu, struct npa_aq_enq_req *req,
struct npa_aq_enq_rsp *rsp) struct npa_aq_enq_rsp *rsp)
{ {
struct rvu_hwinfo *hw = rvu->hw; struct rvu_hwinfo *hw = rvu->hw;
u16 pcifunc = req->hdr.pcifunc; u16 pcifunc = req->hdr.pcifunc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment