net/mlx5: add representor specific statistics
authorShahaf Shuler <shahafs@mellanox.com>
Sun, 7 Oct 2018 12:55:25 +0000 (15:55 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 11 Oct 2018 16:56:02 +0000 (18:56 +0200)
Representor ports has a different set of extended statistics (as those are
logical ports which cannot count all that the PF can).

Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
drivers/net/mlx5/mlx5_stats.c

index 9b89b9b..f24c736 100644 (file)
@@ -107,6 +107,23 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
                .dpdk_name = "rx_bytes_phy",
                .ctr_name = "rx_bytes_phy",
        },
+       /* Representor only */
+       {
+               .dpdk_name = "rx_packets",
+               .ctr_name = "vport_rx_packets",
+       },
+       {
+               .dpdk_name = "rx_bytes",
+               .ctr_name = "vport_rx_bytes",
+       },
+       {
+               .dpdk_name = "tx_packets",
+               .ctr_name = "vport_tx_packets",
+       },
+       {
+               .dpdk_name = "tx_bytes",
+               .ctr_name = "vport_tx_bytes",
+       },
 };
 
 static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);