From owner-freebsd-hackers Wed Dec 22 22:20:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from sumatra.americantv.com (sumatra.americantv.com [208.139.222.227]) by hub.freebsd.org (Postfix) with ESMTP id E6E7D1513F for ; Wed, 22 Dec 1999 22:20:41 -0800 (PST) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id AAA01893; Thu, 23 Dec 1999 00:20:39 -0600 (CST) Received: from free.pcs (free.PCS [148.105.10.51]) by right.PCS (8.8.5/8.6.4) with ESMTP id AAA25509; Thu, 23 Dec 1999 00:20:38 -0600 (CST) Received: (from jlemon@localhost) by free.pcs (8.8.6/8.8.5) id AAA06610; Thu, 23 Dec 1999 00:20:37 -0600 (CST) Date: Thu, 23 Dec 1999 00:20:37 -0600 (CST) From: Jonathan Lemon Message-Id: <199912230620.AAA06610@free.pcs> To: visi0n@aux-tech.org, hackers@freebsd.org Subject: Re: sk_buff vs mbuf X-Newsgroups: local.mail.freebsd-hackers In-Reply-To: References: Organization: Architecture and Operating System Fanatics Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you write: > > >On Wed, 22 Dec 1999, Ronald F. Guilmette wrote: > >> >> In message >, 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