Date: Thu, 16 May 2019 17:17:12 +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: r347805 - stable/11/sys/dev/mlx5/mlx5_en Message-ID: <201905161717.x4GHHC5P099136@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 16 17:17:12 2019 New Revision: 347805 URL: https://svnweb.freebsd.org/changeset/base/347805 Log: MFC r347255: Fix tx_jumbo_packets counter in mlx5en(4). Instead of reading Ethernet RFC 2819 pXtoYoctets counters from hardware which counts RX octets, count tx_stat_pXtoYoctets from Ethernet extended counters which counts TX octets. TX jumbo counters should be accumulated only after the PPCNT counters were fetched from hardware with their latest value. Submitted by: slavash@ Sponsored by: Mellanox Technologies Modified: 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/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu May 16 17:16:31 2019 (r347804) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu May 16 17:17:12 2019 (r347805) @@ -540,12 +540,6 @@ mlx5e_update_stats_work(struct work_struct *work) } } - s->tx_jumbo_packets = - priv->stats.port_stats_debug.p1519to2047octets + - priv->stats.port_stats_debug.p2048to4095octets + - priv->stats.port_stats_debug.p4096to8191octets + - priv->stats.port_stats_debug.p8192to10239octets; - /* update counters */ s->tso_packets = tso_packets; s->tso_bytes = tso_bytes; @@ -644,6 +638,12 @@ mlx5e_update_stats_work(struct work_struct *work) /* Get physical port counters */ mlx5e_update_pport_counters(priv); + + s->tx_jumbo_packets = + priv->stats.port_stats_debug.tx_stat_p1519to2047octets + + priv->stats.port_stats_debug.tx_stat_p2048to4095octets + + priv->stats.port_stats_debug.tx_stat_p4096to8191octets + + priv->stats.port_stats_debug.tx_stat_p8192to10239octets; #if (__FreeBSD_version < 1100000) /* no get_counters interface in fbsd 10 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161717.x4GHHC5P099136>