Date: Thu, 16 May 2019 15:47:33 +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-12@freebsd.org Subject: svn commit: r347719 - stable/12/sys/dev/mlx5/mlx5_en Message-ID: <201905161547.x4GFlXrA046515@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 16 15:47:33 2019 New Revision: 347719 URL: https://svnweb.freebsd.org/changeset/base/347719 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/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu May 16 15:46:50 2019 (r347718) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu May 16 15:47:33 2019 (r347719) @@ -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?201905161547.x4GFlXrA046515>