Headroom and Tailroom in skb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I found that sock_alloc_send_skb() allocates a skb data area which is 
aligned on a word boundary (in alloc_skb()).

So given a datagram and its outgoing device (thereby hard_header_len),
the maximum wasted space in the skb data should be 15 bytes, right?

But I am seeing more "unused" space in my skb. My skb data area has the 
following pointers:

head: fb336000
data: fb33602e
tail: fb33660a
end : fb336620 

Therefore, there is 46 bytes of headroom and 22 bytes of tailroom. Could
anybody point out why this would be caused?

Additional info:
---------------
1. Kernel 2.2.18
2. Implementing a virtual device which attaches a 16 byte header between 
   IP and Ethernet header. Hence, vdev MTU is 1500 - 16 = 1484.
3. vdev then sends the packets over the physical ethernet interface.
4. vdev hard_header_len is set to ETH_HLEN + 16 = 30 bytes
5. In the example above, skb->data points to the virtual header.

TIA.
ciao,
Amit

-- 
I'm an angel!!! Honest!
The horns are just there to hold the halo up straight.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
                  Amit Kucheria
          EECS Grad. Research Assistant
         University of Kansas @ Lawrence
   (R): +1-785-830-8521 ||| (C): +1-785-760-2871
____________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux