Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12241

Why netdev_alloc_skb_ip_align allocates different size of sk_buffers?

$
0
0

The next issue is regarding linux kernel buffers for managing network packets, as known as sk_buff.

  • I'm running a code that every time that some event occurs it calls netdev_alloc_skb_ip_align to allocate a new skb with length of 1536 bytes.
  • However, sometimes I see the allocated skb is with skb->len=1536 (skb->truesize=1984), and sometimes with skb->len=1792 (skb->truesize=2240).

Question: I guess it's not a bug... But does anyone can tell for sure if this is the correct behavior of the memory allocation mechanism of sk-buffers ? (an explanation or some reference to an explanation would also be nice).

Thanks


Viewing all articles
Browse latest Browse all 12241

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>