On Fri, 2013-04-12 at 06:10 -0700, Eric Dumazet wrote:
Strange. I feel you overestimate the final skb->truesize
The name 'truesize' is a bit misleading here, as its the size of
skb->head. A better name would have been frag_size, and you should not
include in it the struct skb_shared_info overhead because build_skb()
does it :
Oh well, build_skb() does :
size -= SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
so your patch is fine, only the @truesize name is misleading.
skb->truesize will be set to SKB_TRUESIZE(frag_size)
#define SKB_TRUESIZE(X) ((X) + \
SKB_DATA_ALIGN(sizeof(struct sk_buff)) + \
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))