Date: Thu, 16 May 2019 18:02:09 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r347851 - stable/11/sys/dev/mlx5/mlx5_en Message-ID: <201905161802.x4GI29Ms026091@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 16 18:02:09 2019 New Revision: 347851 URL: https://svnweb.freebsd.org/changeset/base/347851 Log: MFC r347295: Let rx_out_of_buffer be a 32-bit counter in mlx5en(4). This fixes counting issues when the firmware resets the counter during allocation of the counter set where the counter belongs. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Thu May 16 18:01:23 2019 (r347850) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Thu May 16 18:02:09 2019 (r347851) @@ -194,7 +194,6 @@ struct mlx5e_vport_stats { struct sysctl_ctx_list ctx; u64 arg [0]; MLX5E_VPORT_STATS(MLX5E_STATS_VAR) - u32 rx_out_of_buffer_prev; }; #define MLX5E_PPORT_IEEE802_3_STATS(m) \ Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu May 16 18:01:23 2019 (r347850) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu May 16 18:02:09 2019 (r347851) @@ -593,10 +593,7 @@ mlx5e_update_stats_locked(struct mlx5e_priv *priv) if (test_bit(MLX5E_STATE_OPENED, &priv->state) != 0 && mlx5_vport_query_out_of_rx_buffer(mdev, priv->counter_set_id, &rx_out_of_buffer) == 0) { - /* accumulate difference into a 64-bit counter */ - s->rx_out_of_buffer += (u64)(u32)(rx_out_of_buffer - - s->rx_out_of_buffer_prev); - s->rx_out_of_buffer_prev = rx_out_of_buffer; + s->rx_out_of_buffer = rx_out_of_buffer; } /* get port statistics */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161802.x4GI29Ms026091>