Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-25 Thread Eric Dumazet
On Thu, 2013-07-25 at 13:25 +0800, Ming Lei wrote: On Thu, Jul 25, 2013 at 1:10 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-07-25 at 10:28 +0800, Ming Lei wrote: It depends if size of sg buffer(except for last one) in the sg list can be divided by usb endpoint's max

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-25 Thread Ben Hutchings
On Thu, 2013-07-25 at 13:25 +0800, Ming Lei wrote: On Thu, Jul 25, 2013 at 1:10 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-07-25 at 10:28 +0800, Ming Lei wrote: It depends if size of sg buffer(except for last one) in the sg list can be divided by usb endpoint's max

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-25 Thread Ming Lei
On Thu, Jul 25, 2013 at 7:01 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-07-25 at 13:25 +0800, Ming Lei wrote: On Thu, Jul 25, 2013 at 1:10 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-07-25 at 10:28 +0800, Ming Lei wrote: It depends if size of sg

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-25 Thread Ben Hutchings
On Thu, 2013-07-25 at 22:52 +0800, Ming Lei wrote: [...] On Thu, Jul 25, 2013 at 9:34 PM, Ben Hutchings bhutchi...@solarflare.com wrote: Not that I have any experience with USB drivers, but perhaps usb_sg_init()? USB SG library doesn't support submitting SG URB asynchronously, but that

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-25 Thread Eric Dumazet
On Thu, 2013-07-25 at 22:52 +0800, Ming Lei wrote: Maybe need to try it with TSO enabled, in my test on ax88179_178a NIC after applying your disabling TSO patch, tx throughput is less than 600Mbps, but rx is close to 900Mbps. It looks like TCP stack could for this case allocate linear skbs

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-24 Thread Ming Lei
On Tue, Jul 23, 2013 at 2:10 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Mon, 2013-07-22 at 20:47 +0100, Ben Hutchings wrote: On Mon, 2013-07-22 at 11:47 -0700, Eric Dumazet wrote: On Mon, 2013-07-22 at 19:38 +0100, Ben Hutchings wrote: On Mon, 2013-07-22 at 11:29 -0700, Grant

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-24 Thread Eric Dumazet
On Thu, 2013-07-25 at 10:28 +0800, Ming Lei wrote: It depends if size of sg buffer(except for last one) in the sg list can be divided by usb endpoint's max packet size(512 or 1024), at least there is the constraint:

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-24 Thread Ming Lei
On Thu, Jul 25, 2013 at 1:10 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-07-25 at 10:28 +0800, Ming Lei wrote: It depends if size of sg buffer(except for last one) in the sg list can be divided by usb endpoint's max packet size(512 or 1024), at least there is the constraint:

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-23 Thread Eric Dumazet
On Mon, 2013-07-22 at 20:47 +0100, Ben Hutchings wrote: On Mon, 2013-07-22 at 11:47 -0700, Eric Dumazet wrote: On Mon, 2013-07-22 at 19:38 +0100, Ben Hutchings wrote: On Mon, 2013-07-22 at 11:29 -0700, Grant Grundler wrote: On Mon, Jul 22, 2013 at 10:07 AM, Eric Dumazet

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-23 Thread David Miller
From: Eric Dumazet eric.duma...@gmail.com Date: Mon, 22 Jul 2013 23:10:27 -0700 On Mon, 2013-07-22 at 20:47 +0100, Ben Hutchings wrote: The real solution would be for someone to add SG support to the usbnet core. Trying to support 1GbE with only linear skbs is not a great idea... and it can

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-23 Thread Eric Dumazet
On Tue, 2013-07-23 at 16:46 -0700, David Miller wrote: From: Eric Dumazet eric.duma...@gmail.com Date: Mon, 22 Jul 2013 23:10:27 -0700 On Mon, 2013-07-22 at 20:47 +0100, Ben Hutchings wrote: The real solution would be for someone to add SG support to the usbnet core. Trying to support

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-23 Thread Eric Dumazet
On Tue, 2013-07-23 at 16:56 -0700, Eric Dumazet wrote: A quick scan shows that smsc75xx, smsc95xx, and ax88179_178a all have this problem. Instead of the patch starting this thread, I'd like to see one that hits all three drivers and removes all SG and TSO features bits from both the

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-23 Thread David Miller
From: Eric Dumazet eric.duma...@gmail.com Date: Tue, 23 Jul 2013 17:05:10 -0700 On Tue, 2013-07-23 at 16:56 -0700, Eric Dumazet wrote: A quick scan shows that smsc75xx, smsc95xx, and ax88179_178a all have this problem. Instead of the patch starting this thread, I'd like to see one

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-23 Thread Grant Grundler
On Tue, Jul 23, 2013 at 4:46 PM, David Miller da...@davemloft.net wrote: ... A quick scan shows that smsc75xx, smsc95xx, and ax88179_178a all have this problem. Instead of the patch starting this thread, I'd like to see one that hits all three drivers and removes all SG and TSO features bits

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-23 Thread Grant Grundler
On Tue, Jul 23, 2013 at 7:29 PM, Grant Grundler grund...@google.com wrote: On Tue, Jul 23, 2013 at 4:46 PM, David Miller da...@davemloft.net wrote: ... A quick scan shows that smsc75xx, smsc95xx, and ax88179_178a all have this problem. Instead of the patch starting this thread, I'd like to

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Ben Hutchings
On Mon, 2013-07-22 at 10:07 -0700, Eric Dumazet wrote: On Sat, 2013-07-20 at 17:16 +0800, fre...@asix.com.tw wrote: From: Freddy Xin fre...@asix.com.tw Disable TSO and SG network features in reset() and bind() functions, and check the return value of skb_linearize() in tx_fixup() to

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Eric Dumazet
On Sat, 2013-07-20 at 17:16 +0800, fre...@asix.com.tw wrote: From: Freddy Xin fre...@asix.com.tw Disable TSO and SG network features in reset() and bind() functions, and check the return value of skb_linearize() in tx_fixup() to prevent TX throttling. Signed-off-by: Freddy Xin

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Grant Grundler
On Mon, Jul 22, 2013 at 10:07 AM, Eric Dumazet eric.duma...@gmail.com wrote: ... I guess that if a driver does not advertise NETIF_F_SG, this skb_linearize() call is not needed : All frames reaching your xmit function should already be linear As Ben Hutchings pointed out, hw_features is still

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Ben Hutchings
On Mon, 2013-07-22 at 11:29 -0700, Grant Grundler wrote: On Mon, Jul 22, 2013 at 10:07 AM, Eric Dumazet eric.duma...@gmail.com wrote: ... I guess that if a driver does not advertise NETIF_F_SG, this skb_linearize() call is not needed : All frames reaching your xmit function should already

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Eric Dumazet
On Mon, 2013-07-22 at 19:38 +0100, Ben Hutchings wrote: On Mon, 2013-07-22 at 11:29 -0700, Grant Grundler wrote: On Mon, Jul 22, 2013 at 10:07 AM, Eric Dumazet eric.duma...@gmail.com wrote: ... I guess that if a driver does not advertise NETIF_F_SG, this skb_linearize() call is not

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Ben Hutchings
On Mon, 2013-07-22 at 11:47 -0700, Eric Dumazet wrote: On Mon, 2013-07-22 at 19:38 +0100, Ben Hutchings wrote: On Mon, 2013-07-22 at 11:29 -0700, Grant Grundler wrote: On Mon, Jul 22, 2013 at 10:07 AM, Eric Dumazet eric.duma...@gmail.com wrote: ... I guess that if a driver does