Le lundi 20 septembre 2010 à 06:16 -0500, Amit Salecha a écrit :
truesize accounts for the real size of buffers, not the used part in
them.
IMHO, a driver not dealing with fragments should not touch skb->truesize
# grep truesize drivers/net/tg3.c
<nothing>
If a driver deals with fragments, it probably should use "+=" operator
only, not hardcoding sizeof(struct sk_buff) thing that only core network
has to deal with.
$ find drivers/net/bnx2x|xargs grep truesize
drivers/net/bnx2x/bnx2x_cmn.c: skb->truesize += frag_len;
Almost all drivers are fine, they are some of them that should be
changed.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html