From: Sharat Masetty on 10 May 2010 19:50
For my project I need 3 words of headroom in the skb in the network driver level, to add a custom header to the ethernet/ip packets. I looked into the tcp code and figured out tcp uses sk->sk_prot->max_header for header allocation size. But I was not able to confirm that all other transport protocol use the same mechanism(?) For example in UDP/ICMP I was not able to figure out from the code where the skb allocation and header reservation happens(Any light here would be really helpful.). Is there a parameter I can tune to allocate 3 words for any outgoing skb's, or what is the best way to do it?
I want to figure out a good way(may be tune some parameters) to allocate extra 3 words for any skbuff independent of the transport protocol being used. I have also looked at an API in skbuff skb_pad() which does what I want(add either headroom or tailroom), but I want to avoid that for performance reasons(skb_pad does kmalloc and memcpy). Any light here would be very much appreciated.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Prev: [017/117] nfsd4: bug in read_buf
Next: [034/117] ocfs2_dlmfs: Fix math error when reading LVB.