Skip to content

Commit 2ad9ecd

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: Add counter for total num of NOP operations
A per-ring counter for NOP operations already exists. Here I add a counter that sums them up. Signed-off-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent b71ba6b commit 2ad9ecd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_stats.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static const struct counter_desc sw_stats_desc[] = {
4444
{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_tso_inner_packets) },
4545
{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_tso_inner_bytes) },
4646
{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_added_vlan_packets) },
47+
{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_nop) },
4748

4849
#ifdef CONFIG_MLX5_EN_TLS
4950
{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_tls_ooo) },
@@ -173,6 +174,7 @@ void mlx5e_grp_sw_update_stats(struct mlx5e_priv *priv)
173174
s->tx_tso_inner_packets += sq_stats->tso_inner_packets;
174175
s->tx_tso_inner_bytes += sq_stats->tso_inner_bytes;
175176
s->tx_added_vlan_packets += sq_stats->added_vlan_packets;
177+
s->tx_nop += sq_stats->nop;
176178
s->tx_queue_stopped += sq_stats->stopped;
177179
s->tx_queue_wake += sq_stats->wake;
178180
s->tx_udp_seg_rem += sq_stats->udp_seg_rem;

drivers/net/ethernet/mellanox/mlx5/core/en_stats.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ struct mlx5e_sw_stats {
6161
u64 tx_tso_inner_packets;
6262
u64 tx_tso_inner_bytes;
6363
u64 tx_added_vlan_packets;
64+
u64 tx_nop;
6465
u64 rx_lro_packets;
6566
u64 rx_lro_bytes;
6667
u64 rx_removed_vlan_packets;

0 commit comments

Comments
 (0)