Netdev List
 help / color / mirror / Atom feed
* Question about more headroom in skb
@ 2010-05-10 20:09 Sharat Masetty
  2010-05-11  5:06 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: Sharat Masetty @ 2010-05-10 20:09 UTC (permalink / raw)
  To: netdev

Hello All,

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 packet. 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 allocation and header reservation happens(Any light here would be really helpful.)

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). I want to figure out a good way(may be tune some parameters) to allocate extra 3 words for any skbuff independant of the transport protocol being used. Any light here would be very much appreciated.

Thanks,
Sharat.


      


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-11  5:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 20:09 Question about more headroom in skb Sharat Masetty
2010-05-11  5:06 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox