From: Johannes Berg <johannes@sipsolutions.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
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, 05 May 2008 17:22:40 +0200 [thread overview]
Message-ID: <1210000960.8245.28.camel@johannes.berg> (raw)
In-Reply-To: <20080505150405.GA9626@gondor.apana.org.au>
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
On Mon, 2008-05-05 at 23:04 +0800, Herbert Xu wrote:
> 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.
I figured. Just add it?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2008-05-05 15:23 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
2008-05-05 15:22 ` Johannes Berg [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=1210000960.8245.28.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--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