From owner-freebsd-net@freebsd.org Mon Jul 27 18:35:08 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2156236AE65; Mon, 27 Jul 2020 18:35:08 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BFpQ25smPz49mh; Mon, 27 Jul 2020 18:35:06 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 06RIZ39R006626 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 27 Jul 2020 11:35:04 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 06RIZ3nM006625; Mon, 27 Jul 2020 11:35:03 -0700 (PDT) (envelope-from jmg) Date: Mon, 27 Jul 2020 11:35:03 -0700 From: John-Mark Gurney To: Ganbold Tsagaankhuu Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: CFT: major update to if_ure Message-ID: <20200727183503.GW4213@funkthat.com> Mail-Followup-To: Ganbold Tsagaankhuu , freebsd-net@freebsd.org, freebsd-current@freebsd.org References: <20200725231318.GO4213@funkthat.com> <20200726211447.GQ4213@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Mon, 27 Jul 2020 11:35:04 -0700 (PDT) X-Rspamd-Queue-Id: 4BFpQ25smPz49mh X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of jmg@gold.funkthat.com has no SPF policy when checking 208.87.223.18) smtp.mailfrom=jmg@gold.funkthat.com X-Spamd-Result: default: False [3.35 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.69)[0.687]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[funkthat.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.57)[0.572]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.89)[0.887]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[jmg@funkthat.com,jmg@gold.funkthat.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:32354, ipnet:208.87.216.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[jmg@funkthat.com,jmg@gold.funkthat.com] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2020 18:35:08 -0000 Ganbold Tsagaankhuu wrote this message on Mon, Jul 27, 2020 at 18:29 +0800: > On Mon, Jul 27, 2020 at 5:14 AM John-Mark Gurney wrote: > > > Ganbold Tsagaankhuu wrote this message on Sun, Jul 26, 2020 at 11:05 +0800: > > > On Sun, Jul 26, 2020 at 7:13 AM John-Mark Gurney > > wrote: > > > > > > > Hello, > > > > > > > > I'd like people who have ure (RealTek) based USB devices to test > > > > review D25809[0]. > > > > > > > > This update adds support for: > > > > - HW VLAN tagging > > > > - HW checksum offload for IPv4 and IPv6 > > > > - tx and rx aggreegation (for full gige speeds) > > > > - multiple transactions > > > > > > > > In my testing, I am able to get 900-950Mbps depending upon > > > > TCP or UDP, which is a significant improvement over the previous > > > > 91Mbps (~8kint/sec*1500bytes/packet*1packet/int). > > > > > > Does performance improve for if_ure device on USB2? > > > I will try to test it in a couple of days on NanoPI R1 and R1S boards. > > > > Yes, it should. > > > > I never tested the before driver on USB2, but I'm now able to get > > 211Mbps TX and 190Mbps RX TCP, and 227Mbps TX and 225Mbps RX UDP. > > > > I believe it is likely that the same 91Mbps speed limit applied to > > USB2 as well. > > Couldn't find your iperf test scripts and I tested only tcp: My test script isn't performance, just features, and I'm thinking about how/where to publish it... You can also test UDP using -u w/ iperf3 and adjust the bandwidth w/ -b 300m (or other Mbps)... > root@nanopi-r1s-h5:~ # iperf3 -c 192.168.111.1 > Connecting to host 192.168.111.1, port 5201 > [ 5] local 192.168.111.10 port 28569 connected to 192.168.111.1 port 5201 > [ ID] Interval Transfer Bitrate Retr Cwnd > [ 5] 0.00-1.00 sec 27.4 MBytes 230 Mbits/sec 0 95.4 KBytes > [ 5] 1.00-2.00 sec 27.6 MBytes 232 Mbits/sec 0 95.4 KBytes > [ 5] 2.00-3.00 sec 27.7 MBytes 232 Mbits/sec 0 95.4 KBytes > [ 5] 3.00-4.00 sec 27.6 MBytes 232 Mbits/sec 0 95.4 KBytes > [ 5] 4.00-5.00 sec 27.6 MBytes 232 Mbits/sec 0 95.4 KBytes > [ 5] 5.00-6.00 sec 27.6 MBytes 232 Mbits/sec 0 95.4 KBytes > [ 5] 6.00-7.00 sec 27.7 MBytes 232 Mbits/sec 0 95.4 KBytes > [ 5] 7.00-8.00 sec 27.7 MBytes 232 Mbits/sec 0 95.4 KBytes > [ 5] 8.00-9.00 sec 27.6 MBytes 232 Mbits/sec 0 95.4 KBytes > [ 5] 9.00-10.00 sec 27.6 MBytes 232 Mbits/sec 0 95.4 KBytes > - - - - - - - - - - - - - - - - - - - - - - - - - > [ ID] Interval Transfer Bitrate Retr > [ 5] 0.00-10.00 sec 276 MBytes 232 Mbits/sec 0 sender > [ 5] 0.00-10.79 sec 276 MBytes 215 Mbits/sec > receiver > > iperf Done. > root@nanopi-r1s-h5:~ # iperf3 -c 192.168.111.1 -R > Connecting to host 192.168.111.1, port 5201 > Reverse mode, remote host 192.168.111.1 is sending > [ 5] local 192.168.111.10 port 29384 connected to 192.168.111.1 port 5201 > [ ID] Interval Transfer Bitrate > [ 5] 0.00-1.00 sec 12.1 MBytes 102 Mbits/sec > [ 5] 1.00-2.00 sec 12.1 MBytes 102 Mbits/sec > [ 5] 2.00-3.00 sec 12.1 MBytes 101 Mbits/sec > [ 5] 3.00-4.00 sec 12.1 MBytes 102 Mbits/sec > [ 5] 4.00-5.00 sec 12.1 MBytes 102 Mbits/sec > [ 5] 5.00-6.00 sec 12.1 MBytes 102 Mbits/sec > [ 5] 6.00-7.00 sec 12.1 MBytes 101 Mbits/sec > [ 5] 7.00-8.00 sec 12.1 MBytes 102 Mbits/sec > [ 5] 8.00-9.00 sec 12.1 MBytes 101 Mbits/sec > [ 5] 9.00-10.00 sec 12.1 MBytes 102 Mbits/sec > - - - - - - - - - - - - - - - - - - - - - - - - - > [ ID] Interval Transfer Bitrate Retr > [ 5] 0.00-11.25 sec 121 MBytes 90.3 Mbits/sec 2539 > sender > [ 5] 0.00-10.00 sec 121 MBytes 101 Mbits/sec > receiver > > iperf Done. > root@nanopi-r1s-h5:~ # sysctl -a | grep cpu.0.freq > dev.cpu.0.freq_levels: 1248/-1 1008/-1 816/-1 624/-1 480/-1 > dev.cpu.0.freq: 1248 Hmmm... The reverse seems slow, but I can't think of why it'd be that slow though. When I did my tests on the USB2 ports, both directions were about the same speed... Thanks for the test! Great to hear things are working... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."