RE: mbuf from scratch
RE: mbuf from scratch
- Subject: RE: mbuf from scratch
- From: "Carl Smith" <email@hidden>
- Date: Tue, 28 Jun 2005 17:24:54 -0400
- Thread-topic: mbuf from scratch
Justin-
Got it, guess I was just confused on the 'ifp' struct.
Using the term 'create from scratch' was with idea that when I capture
the original mbuf I play around with it, i.e. the data, then send it out
after I copy back 'my' data. In the mean time, other mbufs, might/will
be coming in to a pool, of mbufs, I have. Of course I keep the flow all
linear, but I was just concerned with 'hanging' on to the 'ifp' as other
mbufs backed up. But then I am not 'hanging' onto the original, my pool
of mbufs, are 'copies' of the originals.
Carl
-----Original Message-----
From: darwin-kernel-bounces+csmith=email@hidden
[mailto:darwin-kernel-bounces+csmith=email@hidden]
On Behalf Of Justin C. Walker
Sent: Tuesday, June 28, 2005 4:52 PM
To: Darwin Kernel
Subject: Re: mbuf from scratch
On Jun 28, 2005, at 13:16 , Carl Smith wrote:
> I was trying to get the consensus, is it OK to keep this "copied"
> 'ifp'
> around or should I create everything 'new' from scratch, when
> inputting
> my data into the mbuf? I am asking this question relating to
> performance, timing, memory and potential errors. Is there any benefit
> to creating the 'ifp' from scratch versus keeping a copy around?
The 'ifp' is a pointer to a kernel structure that you have no control
over. It is associated with a given mbuf at some point during the
mbuf's passage through the twisty little code passages in the
kernel. Therefore,
- if you are 'duplicating' an mbuf, copy the value from the
original mbuf and store it in the new one (e.g., as an argument to
m_devget()).
- do *not* save it anywhere for later use.
The fact that you keep referring to creating the ifp from scratch
concerns me (i.e., I don't understand what you are getting at). You
never create this pointer; you just copy it from the original mbuf to
the copy. What are you thinking about that makes "create from
scratch" a meaningful operation?
Regards,
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
If you're not confused,
You're not paying attention
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
ch.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden