From: <psatheesh@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>, Satheesh Paul <psatheesh@marvell.com>
Subject: [dpdk-dev] [PATCH v2 2/3] common/cnxk: print counters along with flow dump
Date: Mon, 29 Aug 2022 11:54:41 +0530 [thread overview]
Message-ID: <20220829062442.49728-2-psatheesh@marvell.com> (raw)
In-Reply-To: <20220829062442.49728-1-psatheesh@marvell.com>
From: Satheesh Paul <psatheesh@marvell.com>
When dumping hardware flow data, print any counter
configured on the flow as well.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
drivers/common/cnxk/roc_npc_mcam_dump.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc_mcam_dump.c b/drivers/common/cnxk/roc_npc_mcam_dump.c
index 16997bd38a..fe57811a84 100644
--- a/drivers/common/cnxk/roc_npc_mcam_dump.c
+++ b/drivers/common/cnxk/roc_npc_mcam_dump.c
@@ -590,12 +590,19 @@ roc_npc_flow_mcam_dump(FILE *file, struct roc_npc *roc_npc,
struct npc *npc = roc_npc_to_npc_priv(roc_npc);
struct npc_mcam_read_entry_req *mcam_read_req;
struct npc_mcam_read_entry_rsp *mcam_read_rsp;
+ uint64_t count = 0;
bool is_rx = 0;
int i, rc = 0;
fprintf(file, "MCAM Index:%d\n", flow->mcam_id);
- fprintf(file, "Interface :%s (%d)\n", intf_str[flow->nix_intf],
- flow->nix_intf);
+ if (flow->ctr_id != NPC_COUNTER_NONE && flow->use_ctr) {
+ rc = roc_npc_mcam_read_counter(roc_npc, flow->ctr_id, &count);
+ if (rc)
+ return;
+ fprintf(file, "Hit count: %" PRIu64 "\n", count);
+ }
+
+ fprintf(file, "Interface :%s (%d)\n", intf_str[flow->nix_intf], flow->nix_intf);
fprintf(file, "Priority :%d\n", flow->priority);
if (flow->nix_intf == NIX_INTF_RX)
--
2.35.3
next prev parent reply other threads:[~2022-08-29 6:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 6:16 [dpdk-dev] [PATCH 1/3] common/cnxk: fix printing disabled MKEX registers psatheesh
2022-08-01 6:16 ` [dpdk-dev] [PATCH 2/3] common/cnxk: print counters along with flow dump psatheesh
2022-08-01 6:16 ` [dpdk-dev] [PATCH 3/3] common/cnxk: update MKEX capability flags psatheesh
2022-08-29 5:22 ` Jerin Jacob
2022-08-29 6:24 ` [dpdk-dev] [PATCH v2 1/3] common/cnxk: fix printing disabled MKEX registers psatheesh
2022-08-29 6:24 ` psatheesh [this message]
2022-08-29 6:24 ` [dpdk-dev] [PATCH v2 3/3] common/cnxk: update MKEX capability flags psatheesh
2022-09-19 13:30 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220829062442.49728-2-psatheesh@marvell.com \
--to=psatheesh@marvell.com \
--cc=dev@dpdk.org \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).