RE: [PATCH] USBNET: fix handling padding packet

2013-11-11 Thread David Laight
> As my below test on ax99179_178a, I believe the patch should fix padding > for dma sg, but need a little update, and I will send out v1 later: > >$ping -s 974 another_machine #from host with ax99179_178a attached > > If FLAG_SEND_ZLP is set for ax99179_178a, the above ping won't wo

Re: [PATCH] USBNET: fix handling padding packet

2013-09-19 Thread Ming Lei
On Thu, Sep 19, 2013 at 3:18 PM, Bjørn Mork wrote: > Oliver Neukum writes: >> On Wed, 2013-09-18 at 20:56 +0200, Bjørn Mork wrote: >>> Oliver Neukum wrote: >> >>> >No, USB 3.0 uses no companion controllers, so you can have devices >>> >of any speed connected to it. >>> > >>> >>> Ah, right. I don

RE: [PATCH] USBNET: fix handling padding packet

2013-09-19 Thread David Laight
> I wonder what the gain of that really is? Yes, I can see the advantage > of making the class drivers more effective. But padding is only > relevant for the ECM class, isn't it? And are there any ECM class > devices where SG support matters? AFAICT the requirement for avoiding ZLP is a property

Re: [PATCH] USBNET: fix handling padding packet

2013-09-19 Thread Bjørn Mork
Oliver Neukum writes: > On Wed, 2013-09-18 at 20:56 +0200, Bjørn Mork wrote: >> Oliver Neukum wrote: > >> >No, USB 3.0 uses no companion controllers, so you can have devices >> >of any speed connected to it. >> > >> >> Ah, right. I don't own such modern hardware, but I should have known >> this

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Oliver Neukum
On Wed, 2013-09-18 at 20:56 +0200, Bjørn Mork wrote: > Oliver Neukum wrote: > >No, USB 3.0 uses no companion controllers, so you can have devices > >of any speed connected to it. > > > > Ah, right. I don't own such modern hardware, but I should have known this > anyway. > > This still doesn't

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Bjørn Mork
Oliver Neukum wrote: >On Wed, 2013-09-18 at 17:52 +0200, Bjørn Mork wrote: > >> No modern device should need the padding. No old device will be able >to >> use the SG feature as implemented. You only enable it on USB3, don't > >On XHCI. > >> you? If this feature is restricted to USB3 capable devi

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Bjørn Mork
Ming Lei writes: > On Wed, Sep 18, 2013 at 11:52 PM, Bjørn Mork wrote: > >> Why don't you test it on the device you tested the SG patch with? I am >> pretty sure it works just fine using proper ZLP transfer termination. > > I should have planned to test it, but didn't know how to build TCP TSO >

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Oliver Neukum
On Wed, 2013-09-18 at 17:52 +0200, Bjørn Mork wrote: > No modern device should need the padding. No old device will be able to > use the SG feature as implemented. You only enable it on USB3, don't On XHCI. > you? If this feature is restricted to USB3 capable devices, then it most > certainly c

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Ming Lei
On Wed, Sep 18, 2013 at 11:52 PM, Bjørn Mork wrote: > Ming Lei writes: > >>> Are you really sure that the one driver/device using this really need >>> the padding byte? If you could just make FLAG_SEND_ZLP part of the >>> condition for enabling can_dma_sg, then all this extra complexity would >>

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Bjørn Mork
Ming Lei writes: >> Are you really sure that the one driver/device using this really need >> the padding byte? If you could just make FLAG_SEND_ZLP part of the >> condition for enabling can_dma_sg, then all this extra complexity would >> be unnecessary. As the comment in front of the padding co

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread David Miller
From: Bjørn Mork Date: Wed, 18 Sep 2013 17:52:42 +0200 > Ming Lei writes: > >> There is no reason to forbid DMA SG for one driver which requires >> padding, right? > > Yes there is: Added complexity for everybody, based on a combination of > features which just does not make any sense. > > No

RE: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread David Laight
> I also believe it would be nice to move the initialisation of can_dma_sg > away from the minidriver and into usbnet_probe. It's confusing that > this field is used "uninitialized" (well, defaulting to zero) in all but > one minidriver. It would much nicer if the logic was more like > > usbnet_

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Ming Lei
On Wed, Sep 18, 2013 at 9:59 PM, Bjørn Mork wrote: > Ming Lei writes: > >> Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG >> if the usb host controller is capable of building packet from >> discontinuous buffers, but missed handling padding packet when >> building DMA SG. >> >> Th

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Bjørn Mork
Ming Lei writes: > Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG > if the usb host controller is capable of building packet from > discontinuous buffers, but missed handling padding packet when > building DMA SG. > > This patch attachs the pre-allocated padding packet at the > en

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Oliver Neukum
On Tue, 2013-09-17 at 17:10 +0800, Ming Lei wrote: > Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG > if the usb host controller is capable of building packet from > discontinuous buffers, but missed handling padding packet when > building DMA SG. > > This patch attachs the pre-all

Re: [PATCH] USBNET: fix handling padding packet

2013-09-17 Thread David Miller
From: Ming Lei Date: Tue, 17 Sep 2013 17:10:02 +0800 > Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG > if the usb host controller is capable of building packet from > discontinuous buffers, but missed handling padding packet when > building DMA SG. > > This patch attachs the pre