Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751962AbbEGQVK (ORCPT ); Thu, 7 May 2015 12:21:10 -0400 Received: from smtp-out6.electric.net ([192.162.217.181]:51186 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbbEGQVE (ORCPT ); Thu, 7 May 2015 12:21:04 -0400 From: David Laight To: "'Oliver Neukum'" , Ruslan Bilovol CC: "netdev@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] net: usb: allow MTU that is a multiple of USB packet size Thread-Topic: [PATCH] net: usb: allow MTU that is a multiple of USB packet size Thread-Index: AQHQiK51VLZVotbM6EGnKsuw8cyBDJ1wryQQ Date: Thu, 7 May 2015 16:19:45 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CB2F70B@AcuExch.aculab.com> References: <1430992159-27783-1-git-send-email-ruslan.bilovol@gmail.com> <1430993477.30151.6.camel@suse.de> In-Reply-To: <1430993477.30151.6.camel@suse.de> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t47GLG15022841 Content-Length: 1703 Lines: 36 From: Oliver Neukum > Sent: 07 May 2015 11:11 > On Thu, 2015-05-07 at 12:49 +0300, Ruslan Bilovol wrote: > > Current usbnet driver rejects setting MTU that is a multiple > > of USB endpoint's wMaxPacketSize size. However, it may only > > lead to possible performance degradation but is not so > > critical that its using should be prohibited. So allow it > > but also warn user about possible issue. > > We have reports about devices reacting badly to ZLPs. > Unless you have a compelling reasons for this change > I have to reject it. I don't remember seeing a fix for xhci to even send ZLP go through. If the ZLP are sent then the device will behave badly. The receive side code in usbnet also needs a lot of TLC. (I don't remember anything major happening to it in the last couple of years.) I think it would be better if it didn't try to use skb for receive URB. Instead it should supply URB that are always multiples of the USB buffer size and then generate receive skb from the receive USB data. This would require code that correctly processes ethernet frames that span URB boundaries. This would remove the need for the 16k+ sized skb used by some of the sub-drivers and the typical lying about the 'true size'. For xhci it really ought to be possible to remove a lot of code from the tx and rx data paths and just write the buffer descriptors directly into the ring entries (as is a typical ethernet driver). That might get the performance (and software overhead) of USB3 Ge much nearer that of a normal ethernet device. David ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?