Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-08-01 Thread Ming Lei
On Thu, Aug 1, 2013 at 1:04 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-08-01 at 12:41 +0800, Ming Lei wrote: From my trace result, lots of linear SKBs are cloned or header-cloned, so it needs skb copy too. Is it normal in xmit path to see cloned SKBs for driver? If not, I

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-08-01 Thread Eric Dumazet
On Thu, 2013-08-01 at 16:10 +0800, Ming Lei wrote: On Thu, Aug 1, 2013 at 1:04 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-08-01 at 12:41 +0800, Ming Lei wrote: From my trace result, lots of linear SKBs are cloned or header-cloned, so it needs skb copy too. Is it

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-08-01 Thread Grant Grundler
On Wed, Jul 31, 2013 at 3:51 AM, Ming Lei ming@canonical.com wrote: This patch enables 'can_dma_sg' flag for ax88179_178a device if the attached host controller supports building packet from discontinuous buffers(DMA SG is possible), so both frame header and skb data buffers can be passed

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-08-01 Thread Eric Dumazet
On Thu, 2013-08-01 at 08:30 -0700, Grant Grundler wrote: http://lxr.free-electrons.com/source/include/linux/byteorder/generic.h#L111 http://lxr.free-electrons.com/ident?i=__cpu_to_le32s IIRC, cpu_to_leXX() macros return the endian corrected value. In other words, they need to be assigned to

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Greg Kroah-Hartman
On Wed, Jul 31, 2013 at 06:51:49PM +0800, Ming Lei wrote: This patch enables 'can_dma_sg' flag for ax88179_178a device if the attached host controller supports building packet from discontinuous buffers(DMA SG is possible), so both frame header and skb data buffers can be passed to usb stack

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 8:47 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Wed, Jul 31, 2013 at 06:51:49PM +0800, Ming Lei wrote: This patch enables 'can_dma_sg' flag for ax88179_178a device if the attached host controller supports building packet from discontinuous buffers(DMA

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Oliver Neukum
On Wed, 2013-07-31 at 21:50 +0800, Ming Lei wrote: In the usbnet case, the driver already supports non-sg well. Actually, all current drivers should support non-sg well because urb-sg wasn't introduced for very long time. We can think it as a new feature or DMA enhancement for xHCI

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Eric Dumazet
On Wed, 2013-07-31 at 16:02 +0200, Oliver Neukum wrote: On Wed, 2013-07-31 at 21:50 +0800, Ming Lei wrote: In the usbnet case, the driver already supports non-sg well. Actually, all current drivers should support non-sg well because urb-sg wasn't introduced for very long time. We can

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 11:15 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Wed, 2013-07-31 at 16:02 +0200, Oliver Neukum wrote: On Wed, 2013-07-31 at 21:50 +0800, Ming Lei wrote: In the usbnet case, the driver already supports non-sg well. Actually, all current drivers should support

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 11:15 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Wed, 2013-07-31 at 16:02 +0200, Oliver Neukum wrote: Hmm, I would rather make sure SG is really supported before adding TSO support. TCP stack can build skb with fragments of any size, not multiple of 512 or