From: Ben Hutchings <bhutchings@solarflare.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net 2/2] net: WARN if skb_checksum_help() is called on skb requiring segmentation
Date: Tue, 17 Jan 2012 17:15:02 +0000 [thread overview]
Message-ID: <1326820502.2478.5.camel@bwh-desktop> (raw)
In-Reply-To: <20120117061115.GA14918@gondor.apana.org.au>
On Tue, 2012-01-17 at 17:11 +1100, Herbert Xu wrote:
> On Mon, Jan 16, 2012 at 10:43:38PM +0000, Ben Hutchings wrote:
> > skb_checksum_help() has never done anything useful with skbs that
> > require segmentation. Setting skb->ip_summed = CHECKSUM_NONE makes
> > them invalid and provokes a later WARNing in skb_gso_segment().
> >
> > Passing such an skb to skb_checksum_help() indicates a bug, so we
> > should warn about it immediately. Move the warning from
> > skb_gso_segment() into a shared function, and add the calling function
> > name, gso_type and gso_size to it.
> >
> > Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> > ---
> > The price for writing the warning format only once is having to pass in
> > the calling function name. Not sure whether it's a good trade-off.
>
> Do we really need the name since we should get a back trace?
If the compiler were to aggressively inline some of these functions then
it might no longer be clear where this was called from. But I agree
that the name is normally redundant, so I'll take it out.
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.
prev parent reply other threads:[~2012-01-17 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 22:38 [PATCH net 1/2] net: Use device model to get driver name in skb_gso_segment() Ben Hutchings
2012-01-16 22:41 ` Herbert Xu
2012-01-17 15:32 ` David Miller
2012-01-16 22:43 ` [PATCH net 2/2] net: WARN if skb_checksum_help() is called on skb requiring segmentation Ben Hutchings
2012-01-17 6:11 ` Herbert Xu
2012-01-17 15:32 ` David Miller
2012-01-17 17:15 ` Ben Hutchings [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=1326820502.2478.5.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/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).