site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thread-index: AcV8IyTTn+oBm+TsQb+Tu1EoaQwRuwAA4oaA 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=fortresstech.com@lists.apple.com [mailto:darwin-kernel-bounces+csmith=fortresstech.com@lists.apple.com] 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/csmith%40fortresste ch.com This email sent to csmith@fortresstech.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Carl Smith