From owner-freebsd-net@freebsd.org Wed Sep 28 13:57:03 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2EC5C00F5C for ; Wed, 28 Sep 2016 13:57:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2F96920 for ; Wed, 28 Sep 2016 13:57:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E582D1FE023; Wed, 28 Sep 2016 15:56:59 +0200 (CEST) Subject: Re: netstat counts input traffic twice To: Ben RUBSON , FreeBSD Net References: <94953762-4397-476D-AD61-A39914F27938@gmail.com> From: Hans Petter Selasky Message-ID: <6d052c64-2ca2-7839-c297-e764634be648@selasky.org> Date: Wed, 28 Sep 2016 16:01:51 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <94953762-4397-476D-AD61-A39914F27938@gmail.com> Content-Type: multipart/mixed; boundary="------------46696AE8FF0830D5F820E892" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 13:57:04 -0000 This is a multi-part message in MIME format. --------------46696AE8FF0830D5F820E892 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 09/23/16 19:59, Ben RUBSON wrote: > netstat -b -I mlxen1 Hi Ben, Does the attached patch make any difference? --HPS --------------46696AE8FF0830D5F820E892 Content-Type: text/x-patch; name="en_port.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="en_port.c.diff" Index: sys/ofed/drivers/net/mlx4/en_port.c =================================================================== --- sys/ofed/drivers/net/mlx4/en_port.c (revision 306255) +++ sys/ofed/drivers/net/mlx4/en_port.c (working copy) @@ -552,8 +552,6 @@ #if __FreeBSD_version >= 1100000 if (reset == 0) { dev = mdev->pndev[port]; - if_inc_counter(dev, IFCOUNTER_IPACKETS, - priv->pkstats.rx_packets - priv->pkstats_last.rx_packets); if_inc_counter(dev, IFCOUNTER_OPACKETS, priv->pkstats.tx_packets - priv->pkstats_last.tx_packets); if_inc_counter(dev, IFCOUNTER_IBYTES, --------------46696AE8FF0830D5F820E892--