From owner-cvs-src@FreeBSD.ORG Thu Dec 8 13:19:05 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9172816A448 for ; Thu, 8 Dec 2005 13:19:05 +0000 (GMT) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE9FC43E19 for ; Thu, 8 Dec 2005 13:18:27 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 58453 invoked from network); 8 Dec 2005 13:13:53 -0000 Received: from c00l3r.networx.ch (HELO freebsd.org) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 8 Dec 2005 13:13:53 -0000 Message-ID: <43983262.D92F9653@freebsd.org> Date: Thu, 08 Dec 2005 14:17:22 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org References: <200512081313.jB8DD6ak085172@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: cvs commit: src/sys/kern kern_mbuf.c uipc_mbuf.c src/sys/sysmbuf.h param.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2005 13:19:05 -0000 Andre Oppermann wrote: > > andre 2005-12-08 13:13:06 UTC > > FreeBSD src repository > > Modified files: > sys/kern kern_mbuf.c uipc_mbuf.c > sys/sys mbuf.h param.h > Log: > Add an API for jumbo mbuf cluster allocation and also provide > 4k clusters in addition to 9k and 16k ones. > > struct mbuf *m_getjcl(int how, short type, int flags, int size) > void *m_cljget(struct mbuf *m, int how, int size) > > m_getjcl() returns an mbuf with a cluster of the specified size attached > like m_getcl() does for 2k clusters. > > m_cljget() is different from m_clget() as it can allocate clusters > without attaching them to an mbuf. In that case the return value > is the pointer to the cluster of the requested size. If an mbuf was > specified, it gets the cluster attached to it and the return value > can be safely ignored. > > For size both take MCLBYTES, MJUM4BYTES, MJUM9BYTES, MJUM16BYTES. > > Reviewed by: glebius > Tested by: glebius > Sponsored by: TCP/IP Optimization Fundraise 2005 This API may still fluctuate a bit as we gain more experience with the implementation of jumbo clusters in various network drivers. Please note that the recently added 9k and 16k jumbo clusters are not physically contignous but may be chopped into chunks of page size. -- Andre