netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Disable forwarding of LRO skbs [2nd try]
@ 2008-06-19 18:06 Ben Hutchings
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2008-06-19 18:06 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, linux-net-drivers, Kieran Mansley, Herbert Xu,
	Stephen Hemminger

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(-)

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 0/2] Disable forwarding of LRO skbs [2nd try]
@ 2008-06-19 18:44 Ben Hutchings
  2008-06-19 21:50 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2008-06-19 18:44 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, linux-net-drivers, Kieran Mansley, Herbert Xu,
	Stephen Hemminger

[Re-sent with the correct Message-ID, previously eaten by mutt.]

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(-)

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/2] Disable forwarding of LRO skbs [2nd try]
  2008-06-19 18:44 Ben Hutchings
@ 2008-06-19 21:50 ` Stephen Hemminger
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2008-06-19 21:50 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: David Miller, netdev, linux-net-drivers, Kieran Mansley,
	Herbert Xu

On Thu, 19 Jun 2008 19:44:56 +0100
Ben Hutchings <bhutchings@solarflare.com> wrote:

> [Re-sent with the correct Message-ID, previously eaten by mutt.]
> 
> 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
> 

I like that it covers both cases and looks clean. If anyone ever gets
around to rewriting the network device driver chapter in the linux
kernel book(s) this should be covered in more detail.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-19 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-19 18:06 [PATCH 0/2] Disable forwarding of LRO skbs [2nd try] Ben Hutchings
  -- strict thread matches above, loose matches on Subject: below --
2008-06-19 18:44 Ben Hutchings
2008-06-19 21:50 ` Stephen Hemminger

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).