From owner-freebsd-usb@FreeBSD.ORG Sat Oct 2 06:40:46 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DE07106564A for ; Sat, 2 Oct 2010 06:40:46 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 2A5BD8FC13 for ; Sat, 2 Oct 2010 06:40:45 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=sEolSJAlcSxSMaOm1MQ0bvrIu+BNAN+OqG2UAUgC4Ok= c=1 sm=1 a=pgHCOPxoMUAA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=B8mfy7V_dSw9HxnbeeYA:9 a=VUauwkFf2LznuBe2jAd-yKA01zkA:4 a=wPNLvfGTeEIA:10 a=newmqGhdYycqHi4t:21 a=RRwF6kfeeskHL8py:21 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 29436418; Sat, 02 Oct 2010 08:40:44 +0200 Received-SPF: softfail receiver=mailfe07.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-usb@freebsd.org, pyunyh@gmail.com Date: Sat, 2 Oct 2010 08:41:57 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20101002001100.GL10521@michelle.cdnetworks.com> In-Reply-To: <20101002001100.GL10521@michelle.cdnetworks.com> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010020841.57474.hselasky@freebsd.org> Cc: Subject: Re: Network TX/RX fairness is not honored by USB stack X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2010 06:40:46 -0000 On Saturday 02 October 2010 02:11:00 Pyun YongHyeon wrote: > Hi, > > I don't know how long it had been there but it seems current USB > stack does not honor fairness of TX/RX on USB ethernet controller. > Unidirectional performance test(UDP) or most-unidirectional > performance(TCP) test works well without problems. However if heavy > TX/RX traffic hits controller at the same time either TX or RX is > not served at all. I'm under the impression that whenever TX work > is done it seems USB reschedules next pending TX again instead of > processing RX such that RX is starved to death. This can be easily > reproduced on two hosts with the netperf performance test. > Whenever both hosts send tiny UDP datagrams to the other host > either TX or RX packet counters are not increasing until the end > of the UDP torture test. The number of EHCI interrupt is about 8K/s > while test is in progress so I think it reached its maximum > processing limit. After netperf testing, it can still process TX/RX > packets even though it dropped too many RX packets. But these > dropped packets are not counted so netstat(1) shows 0 dropped > frames even though it lost millions of packets. > > Hans, do you have any idea what's going on here? > You can use the following netperf command on both hosts after > running netserver. > %netperf -c -H ip_addr_of_other_host -tUDP_STREAM -l 300 -- -m 1 > > Another odd thing I noticed is number of interrupts does not go > down to 0 after the testing. It constantly generates 1k/s > interrupts after that. Maybe we are triggering a bug. Can you enable USB debugging to figure out what data lengths are transmitted or received. USB EHCI uses round robin, so this is either USB device problem or a test- program software failure. Check the CPU usage of the host computer during the test. Do you see anything? > The only way I stop that interrupts was to > down the ue0 interface with "ifconfig ue0 down" command. --HPS