netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-net-drivers@solarflare.com,
	Kieran Mansley <kmansley@solarflare.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH 2/2] net: Discard and warn about LRO'd skbs received for forwarding
Date: Thu, 19 Jun 2008 23:42:51 +0100	[thread overview]
Message-ID: <20080619224246.GA29360@solarflare.com> (raw)
In-Reply-To: <20080619145015.3ec2307c@extreme>

Stephen Hemminger wrote:
> On Thu, 19 Jun 2008 19:08:34 +0100
> Ben Hutchings <bhutchings@solarflare.com> wrote:
> 
> > Add skb_warn_if_lro() to test whether an skb was received with LRO and
> > warn if so.
> > 
> > Change br_forward(), ip_forward() and ip6_forward() to call it) and
> > discard the skb if it returns true.
> 
> Actually shouldn't ip forwarding work because of refragmentation?

At the moment, LRO'd skbs have gso_size != 0 and ip_summed ==
CHECKSUM_UNNECESSARY (typically), and this results in taking the
GSO path on output and hitting a BUG() or WARN() in skb_segment_gso().
If you want to avoid this without dropping packets, you can avoid the
condition by either:

- setting gso_size = 0 - should result in fragmentation
- setting ip_summed = CHECKSUM_NONE - should result in GSO
  (maybe skb_forward_csum() could do that)

But I didn't try either of these because I think it's fundamentally
dodgy to apply LRO to forwarded packets.

Ben.

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

  parent reply	other threads:[~2008-06-19 22:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19 18:44 [PATCH 0/2] Disable forwarding of LRO skbs [2nd try] Ben Hutchings
2008-06-19 18:07 ` [PATCH 1/2] net: Disable LRO on devices that are forwarding Ben Hutchings
2008-06-19 23:21   ` David Miller
2008-06-20 11:11   ` Ben Hutchings
2008-06-20 11:17     ` Patrick McHardy
2008-06-20 14:21   ` Andi Kleen
2008-06-19 18:08 ` [PATCH 2/2] net: Discard and warn about LRO'd skbs received for forwarding Ben Hutchings
2008-06-19 21:50   ` Stephen Hemminger
2008-06-19 22:29     ` Brandeburg, Jesse
2008-06-19 22:42     ` Ben Hutchings [this message]
2008-06-19 23:27   ` David Miller
2008-06-19 21:50 ` [PATCH 0/2] Disable forwarding of LRO skbs [2nd try] Stephen Hemminger

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=20080619224246.GA29360@solarflare.com \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kmansley@solarflare.com \
    --cc=linux-net-drivers@solarflare.com \
    --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).