]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/mlx5e: Add discard counters per priority
authorAharon Landau <aharonl@mellanox.com>
Mon, 16 Dec 2019 10:50:13 +0000 (12:50 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 16 Jan 2020 22:11:33 +0000 (14:11 -0800)
Add counters that count (per priority) the number of received
packets that dropped due to lack of buffers on a physical port. If
this counter is increasing, it implies that the adapter is
congested and cannot absorb the traffic coming from the network.

Signed-off-by: Aharon Landau <aharonl@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
include/linux/mlx5/mlx5_ifc.h

index 9f09253f9f466c3c044e42cb69fbc242f35d1eb7..33081b7edbf364ffee22a21b0b8aa44252666abd 100644 (file)
@@ -1130,6 +1130,7 @@ static void mlx5e_grp_per_port_buffer_congest_update_stats(struct mlx5e_priv *pr
 static const struct counter_desc pport_per_prio_traffic_stats_desc[] = {
        { "rx_prio%d_bytes", PPORT_PER_PRIO_OFF(rx_octets) },
        { "rx_prio%d_packets", PPORT_PER_PRIO_OFF(rx_frames) },
+       { "rx_prio%d_discards", PPORT_PER_PRIO_OFF(rx_discards) },
        { "tx_prio%d_bytes", PPORT_PER_PRIO_OFF(tx_octets) },
        { "tx_prio%d_packets", PPORT_PER_PRIO_OFF(tx_frames) },
 };
index 2ab4562b485115bd27bd4575a9658b8be5d0e4e6..ee0a34d66c7ce5ccdbe36dfea7c9953bdc6b47b2 100644 (file)
@@ -2180,7 +2180,9 @@ struct mlx5_ifc_eth_per_prio_grp_data_layout_bits {
 
        u8         rx_pause_transition_low[0x20];
 
-       u8         reserved_at_3c0[0x40];
+       u8         rx_discards_high[0x20];
+
+       u8         rx_discards_low[0x20];
 
        u8         device_stall_minor_watermark_cnt_high[0x20];