[dpdk-dev,2/2] net/mlx5: add physical port counters

Message ID 20171129112908.29493-2-shahafs@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Shahaf Shuler Nov. 29, 2017, 11:29 a.m. UTC
  Extend the PMD extended statistics with more counters on the physical
port.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_stats.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
  

Patch

diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 5e225d374..ae55edaa4 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -122,6 +122,22 @@  static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
 		.dpdk_name = "rx_out_of_buffer",
 		.ctr_name = "out_of_buffer",
 	},
+	{
+		.dpdk_name = "tx_packets_phy",
+		.ctr_name = "tx_packets_phy",
+	},
+	{
+		.dpdk_name = "rx_packets_phy",
+		.ctr_name = "rx_packets_phy",
+	},
+	{
+		.dpdk_name = "tx_bytes_phy",
+		.ctr_name = "tx_bytes_phy",
+	},
+	{
+		.dpdk_name = "rx_bytes_phy",
+		.ctr_name = "rx_bytes_phy",
+	},
 };
 
 static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);