Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Dec 1999 00:20:37 -0600 (CST)
From:      Jonathan Lemon <jlemon@americantv.com>
To:        visi0n@aux-tech.org, hackers@freebsd.org
Subject:   Re: sk_buff vs mbuf 
Message-ID:  <199912230620.AAA06610@free.pcs>
In-Reply-To: <local.mail.freebsd-hackers/Pine.LNX.4.05.9912230240160.1875-100000@ebola.chinatown.org>
References:  <local.mail.freebsd-hackers/62986.945886346@monkeys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-hackers/Pine.LNX.4.05.9912230240160.1875-100000@ebola.chinatown.org> you write:
>
>
>On Wed, 22 Dec 1999, Ronald F. Guilmette wrote:
>
>> 
>> In message
><Pine.LNX.4.05.9912220413460.888-100000@ebola.chinatown.org>, you wr
>> ote:
>> 
>> >
>> >	Is there someone closer to a linux box, tell me if sk_buff is more
>> >fast than mbuf. I was reading these codes but I can't figure out the final
>> >result.
>> 
>> I have a Linux system here, but I don't understand you question.
>> 
>	The question is what is more fast the sk_buff method or mbuf
>method ? 

Fast.  Flexible.  Efficient.  Memory-conserving.  What metric do you want?

Your question doesn't make sense; what do you mean by "more fast"?
Under which conditions?  Under what kind of load?

Linux' sk_buff implementation requires that the entire packet fit
within a single buffer.  As such, they don't have to deal with
m_pullup or mbuf clusters, since there is only _one_ buffer, and 
no such thing as buffer chains.  This also means that buffers 
either must be maximally sized in all cases, or the entire buffer
contents copied upon buffer overflow.

They place incoming buffers directly on the receive queue, with
no coalescing being done.  (no equivalent to sbappend).  On one
hand, this is quick.  On the other hand, it makes for very messy
code, and wastes a lot of space for small packets.

--
Jonathan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912230620.AAA06610>