Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, My kernel module should expand received IP packets with new IP header and UDP header and other private data in head( some like IP in IP encapsuled), all expand ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    8

    about headroom in sk_buff


    Hi,
    My kernel module should expand received IP packets with new IP header and UDP header and other private data in head( some like IP in IP encapsuled), all expand data will more than than 16, so I will have to use skb_realloc_headroom to expand the sk_buff, but I don't want to do this for performance,is it possible to allocate sk_buff reserve more than 16 in headroom and how to do this?

    hope you can understande my problem!

    Thanks!

  2. #2
    Just Joined!
    Join Date
    Jan 2009
    Posts
    7
    Hi,
    You have to re-allocate the buffer with sufficient head room or you will have to make the driver allocate extra bytes during buffer allocation and then reserve the required headroom for you.

    First one will impact your performance as skb_cow or skb_expand_headroom will allocate and copy the complete buffer.

    Regards
    Narender

  3. #3
    Just Joined!
    Join Date
    Jan 2009
    Posts
    8
    I got it

    Thanks!
    Ian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •