netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <tom.leiming@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Ben Hutchings" <bhutchings@solarflare.com>,
	"Oliver Neukum" <oliver@neukum.org>,
	"Grant Grundler" <grundler@google.com>,
	"Freddy Xin" <freddy@asix.com.tw>,
	"David Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	linux-usb@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	"ASIX Louis [蘇威陸]" <louis@asix.com.tw>,
	"Allan Chou" <allan@asix.com.tw>
Subject: Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A
Date: Thu, 25 Jul 2013 10:28:20 +0800	[thread overview]
Message-ID: <CACVXFVN0eN9E9efr8UdqFz68-emHa2o-RQ0RYfazEq8f=qxkLQ@mail.gmail.com> (raw)
In-Reply-To: <1374559827.4990.143.camel@edumazet-glaptop>

On Tue, Jul 23, 2013 at 2:10 PM, Eric Dumazet <eric.dumazet@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 Grundler wrote:
>> > > > On Mon, Jul 22, 2013 at 10:07 AM, Eric Dumazet <eric.dumazet@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 setting this...but
>> > > > I'm not sure how that matters.
>> > > >
>> > > > ax88179_set_features() doesn't allow setting SG or TSO features.  But
>> > > > I expect it would be "not too difficult" to add such that ethtool
>> > > > could set those features after boot.
>> > > [...]
>> > >
>> > > It already can.  That's what putting feature flags in hw_features does.
>> >
>> > My original concern, that inspired this patch, was to remove SG support,
>> > as this driver does not have SG support at all.
>> >
>> > Linearize a full TSO packet needs order-5 allocations, thats likely to
>> > fail and lead to very slow TCP performance, because it will only rely on
>> > retransmits.
>>
>> The driver could set gso_max_size to reduce that problem.  But I rather
>> doubt that TSO followed by skb_linearize() significantly improves
>> throughput or CPU-efficiency.  (If the device has a 1G link but is
>> connected to the host through a USB 2.0 port, then USB is the bottleneck
>> and TSO could improve throughput a few percent.  But that's a silly
>> configuration.)
>>
>> 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 only be a matter of time before there is USB ultra
>> speed (or whatever comes after 'super') with 10GbE devices...
>>
>
> This sounds a good idea.
>
> Is anybody working on adding SG to usbnet ?

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:

http://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=10e232c597ac757e7f8600649f7e872e86de190f

I am wondering if network stack can meet that.  If not, it might be a
bit difficult
because lots of USB host controller don't support that, and driver may have
to support SG and non-SG at the same time for working well on all HCs.

Thanks,
-- 
Ming Lei

  parent reply	other threads:[~2013-07-25  2:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-20  9:16 freddy
2013-07-22 17:07 ` Eric Dumazet
2013-07-22 17:11   ` Ben Hutchings
2013-07-22 18:29   ` Grant Grundler
2013-07-22 18:38     ` Ben Hutchings
2013-07-22 18:47       ` Eric Dumazet
2013-07-22 19:47         ` Ben Hutchings
     [not found]           ` <1374522471.1635.48.camel-/LGg1Z1CJKQ+9kgCwbf1HqK4ta4zdZpAajtMo4Cw6ucAvxtiuMwx3w@public.gmane.org>
2013-07-23  6:10             ` Eric Dumazet
2013-07-23 23:46               ` David Miller
2013-07-23 23:56                 ` Eric Dumazet
2013-07-24  0:05                   ` Eric Dumazet
2013-07-24  0:15                     ` [PATCH] usbnet: do not pretend to support SG/TSO Eric Dumazet
2013-07-26 20:48                       ` David Miller
2013-07-24  0:17                     ` [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A David Miller
2013-07-24  2:29                 ` Grant Grundler
     [not found]                   ` <CANEJEGtLavwdPdq_Qojz_x-DQ3KXfZp0vPYr6imKtNxN0Hf_2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-24  2:32                     ` Grant Grundler
2013-07-25  2:28               ` Ming Lei [this message]
2013-07-25  5:10                 ` Eric Dumazet
2013-07-25  5:25                   ` Ming Lei
     [not found]                     ` <CACVXFVNyFk0Zpi4tC0ENiq8RcrtrjYW-Dhs+A56+Pw4BKm8y8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-25 11:01                       ` Eric Dumazet
2013-07-25 14:52                         ` Ming Lei
2013-07-25 15:00                           ` Ben Hutchings
     [not found]                           ` <CACVXFVNre5SsJhaVqFNRcop7ahqxabWqHZkjBZccj1ZqOAUZ9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-25 15:11                             ` Eric Dumazet
2013-07-25 13:34                     ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACVXFVN0eN9E9efr8UdqFz68-emHa2o-RQ0RYfazEq8f=qxkLQ@mail.gmail.com' \
    --to=tom.leiming@gmail.com \
    --cc=allan@asix.com.tw \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=freddy@asix.com.tw \
    --cc=grundler@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=louis@asix.com.tw \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.org \
    --subject='Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).