[10/16] net/bnxt: expose some missing counters in port statistics

Message ID 20191024055913.28817-11-somnath.kotur@broadcom.com (mailing list archive)
State Superseded, archived
Headers
Series bnxt patchset with bug fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Somnath Kotur Oct. 24, 2019, 5:59 a.m. UTC
  Rx/Tx Port statistics record PFC enabled frames for each priority.
Modify the Rx/Tx port stats array to report these as well.

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

Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_stats.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index fa29f9d..40b496a 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -81,6 +81,22 @@ 
 				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[] = {
@@ -136,6 +152,22 @@ 
 				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[] = {