netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* skb_checksum_help() vs GSO
@ 2012-01-12 20:42 Ben Hutchings
  2012-01-12 22:03 ` Herbert Xu
  2012-01-12 22:10 ` skb_checksum_help() vs GSO Stephen Hemminger
  0 siblings, 2 replies; 8+ messages in thread
From: Ben Hutchings @ 2012-01-12 20:42 UTC (permalink / raw)
  To: Herbert Xu; +Cc: netdev, Stephen Hemminger, netfilter-devel

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.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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

end of thread, other threads:[~2012-01-14 16:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` skb_checksum_help() vs GSO 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).