public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Trojanowski <bart@jukie.net>
To: Sushant Sharma <sushant@cs.unm.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: modifying struct sk_buff
Date: Fri, 4 Jun 2004 08:36:52 -0400	[thread overview]
Message-ID: <20040604123652.GI29389@jukie.net> (raw)
In-Reply-To: <40BFCA4C.2000904@cs.unm.edu>

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

* Sushant Sharma <sushant@cs.unm.edu> [040603 20:24]:
> Hi
> I want to add a new member (say uint32_t) in the
> struct sk_buff{...}
> in the file include/linux/skbuff.h.
<snip>
> Do I need to allocate memory for this member
> (  ie add sizeof(_new-member_) to *size* while doing kmalloc()  )

Hi Sushant,

I think you are confusing the allocation of 'data' with the allocation
of 'skb'.

If you add the uint32_t to struct sk_buff you don't have to modify
alloc_skb.  The skbuff_head_cache is informed what size the sk_buff
structure is in skb_init().

-Bart

-- 
				WebSig: http://www.jukie.net/~bart/sig/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-06-04 12:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04  1:03 modifying struct sk_buff Sushant Sharma
2004-06-04 12:36 ` Bart Trojanowski [this message]
2004-06-04 18:47   ` Sharma Sushant
2004-06-04 20:05     ` Bart Trojanowski

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=20040604123652.GI29389@jukie.net \
    --to=bart@jukie.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sushant@cs.unm.edu \
    /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