From owner-freebsd-net@freebsd.org Thu May 25 21:51:47 2017 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 51044D8293A for ; Thu, 25 May 2017 21:51:47 +0000 (UTC) (envelope-from shteryana@gmail.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (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 135731166 for ; Thu, 25 May 2017 21:51:47 +0000 (UTC) (envelope-from shteryana@gmail.com) Received: by mail-io0-x232.google.com with SMTP id f102so144207247ioi.2 for ; Thu, 25 May 2017 14:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:sender:in-reply-to:references:from:date :message-id:subject:to:cc; bh=c5v3ssy6uN6QkTQ6TtfuJSWKQswekY2HqVUom/quIFo=; b=BtdzS2LiXQ1ulyaOoHOcppXw10H+Eko+W7SQsE7ckTsZOqu9OsCZBRtHOXS9kWW0sN DG3PzDFOmG+2MTALJYz3GZgyavO384gwUlAYHBtRmQaGLpMNv8aGpIv7RAw8NTHaz6uA Qiqfw2NPftoztoFH40DkbfacL+Xvm2m9R5CXO9+oq85hrzEqbcfMMavPf3gle2uTv2GY 4jk0Qpxes3PGrKl1KxzLmr+yoeh9UDu6y2gooqvjZorvt5jfUZNzMAUhbRmj18yW/aBJ V/LEo/T2VBlJT+slx1Ur1Nj4WZtg5reYvvC9/v/6zYjv6J+tSD93xnl6XcjEflCex7rb 0fNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:sender:in-reply-to :references:from:date:message-id:subject:to:cc; bh=c5v3ssy6uN6QkTQ6TtfuJSWKQswekY2HqVUom/quIFo=; b=cDWV4W3rCZeo+R7wpiaVvxZCY0VI7+qwTuG+DcR0TxxRv26Iy5jQYAgJK/pXxYxgfx oDpjVSt326u7DcqHNkYnAWGfl7NPnbXt4W5jDk7u6usGf4mY6gzlW9exvkzfObMbb53y wc7oNriG3B8GfHygZQSf4Bq2ZGBGJ9c4cJjS9rHYCSlAMpOwHKtXCP6zvQPQBE5EC4cm sPIVpEmH0Gx5Rr8QqKCbeFWgbADexpurH5bK/pwwcbAWqrA1FRZF96nT5r59SDJio/2o mef9e9fPMp4+PHqWgluKSqAco72Hs4nJCSq+6y6ecdALXqUWqyBxIR4Omo5y+GthNowN 3WfQ== X-Gm-Message-State: AODbwcC+rJUjZRrHTdqbvSpFwPalW/BXKlzhZ1gBEl3t5K+M7aaFR/Ba urmUTxJwb8rWeSMTTVOjcryNpaUL+Q== X-Received: by 10.107.134.72 with SMTP id i69mr4539256iod.118.1495749106261; Thu, 25 May 2017 14:51:46 -0700 (PDT) MIME-Version: 1.0 Reply-To: syrinx@freebsd.org Sender: shteryana@gmail.com Received: by 10.107.132.99 with HTTP; Thu, 25 May 2017 14:51:45 -0700 (PDT) In-Reply-To: <00f201d2d593$734c6160$59e52420$@thuinformatik.ch> References: <008701d2d585$f1977f90$d4c67eb0$@thuinformatik.ch> <2248eb55-c402-cdb9-2648-986a0ed9663a@selasky.org> <00f201d2d593$734c6160$59e52420$@thuinformatik.ch> From: Shteryana Shopova Date: Fri, 26 May 2017 00:51:45 +0300 X-Google-Sender-Auth: aA4KNNltgOQIAXm-uCGRVrJ2guE Message-ID: Subject: Re: AW: axge0 and AX88179 To: Tom Huerlimann Cc: Hans Petter Selasky , "freebsd-net@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" 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: Thu, 25 May 2017 21:51:47 -0000 Hi all, I've experienced a similar problem but didn't get to analyzing it deeper (or reporting) unfortunately ; the device is ugen0.8: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (124mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0300 bDeviceClass = 0x00ff bDeviceSubClass = 0x00ff bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0009 idVendor = 0x0b95 idProduct = 0x1790 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 <000000000000C> bNumConfigurations = 0x0001 what I've noticed so far - dhclient complains about wrong ip length - % sudo dhclient ue1 DHCPDISCOVER on ue1 to 255.255.255.255 port 67 interval 7 ifconDHCPDISCOVER on ue1 to 255.255.255.255 port 67 interval 15 ip length 328 disagrees with bytes received 332. accepting packet with data after udp payload. DHCPOFFER from 192.168.10.1 DHCPREQUEST on ue1 to 255.255.255.255 port 67 ip length 328 disagrees with bytes received 332. accepting packet with data after udp payload. DHCPACK from 192.168.10.1 bound to 192.168.10.7 -- renewal in 3600 seconds. Running iperf3 & watching netstat -i at the same time on the interface in question shows increasing InErrors on the interface - Name Mtu Network Address Ipkts Ierrs Idrop Opkts Oerrs Coll ... ue1 1500 00:0e:c6:c6:db:ea 66333 354 0 35939 0 0 ue1 - 192.168.10.0/24 192.168.10.7 66323 - - 35927 - - Iperf reports ~37.1 Mbits/sec on the interface. If I attach the device on a USB2 port (or force USB2 speed on the port) I was able to get ~ 150-200Mbits on the same system with the same device. This particular system has an Intel Lynx Point USB 3.0 controller pciconf -lv | grep -A 4 xhci xhci0@pci0:0:20:0: class=0x0c0330 card=0x8179103c chip=0x8c318086 rev=0x05 hdr=0x00 vendor = 'Intel Corporation' device = '8 Series/C220 Series Chipset Family USB xHCI' class = serial bus subclass = USB ,is running FreeBSD 12.0-CURRENT #19 r315483M (M stands for a patch similar to https://people.freebsd.org/~syrinx/freebsd_xhci-20170318-01.diff needed to trick the controller on that particular system to actually use USB3.0 speeds). The same ASIX AX88179 device worked just fine reaching over 500 Mbits/sec on another system running 11.0-RELEASE-p7 with a different USB 3 controller (will double check and report back at first opportunity). Hope this helps. cheers, Shteryana On Thu, May 25, 2017 at 11:13 PM, Tom Huerlimann wrote: > From: Hans Petter Selasky [mailto:hps@selasky.org] > On 05/25/17 20:37, Tom Huerlimann wrote: >>> Hi all, >>> >>> I have the problem, that I cannot reach more than 20-40Mbit/s when >>> using the >>> AX88179 chip (1Gbit/s NIC) on a USB 3.0 SuperSpeed Port (same on a >>> 480Mbps High Speed USB v2.0-Port). >>> >>> # usbconfig dump_device_desc >>> (...) >>> ugen0.7: > at usbus0, cfg=0 md=HOST spd=SUPER >>> (5.0Gbps) pwr=ON (124mA) >>> >>> bLength = 0x0012 >>> bDescriptorType = 0x0001 >>> bcdUSB = 0x0300 >>> bDeviceClass = 0x00ff > >>> bDeviceSubClass = 0x00ff >>> bDeviceProtocol = 0x0000 >>> bMaxPacketSize0 = 0x0009 >>> idVendor = 0x0b95 >>> idProduct = 0x1790 >>> bcdDevice = 0x0100 >>> iManufacturer = 0x0001 > >>> iProduct = 0x0002 > >>> iSerialNumber = 0x0003 <00000000000001>> >>> bNumConfigurations = 0x0001 >>> >>> plugged into this USB controller: >>> >>> # dmesg | grep -i usb >>> xhci0: > mem 0xd0800000-0xd080ffff >>> irq 20 at device 20.0 on pci0 usbus0 on xhci0 >>> ehci0: > mem 0xd0815000-0xd08153ff >>> irq 23 at device 29.0 on pci0 >>> usbus1: waiting for BIOS to give up control >>> usbus1: timed out waiting for BIOS >>> usbus1: EHCI version 1.0 >>> usbus1 on ehci0 >>> usbus0: 5.0Gbps Super Speed USB v3.0 >>> usbus1: 480Mbps High Speed USB v2.0 >>> ugen1.1: > at usbus1 >>> uhub0: > on >>> usbus1 >>> ugen0.1: <0x8086>> at usbus0 >>> uhub1: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1>> on >>> usbus0 >>> ugen0.2: > at usbus0 >>> umass0: > on >>> usbus0 >>> ugen0.3: > at usbus0 >>> uhub2: > >>> on >>> usbus0 >>> ugen1.2: > at usbus1 >>> uhub3: >> 2>> on >>> usbus1 >>> ugen0.4: > at usbus0 >>> ukbd0: > on usbus0 >>> uhid0: > on usbus0 >>> ugen0.5: > at usbus0 >>> uhub4: > >>> on >>> usbus0 >>> ugen0.6: > at usbus0 >>> ukbd1: >> addr 5>> on usbus0 >>> uhid1: >> addr 5>> on usbus0 >>> ugen0.7: > at usbus0 >>> axge0: > on usbus0 >>> ue0: > on axge0 >>> >>> # dmesg | grep -i axge >>> axge0: > on usbus0 >>> miibus2: > on axge0 >>> ue0: > on axge0 >>> axge0: at uhub1, port 7, addr 6 (disconnected) >>> axge0: > on usbus0 >>> miibus2: > on axge0 >>> ue0: > on axge0 >>> axge0: > on usbus0 >>> miibus2: > on axge0 >>> ue0: > on axge0 >>> >>> I'm using FreeBSD 10.3-RELEASE-p19. >>> >>> Did someone of you ever managed to reach a higher bandwidth with axge >>> driver and AX88179 chipset? > >>Yes, you can reach more than 100Mbit/s with USB 3.0. > >>What does ifconfig say about this device? > > # ifconfig > (...) > ue0: flags=8843 metric 0 mtu 1500 > options=8000b > ether a4:f7:d0:00:19:a0 > inet6 fe80::a6f7:d0ff:fe00:19a0%ue0 prefixlen 64 scopeid 0x7 > inet 1.2.3.4 netmask 0xfffffff8 broadcast 1.2.3.9 > inet 1.2.3.5 netmask 0xfffffff8 broadcast 1.2.3.9 > inet 1.2.3.6 netmask 0xfffffff8 broadcast 1.2.3.9 > inet 1.2.3.7 netmask 0xfffffff8 broadcast 1.2.3.9 > inet 1.2.3.8 netmask 0xfffffff8 broadcast 1.2.3.9 > nd6 options=21 > media: Ethernet autoselect (1000baseT ) > status: active > > The host uses the device to be able to act as www-gateway. As soon the WAN > link > is connected to this AX88179 device the speed drops to 20-40Mbit/s. > If WAN link is connected to internal PCIe Gigabit Ethernet> > then the host/device is reaching the speed limit of 400Mbit/s. > The device uses a direct connection to the WAL link, RJ-45 Kat6 cable. > I observe the same behaviour on FreeBSD 10.1-RELEASE-p25. > > The only thing I can find on the web is > https://forum.pfsense.org/index.php?topic=72019.0 > I don't have the problem described in the headline: "randomly loses > connection, and reboot is only solution." > My experience is: (Somethimes!) If link is lost, then a reboot of the OS is > required to bring back the functionality of the NIC. > > Editing /boot/loader.conf.local and changeing kern.ipc.nmbclusters="0" to > kern.ipc.nmbclusters="32768" does not solve the performance issue. > > Does someone have an idea what I did forget to check/verify? > > -Tom