Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Maciej Żenczykowski" <zenczykowski@gmail.com>
Cc: "Michał Mirosław" <mirqus@gmail.com>,
	"David Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	"Jay Vosburgh" <fubar@us.ibm.com>,
	"Andy Gospodarek" <andy@greyhouse.net>,
	"Tom Herbert" <therbert@google.com>,
	"Neal Cardwell" <ncardwell@google.com>,
	"Yuchung Cheng" <ycheng@google.com>
Subject: Re: [PATCH] bonding: allow TSO being set on bonding master
Date: Wed, 15 May 2013 21:44:31 -0700	[thread overview]
Message-ID: <1368679471.4519.104.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAHo-Oozt9tmfhhFHj0o+bGfRevcZw+YD6PpHAr-U_S76AbC+2A@mail.gmail.com>

Please do not top post on netdev.

On Wed, 2013-05-15 at 21:31 -0700, Maciej Żenczykowski wrote:
> I think it should always be possible to enable both TSO and GSO on the
> bond master - regardless of what the slaves support and/or currently
> have enabled.
> At the last moment as we're passing a packet to a slave, we should
> check whether the slave will like it and if not GSO it.
> This means TSO or GSO enabled on the master can effectively almost
> force (or force emulation of) GSO on slaves.
> Even if the slaves themselves don't support GSO.

GSO is software provided in core network.

> 
> There's a lot more room for argument with regards to the default state
> of TSO/GSO on the master.
> I would argue for default to on for both.
> One could argue that if none of the slaves support GSO or TSO then
> maybe it should default to off, but I don't buy that.
> 
> I don't really understand the point of passing GSO/TSO up from the
> slaves to the master.
> Although the maximum size and/or number of segs for a packet probably
> needs to be propagated from TSO capable devices,
> unless one were to add a "split big GSO packet into smaller (but still
> larger than mtu) TSO packets" step as well.

We could always build GSO packets in TCP stack and if these packets land
on a non SG/TSO capable device, segment them, but it would be more
expensive than building non GSO packets at the beginning.
Its also risky because this segmentation uses GFP_ATOMIC allocations and
therefore can easily fail (especially if SG is lacking)

So bonding has heuristics : 

- If at least one slave supports TSO, then the master supports TSO 
- If at least one slave support GSO, then the master supports GSO
...

Point is : as we do have software fallback, we should allow the admin to
set/unset TSO on the bonding master, regardless of slaves settings.

Depending on the netfilter/qdisc setups, an admin might know better than
the kernel heuristics.

  reply	other threads:[~2013-05-16  4:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 21:41 [PATCH] bonding: allow TSO being set on bonding master Eric Dumazet
2013-05-15 22:55 ` Michał Mirosław
2013-05-15 23:18   ` Eric Dumazet
2013-05-15 23:30     ` Eric Dumazet
2013-05-16  4:31       ` Maciej Żenczykowski
2013-05-16  4:44         ` Eric Dumazet [this message]
2013-05-16  5:45       ` Michał Mirosław
2013-05-16  6:09         ` Eric Dumazet
2013-05-16  8:59           ` Michał Mirosław
2013-05-16 17:34 ` [PATCH v2] " Eric Dumazet
2013-05-16 22:02   ` David Miller
2013-05-16 22:16     ` Eric Dumazet

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=1368679471.4519.104.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=mirqus@gmail.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    --cc=ycheng@google.com \
    --cc=zenczykowski@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox