From owner-freebsd-wireless@freebsd.org Sat Jan 6 12:07:02 2018 Return-Path: Delivered-To: freebsd-wireless@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 2081EEB64D1 for ; Sat, 6 Jan 2018 12:07:02 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id EF4416B24F for ; Sat, 6 Jan 2018 12:07:01 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id EB514EB64D0; Sat, 6 Jan 2018 12:07:01 +0000 (UTC) Delivered-To: wireless@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 EADF5EB64CF for ; Sat, 6 Jan 2018 12:07:01 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: from mail-lf0-x229.google.com (mail-lf0-x229.google.com [IPv6:2a00:1450:4010:c07::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 7BC7F6B24D for ; Sat, 6 Jan 2018 12:07:01 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: by mail-lf0-x229.google.com with SMTP id h137so7683045lfe.8 for ; Sat, 06 Jan 2018 04:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=QGqo7IqxUxi/fMifw/RhkDs7ecLGvx9scLW4xojaDlo=; b=as+g70Av9O2e9ZwgT8HQzHItMNCQsqxZPbx3Gsgttci8tlJ9MLP6Dhg1tc/OI3gzQv icHA/ICCLeoXZwG9qFn+F0BOehjp7ybuMNasRQ+iQ1mmJLezVePGUV0j870/9HF2x6NJ iOHNFmNKvdoZR4iC5hAepZoiBnuY1ArqUUcOhlZ5PqxEcJuPgUDayr+vINqLm6b00JN+ COn7e5KD0xMHuY3WP3qSLNzBsFWBeRG1cEbrn1prjs6xdMe/Cp5LUHPYD/zaPFGElE47 nyY2IEoSOTSDwyhUg7cCS0qOTBbg8tTab6wjsjXxhgbFhl1ChDUMf4eNvdr7r6iW89za tAqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=QGqo7IqxUxi/fMifw/RhkDs7ecLGvx9scLW4xojaDlo=; b=Vubc76HqfmaoVIE1aMRupr+Bsy2qRKpotVDzik+RSLsYA0RAv28N/VmKSPTy69ZP2X UoWy3cN/9UGfTLxR+jEE78ktBb71ivVE6SUf5tPjK6Bl/55gIAndsPqwNIEFK5FTltNd obXesAzOzlKv5LGFKu/pk++wMk9hu8Oak3RQARqUNo1usJnD91mDZV9YtAw91jgD0OaV GyH4hPvLo/WcZpy805uzLo7GDgujYn3GirHmBkgeAQ3bMwFMbr5sfEjlss6CTKdTDNMo pgneclF4/FhVtrubhgtEX9HWFZ4Woo9wMd5xxDhXUZMPrcz8aMg/c4++/BKmejbx3Jbf NTpA== X-Gm-Message-State: AKwxytc1p5cnJZjfFlcjwQCDozjsX+bntmyFhUobtWbNqnGRwJGTYNhI z6HVqYmJ24kMZa3R+4k3KV/cUw== X-Google-Smtp-Source: ACJfBotP2HsFGlp/jKr5XtRCUXWQWMFVgWHjOlvn8PFPI9ky4hJT11gZzVQYwD7lycZEaFdzzl55cQ== X-Received: by 10.25.26.7 with SMTP id a7mr3016307lfa.89.1515240419498; Sat, 06 Jan 2018 04:06:59 -0800 (PST) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id h28sm1353498ljb.30.2018.01.06.04.06.58 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 06 Jan 2018 04:06:58 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "David Wolfskill" Subject: Re: Something seems "off" counting outbound traffic (wlan? iwn?) References: <20180103153312.GJ1258@albert.catwhisker.org> Date: Sat, 06 Jan 2018 14:06:16 +0200 Cc: wireless@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <20180103153312.GJ1258@albert.catwhisker.org> User-Agent: Opera Mail/12.15 (FreeBSD) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 12:07:02 -0000 Wed, 03 Jan 2018 17:33:12 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE David Wolfskill = : Hi, https://reviews.freebsd.org/D10728 fixes output stats (I cannot check it= with Intel 4965 - sometimes firmware throws an exception - with or witho= ut this patch - that's why it is not in the tree yet). > I recently configured my "perimeter device" (a 4-homed FreeBSD box > named "bats"; see > for a diagram) to make use of FQ-CoDel for outbound traffic on the > Internet-facing NIC (em2, in this case). > > I failed to find a way to monitor the traffic rates in a way that I > found suitably convenient, so I cobbled up a Perl script to grab the > output of "netstat -nibdf link" at intervals (timed via Time::HiRes), = do > the arithmetic, and display the results. > > For the perimeter device, it seems to work as expected. > > For my laptop, using the wlan0 (iwn0) NIC, the report of input traffic= > looks reasonable, but output ... makes no sense at all to me. > > As illustration, I'll show the reported results for both bats and my > laptop while I run a "speed" test from = > ; > note that my Internet connection is (residential) ADSL. Here's what m= y > ISP stated about it (from a conversation some time back): > > | The line is at 6M/768K with good synch readings and I don't see > | any reason you wouldn't be able to get 5.1Mbps/640Kbps out of > | it which is about the yield after overhead. > > Note that I start the test just after the script has reported fro the > first interval (which I have specified as 5 seconds for this): > > bats(11.1-S)[18] net_mon -e -w 5 -c 15 em{1,2} > em1: 172.17.0.1/16 Ethernet autoselect (1000baseT ) > em2: 198.144.209.73/24 Ethernet autoselect (10baseT/UTP = > ) > > em1 = = > em2 > Time In = > Out In Out > Rate/sec Bits Errs Drops Bits Errs Drops Coll = > Bits Errs Drops Bits Errs Drops Coll > 1514993320.453 3.5K 0.0 0.0 3.3K 0.0 0.0 0.0 = > 403.0K 0.0 0.0 173.2K 0.0 0.0 1.8 > 1514993325.454 24.1K 0.0 0.0 16.4K 0.0 0.0 0.0 = > 31.0K 0.0 0.0 27.9K 0.0 0.0 0.0 > 1514993330.454 22.4K 0.0 0.0 525.3K 0.0 0.0 0.0 = > 1.5M 0.0 0.0 142.2K 0.0 0.0 1.4 > 1514993335.455 143.9K 0.0 0.0 5.1M 0.0 0.0 0.0 = > 5.3M 0.0 0.0 340.5K 0.0 0.0 34.2 > 1514993340.455 135.4K 0.0 0.0 5.0M 0.0 0.0 0.0 = > 5.4M 0.0 0.0 227.8K 0.0 0.0 8.8 > 1514993345.454 104.1K 0.0 0.0 4.2M 0.0 0.0 0.0 = > 5.4M 0.0 0.0 249.2K 0.0 0.0 25.6 > 1514993350.453 544.1K 0.0 0.0 544.4K 0.0 0.0 0.0 = > 858.5K 0.0 0.0 644.5K 0.0 0.0 5.4 > 1514993355.454 585.0K 0.0 0.0 34.1K 0.0 0.0 0.0 = > 868.0K 0.0 0.0 658.0K 0.0 0.0 17.2 > 1514993360.454 483.4K 0.0 0.0 31.8K 0.0 0.0 0.0 = > 1.4M 0.0 0.0 635.2K 0.0 0.0 22.2 > 1514993365.454 254.9K 0.0 0.0 25.1K 0.0 0.0 0.0 = > 115.6K 0.0 0.0 317.2K 0.0 0.0 2.8 > 1514993370.454 822.4 0.0 0.0 1.6K 0.0 0.0 0.0 = > 9.6K 0.0 0.0 14.8K 0.0 0.0 0.2 > 1514993375.454 2.3K 0.0 0.0 2.3K 0.0 0.0 0.0 = > 720.5K 0.0 0.0 108.0K 0.0 0.0 0.2 > 1514993380.455 3.2K 0.0 0.0 2.8K 0.0 0.0 0.0 = > 358.9K 0.0 0.0 210.6K 0.0 0.0 0.6 > 1514993385.454 1.0K 0.0 0.0 1.9K 0.0 0.0 0.0 = > 1.1M 0.0 0.0 97.2K 0.0 0.0 2.8 > 1514993390.455 566.3 0.0 0.0 1.2K 0.0 0.0 0.0 = > 433.5K 0.0 0.0 219.9K 0.0 0.0 1.0 > bats(11.1-S)[19] > > > g1-252(11.1-S)[22] net_mon -e -w 5 -c 15 > wlan0: 172.17.1.252/16 IEEE 802.11 Wireless Ethernet MCS mode 11n= g > > wlan0 > Time In Out > Rate/sec Bits Errs Drops Bits Errs Drops Coll > 1514993320.941 4.2K 0.0 0.0 0.0 5.8 0.0 0.0 > 1514993325.924 14.3K 0.0 0.0 0.0 12.0 0.0 0.0 > 1514993330.906 985.3K 0.0 0.0 160.6 55.6 0.0 0.0 > 1514993335.911 5.1M 0.0 0.0 0.0 246.9 0.0 0.0 > 1514993340.938 5.0M 0.0 0.0 0.0 241.9 0.0 0.0 > 1514993345.903 4.0M 0.0 0.0 0.0 184.3 0.0 0.0 > 1514993350.903 235.2K 0.0 0.0 0.0 62.6 0.0 0.0 > 1514993355.919 35.5K 0.0 0.0 0.0 51.2 0.0 0.0 > 1514993360.904 29.1K 0.0 0.0 0.0 45.3 0.0 0.0 > 1514993365.975 19.9K 0.0 0.0 0.0 21.5 0.0 0.0 > 1514993370.922 1.6K 0.0 0.0 0.0 1.6 0.0 0.0 > 1514993375.905 2.8K 0.0 0.0 0.0 2.8 0.0 0.0 > 1514993380.968 897.5 0.0 0.0 0.0 1.0 0.0 0.0 > 1514993386.035 1.7K 0.0 0.0 0.0 1.4 0.0 0.0 > 1514993390.957 1.6K 0.0 0.0 0.0 1.2 0.0 0.0 > g1-252(11.1-S)[23] > > > Note that even for the "upload" phase of the test, the laptop is > showing negligible outbound *traffic* -- but a *lot* of outbound > "errors." > > Can someone make sense of this? > > Thanks! > > Peace, > david