public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta•com>
To: Ben Hutchings <bhutchings@solarflare•com>
Cc: Herbert Xu <herbert@gondor•apana.org.au>,
	netdev <netdev@vger•kernel.org>,
	netfilter-devel <netfilter-devel@vger•kernel.org>
Subject: Re: skb_checksum_help() vs GSO
Date: Thu, 12 Jan 2012 14:10:17 -0800	[thread overview]
Message-ID: <20120112141017.0a83e973@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1326400930.2740.10.camel@bwh-desktop>

On Thu, 12 Jan 2012 20:42:10 +0000
Ben Hutchings <bhutchings@solarflare•com> wrote:

> skb_checksum_help() does:
> 
> 	if (unlikely(skb_shinfo(skb)->gso_size)) {
> 		/* Let GSO fix up the checksum. */
> 		goto out_set_summed;
> 	}
> ...
> out_set_summed:
> 	skb->ip_summed = CHECKSUM_NONE;
> out:
> 	return ret;
> 
> but skb_gso_segment() requires that skb->ip_summed == CHECKSUM_PARTIAL
> and WARNs if not.  I don't think there's any case where it's valid to
> call both.  Shouldn't skb_checksum_help() also WARN and return an error
> code instead of muddling on?
> 
> Inspecting the callers of skb_checksum_help(), it looks like sch_netem's
> 'corrupt' option and xt_CHECKSUM might trigger this case.
> 
> Ben.

Netem needs to check for GSO manually segment before calling skb_checksum_help.
I'll sort it out.

      parent reply	other threads:[~2012-01-12 22:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 20:42 skb_checksum_help() vs GSO Ben Hutchings
2012-01-12 22:03 ` Herbert Xu
2012-01-13  0:57   ` [RFC] netem: de-GSO packets before enqueing Stephen Hemminger
2012-01-13 15:54     ` Eric Dumazet
2012-01-13 19:20       ` Stephen Hemminger
2012-01-13 23:44         ` Eric Dumazet
2012-01-14 16:06     ` Hagen Paul Pfeifer
2012-01-12 22:10 ` Stephen Hemminger [this message]

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=20120112141017.0a83e973@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta$(echo .)com \
    --cc=bhutchings@solarflare$(echo .)com \
    --cc=herbert@gondor$(echo .)apana.org.au \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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