From: Kieran Mansley <kmansley@solarflare.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>,
bhutchings@solarflare.com, shemminger@vyatta.com,
netdev@vger.kernel.org
Subject: Re: [PATCH 0/2] Disable forwarding of LRO skbs
Date: Thu, 01 May 2008 12:00:28 +0100 [thread overview]
Message-ID: <1209639628.4191.21.camel@moonstone.uk.level5networks.com> (raw)
In-Reply-To: <E1JrVtK-0001pb-00@gondolin.me.apana.org.au>
On Thu, 2008-05-01 at 18:19 +0800, Herbert Xu wrote:
> David Miller <davem@davemloft.net> wrote:
> > From: Ben Hutchings <bhutchings@solarflare.com>
> > Date: Wed, 30 Apr 2008 22:48:46 +0100
> >
> >> Large Receive Offload (LRO) destroys packet headers that should be
> >> preserved when forwarding. Currently it also triggers a BUG() or WARN()
> >> in skb_gso_segment(). We should disable it wherever forwarding is
> >> enabled, and discard LRO skbs with a warning if it is turned back on.
> >
> > Thanks for reposting your work, I'll take a closer look at these
> > two patches later today.
>
> This patch completely breaks forwarding of GSO packets in a
> virtualised environment where we explicitly want to forward
> them as is to reduce per-packet overhead. So if LRO is causing
> problems then I suggest we find a better way around that that
> does not penalise all forms of GSO.
If I remember rightly the nub of the matter as far as that is concerned
is that both LRO and GSO use the gso_size field in the SKB. Normally
this overloading is fine as LRO is receive-side and GSO is send-side and
so the two code paths are different and react to the gso_size field
appropriately. However, when an LRO packet is forwarded by a bridge to
another device it then appears on the send path and the gso_size field
being set (because it is an LRO packet) means it is interpreted as being
a GSO packet. To some extent this should be OK - fragmenting it should
be really easy as it's already in what are likely to be appropriate
sized chunks in the frag_list - but the code at the moment generates
warnings and BUGs in this case as it's (understandably) not been written
to cope with both LRO and GSO packets. There's no reason why it has to
be that way however.
Fundamentally I think it would be an improvement to have some definite
way to distinguish LRO and GSO packets, regardless of whether it can
cope with both. If that were available, it would be possible to warn on
LRO packets without affecting the GSO packets being forwarded in
virtualised environements.
As an aside, the gso_size field isn't the only one that has a slightly
different meaning depending on whether the SKB was generated by a stack
or a device. The ip_summed field is I think another one, and would
surely need special handling by the bridge when forwarding packets. If
it's already doing this, there's a precedent for fixing things up there.
Kieran
next prev parent reply other threads:[~2008-05-01 11:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 21:48 [PATCH 0/2] Disable forwarding of LRO skbs Ben Hutchings
2008-04-30 21:51 ` [PATCH 1/2] " Ben Hutchings
2008-05-01 9:51 ` David Miller
2008-04-30 21:54 ` [PATCH 2/2] " Ben Hutchings
2008-04-30 21:58 ` [PATCH 0/2] " David Miller
2008-05-01 10:19 ` Herbert Xu
2008-05-01 10:34 ` David Miller
2008-05-01 10:38 ` Herbert Xu
2008-05-01 10:45 ` Herbert Xu
2008-05-01 10:52 ` David Miller
2008-05-01 10:55 ` Herbert Xu
2008-05-01 11:04 ` Kieran Mansley
2008-05-01 10:51 ` David Miller
2008-05-01 10:53 ` Herbert Xu
2008-05-01 11:00 ` Kieran Mansley [this message]
2008-05-01 11:06 ` Herbert Xu
2008-05-01 10:42 ` Herbert Xu
2008-05-01 11:02 ` Ben Hutchings
2008-05-01 11:08 ` Kieran Mansley
2008-05-01 11:12 ` Herbert Xu
2008-05-01 11:18 ` Kieran Mansley
2008-05-01 11:37 ` Herbert Xu
2008-05-01 12:08 ` Ben Hutchings
2008-05-01 12:19 ` Herbert Xu
2008-05-12 14:48 ` Ben Hutchings
2008-05-01 14:06 ` Herbert Xu
2008-06-15 0:51 ` Ben Hutchings
2008-06-15 1:46 ` Ben Hutchings
2008-06-15 3:38 ` Herbert Xu
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=1209639628.4191.21.camel@moonstone.uk.level5networks.com \
--to=kmansley@solarflare.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).