Netdev List
 help / color / mirror / Atom feed
From: Sharat Masetty <sharat_masetty@yahoo.com>
To: netdev@vger.kernel.org
Subject: Question about more headroom in skb
Date: Mon, 10 May 2010 13:09:27 -0700 (PDT)	[thread overview]
Message-ID: <682359.68270.qm@web112510.mail.gq1.yahoo.com> (raw)

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.


      


             reply	other threads:[~2010-05-10 20:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10 20:09 Sharat Masetty [this message]
2010-05-11  5:06 ` Question about more headroom in skb Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=682359.68270.qm@web112510.mail.gq1.yahoo.com \
    --to=sharat_masetty@yahoo.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox