Can anyone plz explain me the fields
Can anyone plz explain me the fields skb = kmem_cache_alloc(skbuff_head_cache, gfp_mask & ~_ _GFP_DMA); ... ... ... size = SKB_DATA_ALIGN(size); data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask); It is the simplified version of skb_alloc().
Hi! On 17:38 Thu 04 Apr , Tarun Batra wrote:
Can anyone plz explain me the fields
skb = kmem_cache_alloc(skbuff_head_cache, gfp_mask & ~_ _GFP_DMA); ... ... ... size = SKB_DATA_ALIGN(size);
size of data buffer (the bytes you send over the wire not the overhead of everything you need in ram to process the packets)
data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask);
data is the actual buffer (+skb_shared_info at the end of it) -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com
participants (2)
-
michi1@michaelblizek.twilightparadox.com -
Tarun Batra