Messages in this thread | | | Date | Fri, 4 Jun 2004 08:36:52 -0400 | From | Bart Trojanowski <> | Subject | Re: modifying struct sk_buff |
| |
* Sushant Sharma <sushant@cs.unm.edu> [040603 20:24]: > Hi > I want to add a new member (say uint32_t) in the > struct sk_buff{...} > in the file include/linux/skbuff.h. <snip> > Do I need to allocate memory for this member > ( ie add sizeof(_new-member_) to *size* while doing kmalloc() )
Hi Sushant,
I think you are confusing the allocation of 'data' with the allocation of 'skb'.
If you add the uint32_t to struct sk_buff you don't have to modify alloc_skb. The skbuff_head_cache is informed what size the sk_buff structure is in skb_init().
-Bart
-- WebSig: http://www.jukie.net/~bart/sig/ [unhandled content-type:application/pgp-signature] | |