From: Herbert Xu <herbert@gondor.apana.org.au>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S. Miller" <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [RFC/T] [NET] give truesize warning when truesize differs
Date: Mon, 5 May 2008 23:04:05 +0800 [thread overview]
Message-ID: <20080505150405.GA9626@gondor.apana.org.au> (raw)
In-Reply-To: <1209993080.8245.16.camel@johannes.berg>
On Mon, May 05, 2008 at 03:11:20PM +0200, Johannes Berg wrote:
>
> > static inline void skb_truesize_check(struct sk_buff *skb)
> > {
> > - int len = sizeof(struct sk_buff) + skb->len;
> > +#ifdef NET_SKBUFF_DATA_USES_OFFSET
> > + int len = sizeof(struct sk_buff) + skb->end;
> > +#else
> > + int len = sizeof(struct sk_buff) + (skb->end - skb->head);
> > +#endif
>
> Umm, is this even correct? Should it check data_len? I seem to get the
> truesize warning a bit now:
It must check data_len.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2008-05-05 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 18:12 [RFC/T] [NET] give truesize warning when truesize differs Johannes Berg
2008-05-04 22:09 ` Johannes Berg
2008-05-05 13:11 ` Johannes Berg
2008-05-05 15:04 ` Herbert Xu [this message]
2008-05-05 15:22 ` Johannes Berg
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=20080505150405.GA9626@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--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