Skip to content

Commit

Permalink
net/bnxt: expose some missing counters in port stats
Browse files Browse the repository at this point in the history
[ upstream commit bd94753 ]

Rx/Tx Port statistics record PFC enabled frames for each priority.
Modify the Rx/Tx port stats array to report these as well.

Fixes: bfb9c22 ("net/bnxt: support xstats get/reset")

Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
skotur-brcm authored and kevintraynor committed Dec 10, 2019
1 parent c55fdd8 commit 497f7ad
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions drivers/net/bnxt/bnxt_stats.c
Expand Up @@ -80,6 +80,22 @@ static const struct bnxt_xstats_name_off bnxt_rx_stats_strings[] = {
rx_runt_bytes)},
{"rx_runt_frames", offsetof(struct rx_port_stats,
rx_runt_frames)},
{"rx_pfc_ena_frames_pri0", offsetof(struct rx_port_stats,
rx_pfc_ena_frames_pri0)},
{"rx_pfc_ena_frames_pri1", offsetof(struct rx_port_stats,
rx_pfc_ena_frames_pri1)},
{"rx_pfc_ena_frames_pri2", offsetof(struct rx_port_stats,
rx_pfc_ena_frames_pri2)},
{"rx_pfc_ena_frames_pri3", offsetof(struct rx_port_stats,
rx_pfc_ena_frames_pri3)},
{"rx_pfc_ena_frames_pri4", offsetof(struct rx_port_stats,
rx_pfc_ena_frames_pri4)},
{"rx_pfc_ena_frames_pri5", offsetof(struct rx_port_stats,
rx_pfc_ena_frames_pri5)},
{"rx_pfc_ena_frames_pri6", offsetof(struct rx_port_stats,
rx_pfc_ena_frames_pri6)},
{"rx_pfc_ena_frames_pri7", offsetof(struct rx_port_stats,
rx_pfc_ena_frames_pri7)},
};

static const struct bnxt_xstats_name_off bnxt_tx_stats_strings[] = {
Expand Down Expand Up @@ -135,6 +151,22 @@ static const struct bnxt_xstats_name_off bnxt_tx_stats_strings[] = {
tx_total_collisions)},
{"tx_bytes", offsetof(struct tx_port_stats,
tx_bytes)},
{"tx_pfc_ena_frames_pri0", offsetof(struct tx_port_stats,
tx_pfc_ena_frames_pri0)},
{"tx_pfc_ena_frames_pri1", offsetof(struct tx_port_stats,
tx_pfc_ena_frames_pri1)},
{"tx_pfc_ena_frames_pri2", offsetof(struct tx_port_stats,
tx_pfc_ena_frames_pri2)},
{"tx_pfc_ena_frames_pri3", offsetof(struct tx_port_stats,
tx_pfc_ena_frames_pri3)},
{"tx_pfc_ena_frames_pri4", offsetof(struct tx_port_stats,
tx_pfc_ena_frames_pri4)},
{"tx_pfc_ena_frames_pri5", offsetof(struct tx_port_stats,
tx_pfc_ena_frames_pri5)},
{"tx_pfc_ena_frames_pri6", offsetof(struct tx_port_stats,
tx_pfc_ena_frames_pri6)},
{"tx_pfc_ena_frames_pri7", offsetof(struct tx_port_stats,
tx_pfc_ena_frames_pri7)},
};

static const struct bnxt_xstats_name_off bnxt_func_stats_strings[] = {
Expand Down

0 comments on commit 497f7ad

Please sign in to comment.