common/cnxk: add CN10K specific xstats
Add cn10k specific Rx xstats of bandwidth profile, CPT and IPsec counters. Signed-off-by: Rahul Bhansali <rbhansali@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
parent
49e8797619
commit
8fbad405c2
@ -419,6 +419,7 @@
|
||||
#define NIX_STAT_LF_RX_RX_RC_OCTS_DROP (0x16ull) /* [CN10K, .) */
|
||||
#define NIX_STAT_LF_RX_RX_RC_PKTS_DROP (0x17ull) /* [CN10K, .) */
|
||||
#define NIX_STAT_LF_RX_RX_CPT_DROP_PKTS (0x18ull) /* [CN10K, .) */
|
||||
#define NIX_STAT_LF_RX_RX_IPSECD_DROP_PKTS (0x19ull) /* [CN10K, .) */
|
||||
|
||||
#define CGX_RX_PKT_CNT (0x0ull) /* [CN9K, CN10K) */
|
||||
#define CGX_RX_OCT_CNT (0x1ull) /* [CN9K, CN10K) */
|
||||
|
@ -353,6 +353,13 @@ roc_nix_xstats_get(struct roc_nix *roc_nix, struct roc_nix_xstat *xstats,
|
||||
xstats[count].id = count;
|
||||
count++;
|
||||
}
|
||||
|
||||
for (i = 0; i < CNXK_NIX_NUM_CN10K_RX_XSTATS; i++) {
|
||||
xstats[count].value =
|
||||
NIX_RX_STATS(nix_cn10k_rx_xstats[i].offset);
|
||||
xstats[count].id = count;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
@ -422,6 +429,13 @@ roc_nix_xstats_names_get(struct roc_nix *roc_nix,
|
||||
nix_tx_xstats_rpm[i].name);
|
||||
count++;
|
||||
}
|
||||
|
||||
for (i = 0; i < CNXK_NIX_NUM_CN10K_RX_XSTATS; i++) {
|
||||
snprintf(xstats_names[count].name,
|
||||
sizeof(xstats_names[count].name), "%s",
|
||||
nix_cn10k_rx_xstats[i].name);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,23 @@ static const struct cnxk_nix_xstats_name nix_rx_xstats[] = {
|
||||
{"rx_drp_l3mcast", NIX_STAT_LF_RX_RX_DRP_L3MCAST},
|
||||
};
|
||||
|
||||
static const struct cnxk_nix_xstats_name nix_cn10k_rx_xstats[] = {
|
||||
{"rx_gc_octs_pass", NIX_STAT_LF_RX_RX_GC_OCTS_PASSED},
|
||||
{"rx_gc_pkts_pass", NIX_STAT_LF_RX_RX_GC_PKTS_PASSED},
|
||||
{"rx_yc_octs_pass", NIX_STAT_LF_RX_RX_YC_OCTS_PASSED},
|
||||
{"rx_yc_pkts_pass", NIX_STAT_LF_RX_RX_YC_PKTS_PASSED},
|
||||
{"rx_rc_octs_pass", NIX_STAT_LF_RX_RX_RC_OCTS_PASSED},
|
||||
{"rx_rc_pkts_pass", NIX_STAT_LF_RX_RX_RC_PKTS_PASSED},
|
||||
{"rx_gc_octs_drop", NIX_STAT_LF_RX_RX_GC_OCTS_DROP},
|
||||
{"rx_gc_pkts_drop", NIX_STAT_LF_RX_RX_GC_PKTS_DROP},
|
||||
{"rx_yc_octs_drop", NIX_STAT_LF_RX_RX_YC_OCTS_DROP},
|
||||
{"rx_yc_pkts_drop", NIX_STAT_LF_RX_RX_YC_PKTS_DROP},
|
||||
{"rx_rc_octs_drop", NIX_STAT_LF_RX_RX_RC_OCTS_DROP},
|
||||
{"rx_rc_pkts_drop", NIX_STAT_LF_RX_RX_RC_PKTS_DROP},
|
||||
{"rx_cpt_pkts_drop", NIX_STAT_LF_RX_RX_CPT_DROP_PKTS},
|
||||
{"rx_ipsecd_pkts_drop", NIX_STAT_LF_RX_RX_IPSECD_DROP_PKTS},
|
||||
};
|
||||
|
||||
static const struct cnxk_nix_xstats_name nix_q_xstats[] = {
|
||||
{"rq_op_re_pkts", NIX_LF_RQ_OP_RE_PKTS},
|
||||
};
|
||||
@ -173,6 +190,7 @@ static const struct cnxk_nix_xstats_name nix_tx_xstats_cgx[] = {
|
||||
#define CNXK_NIX_NUM_TX_XSTATS_CGX PLT_DIM(nix_tx_xstats_cgx)
|
||||
#define CNXK_NIX_NUM_RX_XSTATS_RPM PLT_DIM(nix_rx_xstats_rpm)
|
||||
#define CNXK_NIX_NUM_TX_XSTATS_RPM PLT_DIM(nix_tx_xstats_rpm)
|
||||
#define CNXK_NIX_NUM_CN10K_RX_XSTATS PLT_DIM(nix_cn10k_rx_xstats)
|
||||
|
||||
#define CNXK_NIX_NUM_XSTATS_REG \
|
||||
(CNXK_NIX_NUM_RX_XSTATS + CNXK_NIX_NUM_TX_XSTATS + \
|
||||
@ -182,7 +200,7 @@ static const struct cnxk_nix_xstats_name nix_tx_xstats_cgx[] = {
|
||||
CNXK_NIX_NUM_TX_XSTATS_CGX)
|
||||
#define CNXK_NIX_NUM_XSTATS_RPM \
|
||||
(CNXK_NIX_NUM_XSTATS_REG + CNXK_NIX_NUM_RX_XSTATS_RPM + \
|
||||
CNXK_NIX_NUM_TX_XSTATS_RPM)
|
||||
CNXK_NIX_NUM_TX_XSTATS_RPM + CNXK_NIX_NUM_CN10K_RX_XSTATS)
|
||||
|
||||
static inline uint64_t
|
||||
roc_nix_num_rx_xstats(void)
|
||||
|
Loading…
Reference in New Issue
Block a user