From owner-freebsd-net@freebsd.org Wed Sep 28 20:28:59 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 41553C01C96 for ; Wed, 28 Sep 2016 20:28:59 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C876012A4 for ; Wed, 28 Sep 2016 20:28:58 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x229.google.com with SMTP id w84so256993776wmg.1 for ; Wed, 28 Sep 2016 13:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=yMikb2RRDiT031rI9z8Y4s6HBWHZ7baQ7zsv8Ewj2tk=; b=aPA0MHxrNoDuLcjj1O5yPo0pI9u7BnL9T7x5tzWUzwPrgavVodj7mUmWj8BMIa/rt9 mqo6b3y2cYjqt0G8qZo+ANP+2pXRCJq9XApOK+BsXYBwX1JcYr54HhlTWNiRgNrmsKXt SUcJYn0zUUJ1G5EwvuWyA2sOn4cMlj4/F8phuvaJ0o+on8jDt9EgKLksh28z6nmjxqK7 vyB04BdMOAY9jZqAYwNlx8vfS4V1G0hq0rtAoracIaa0ooINoR2ZahfNpL3cBYJ4SY5E p4JdYT4Tw4mrLlANMATTCKF2SLYUIwsbPLZowBEzJFzsHHxDYLtW1gA2UrUBG5PDWHbw BDbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=yMikb2RRDiT031rI9z8Y4s6HBWHZ7baQ7zsv8Ewj2tk=; b=G7T9LCQjVNU5h5wg6sbbtsz1B3q9yZmhrIcmuE4KOPu0iH9s/Qf4wREYApFYIa4MFB cevvcSvm2ZDfyD0A338tveWnfuIvWkCZ8yavY5bcEwyw8587+KYB0pTmqwnhYcmPnNVy qV2uYX65FHfEYBXgKG4FyoD713K1l12FIKUTgDDgxRLg2nA+FN0kcwdeOX8JjlpTfrf4 Cg37/wQA1V70jVvtizsVgWvwy5hSx1FytG6Q6lTPu7ZMMK8lZamy9Afi7I2vMkkUyxKs BDX0qPJTdYxVho74V5GtBwK2wrHMNJUfhm18MWk7Rp2qI7Ax91fVG68Gz/PG0RbogP2G uv5A== X-Gm-Message-State: AA6/9RkDmIWnFkcrK6JVxuMjzIfjkiRQqvRa4Zdrmhhl/72ujXp+Xa9piTJxxgfWDNhD6Q== X-Received: by 10.28.109.86 with SMTP id i83mr9420671wmc.104.1475094536522; Wed, 28 Sep 2016 13:28:56 -0700 (PDT) Received: from macbook-air-de-benjamin.home (LFbn-1-7159-4.w90-116.abo.wanadoo.fr. [90.116.90.4]) by smtp.gmail.com with ESMTPSA id us2sm4108926wjc.45.2016.09.28.13.28.55 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 13:28:55 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: netstat counts input traffic twice From: Ben RUBSON In-Reply-To: <4f5a88f4-03e7-482f-b963-ab65eeee0136@selasky.org> Date: Wed, 28 Sep 2016 22:28:53 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <94953762-4397-476D-AD61-A39914F27938@gmail.com> <6d052c64-2ca2-7839-c297-e764634be648@selasky.org> <4f5a88f4-03e7-482f-b963-ab65eeee0136@selasky.org> To: FreeBSD Net X-Mailer: Apple Mail (2.3124) 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 20:28:59 -0000 On 28 Sep 2016, at 18:00, Hans Petter Selasky wrote: >=20 > On 09/28/16 17:48, Ben RUBSON wrote: >>=20 >>> On 28 Sep 2016, at 16:01, Hans Petter Selasky = wrote: >>>=20 >>> On 09/23/16 19:59, Ben RUBSON wrote: >>>> netstat -b -I mlxen1 >>>=20 >>> Hi Ben, >>>=20 >>> Does the attached patch make any difference? >>=20 >> Hi HPS, >>=20 >> I tested your patch, but unfortunately it does not help. >=20 > Is this a regression issue from 10.x ? I booted a 10.3 ISO and made the test, 10.3 does not suffer from the = issue : Here is iperf on sending side : [ 3] 0.0- 1.0 sec 231 MBytes 1.93 Gbits/sec [ 3] 1.0- 2.0 sec 660 MBytes 5.53 Gbits/sec [ 3] 2.0- 3.0 sec 686 MBytes 5.75 Gbits/sec [ 3] 3.0- 4.0 sec 685 MBytes 5.75 Gbits/sec [ 3] 4.0- 5.0 sec 688 MBytes 5.77 Gbits/sec [ 3] 5.0- 6.0 sec 688 MBytes 5.77 Gbits/sec [ 3] 6.0- 7.0 sec 687 MBytes 5.76 Gbits/sec [ 3] 7.0- 8.0 sec 686 MBytes 5.75 Gbits/sec [ 3] 8.0- 9.0 sec 688 MBytes 5.77 Gbits/sec [ 3] 9.0-10.0 sec 688 MBytes 5.77 Gbits/sec [ 3] 0.0-10.0 sec 6.24 GBytes 5.36 Gbits/sec And here is netstat on receiving side : # netstat -w 1 -i mlxen1 input (Total) output packets errs idrops bytes packets errs bytes colls 3 0 0 1342564 2 0 242 0 20010 0 0 288125410 9861 0 690494 0 76138 0 0 714913534 37134 0 2599418 0 84279 0 0 720127612 40735 0 2851628 0 84629 0 0 725851168 40776 0 2854428 0 84132 0 0 736770514 40658 0 2846168 0 83584 0 0 717375282 40657 0 2846092 0 83669 0 0 734551794 40825 0 2857858 0 83854 0 0 716303392 40866 0 2860748 0 83944 0 0 730653274 40795 0 2855752 0 84523 0 0 663718362 41136 0 2879616 0 9844 0 0 190720 4769 0 334016 0 Receiving side info : # uname -a FreeBSD test 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 = 02:10:02 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 # grep -i "mlx.*driver" /var/log/messages kernel: mlx4_core: Initializing mlx4_core: Mellanox ConnectX VPI driver = v2.1.6 (Apr 9 2016) > Does other network drivers exhibit the same behaviour? I only run FreeBSD with ConnectX3 NICs, so I can't test other hardware = :-/ > With your instructions I should be able to reproduce and fix this = issue. Thank you, and of course feel free to ask again if needed. Ben