Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] atm: use SKB_TRUESIZE() in atm_guess_pdu2truesize()
Date: Tue, 22 Nov 2011 21:33:54 +0100	[thread overview]
Message-ID: <1321994034.19663.9.camel@edumazet-laptop> (raw)
In-Reply-To: <20111122152207.114bcd68@thirdoffive.cmf.nrl.navy.mil>

Le mardi 22 novembre 2011 à 15:22 -0500, chas williams - CONTRACTOR a
écrit :
> it doesnt seem like a good idea to create a wrapper for a one to one
> call.  perhaps this whole bit of nonsense should be removed.  the
> iphase driver should be returning skb->truesize like everyone.  
> 
> if atm_alloc_charge() just uses SKB_TRUESIZE() then we konw that guess
> will be the same as skb->truesize and atm_alloc_charge() can be
> simplified by removing atomic_add(skb->truesize - guess, which will be
> 0 in all cases.
> 

Please note I didnt create a wrapper, only correct existing one :)

Feel free to send a (tested) patch, but be warned that following code is
not correct :

int size = something;

struct sk_buff *skb = skb_alloc(size);

ASSERT(skb->truesize == SKB_TRUESIZE(size));

(It might be true with SLOB only)

  reply	other threads:[~2011-11-22 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22  5:51 [PATCH net-next] atm: use SKB_TRUESIZE() in atm_guess_pdu2truesize() Eric Dumazet
2011-11-22 20:16 ` David Miller
2011-11-22 20:22 ` chas williams - CONTRACTOR
2011-11-22 20:33   ` Eric Dumazet [this message]
2011-11-22 22:42     ` chas williams - CONTRACTOR

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=1321994034.19663.9.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=chas@cmf.nrl.navy.mil \
    --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