* skb_warn_if_lro(skb) in ip_forward()
@ 2009-04-27 6:43 Mark Ryden
2009-04-27 6:53 ` Eric Dumazet
2009-04-27 7:04 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Mark Ryden @ 2009-04-27 6:43 UTC (permalink / raw)
To: netdev
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;
...
...
Regards,
Mark Ryden
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: skb_warn_if_lro(skb) in ip_forward()
2009-04-27 6:43 skb_warn_if_lro(skb) in ip_forward() Mark Ryden
@ 2009-04-27 6:53 ` Eric Dumazet
2009-04-27 7:04 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2009-04-27 6:53 UTC (permalink / raw)
To: Mark Ryden; +Cc: netdev
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(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: skb_warn_if_lro(skb) in ip_forward()
2009-04-27 6:43 skb_warn_if_lro(skb) in ip_forward() Mark Ryden
2009-04-27 6:53 ` Eric Dumazet
@ 2009-04-27 7:04 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2009-04-27 7:04 UTC (permalink / raw)
To: markryde; +Cc: netdev
From: Mark Ryden <markryde@gmail.com>
Date: Mon, 27 Apr 2009 09:43:39 +0300
> 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.
Because we have no means by which to reconstitute the original
sub-frames so that we can forward them properly.
This is why, when forwarding or bridging is enabled on an interface
we disable LRO on all devices involved. Therefore we should never
see LRO frames here.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-27 7:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-27 6:43 skb_warn_if_lro(skb) in ip_forward() Mark Ryden
2009-04-27 6:53 ` Eric Dumazet
2009-04-27 7:04 ` David Miller
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).