[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1321994034.19663.9.camel@edumazet-laptop>
Date: Tue, 22 Nov 2011 21:33:54 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: chas williams - CONTRACTOR <chas@....nrl.navy.mil>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] atm: use SKB_TRUESIZE() in
atm_guess_pdu2truesize()
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)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists