public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eli Carter <eli.carter@inet.com>
To: Tobin Park <shinywind@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Network buffer allocation
Date: Thu, 20 Sep 2001 09:34:37 -0500	[thread overview]
Message-ID: <3BA9FE7D.912233AD@inet.com> (raw)
In-Reply-To: <F177WQejqpRI7aIrq0400001a8c@hotmail.com>

Tobin Park wrote:
> 
> Hello,
> I am a newbie of linux kernel and studying network kernel source.
> when network device driver receives packet and allocates buffer,
> what is the default size of allocation?
> and is there any reallocation happened when upper layer(ip/tcp) manipulates
> buffer which was allocated by device driver?

You like to jump in the deep end, I see.

You might want to look at LINUX IP Stacks Commentary by Satchell and
Clifford (Coriolis).  It covers 2.0, but it might prove helpful anyway.
(Also look into the device driver book, kernelnewbies.org, and the
like...)

I'm not sure about a default allocation size... I'm not sure if there is
one.

But as for the reallocation in the upper layers, usually it doesn't.  (I
think there are some cases where it may have to, but we want to avoid it
when we can.)  From my knowledge of 2.2.x, you'll want to look at how
that is avoided by using skb_push(), skb_pull(), skb_trim(),
skb_reserve(), etc.
skb_copy() and skb_clone() may also be of interest.

HTH, and good luck!

Eli 
--------------------.     Real Users find the one combination of bizarre
Eli Carter           \ input values that shuts down the system for days.
eli.carter(a)inet.com `-------------------------------------------------

      reply	other threads:[~2001-09-20 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-20  1:36 Network buffer allocation Tobin Park
2001-09-20 14:34 ` Eli Carter [this message]

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=3BA9FE7D.912233AD@inet.com \
    --to=eli.carter@inet.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shinywind@hotmail.com \
    /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