From: Eric Dumazet <dada1@cosmosbay.com>
To: Mark Ryden <markryde@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: skb_warn_if_lro(skb) in ip_forward()
Date: Mon, 27 Apr 2009 08:53:23 +0200 [thread overview]
Message-ID: <49F55663.1050705@cosmosbay.com> (raw)
In-Reply-To: <dac45060904262343v481d2665s4074e901852406b5@mail.gmail.com>
Mark Ryden a écrit :
> Hello,
>
> I would appreciate if somebody will explain in a few sentences, why,
> when forwarding
> a packet in IPV4 , in ip_forward() method, (net/ipv4/ip_forward.c) we
> drop the packet
> if it is lro.
>
> To be more specific, why do we have, in ip_forward() :
> ...
> ...
> if (skb_warn_if_lro(skb))
> goto drop;
git blame is your friend :)
-> commit 4497b0763cb1afae463f5e144c28b5d806e28b60 added this call
net: Discard and warn about LRO'd skbs received for forwarding
Then google search gave :
http://kerneltrap.org/index.php?q=mailarchive/linux-netdev/2008/6/19/2173204
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.
Since the previous version of these patches, I have:
- Tightened the test for LRO'd skbs, so it should not catch skbs from
VM guests that want GSO
- Made the test an inline function, with the warning a separate extern
function
- Rebased against net-next-2.6
Ben.
Ben Hutchings (2):
net: Disable LRO on devices that are forwarding
net: Discard and warn about LRO'd skbs received for forwarding
include/linux/netdevice.h | 1 +
include/linux/skbuff.h | 14 ++++++++++++++
net/bridge/br_forward.c | 2 +-
net/bridge/br_if.c | 1 +
net/core/dev.c | 24 ++++++++++++++++++++++++
net/core/skbuff.c | 8 ++++++++
net/ipv4/devinet.c | 21 ++++++++++++++++-----
net/ipv4/ip_forward.c | 3 +++
net/ipv6/addrconf.c | 6 ++++++
net/ipv6/ip6_output.c | 3 +++
10 files changed, 77 insertions(+), 6 deletions(-)
next prev parent reply other threads:[~2009-04-27 6:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 6:43 skb_warn_if_lro(skb) in ip_forward() Mark Ryden
2009-04-27 6:53 ` Eric Dumazet [this message]
2009-04-27 7:04 ` David Miller
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=49F55663.1050705@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=markryde@gmail.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.