From owner-svn-src-head@FreeBSD.ORG Fri May 7 22:09:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB3481065672; Fri, 7 May 2010 22:09:17 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CAA0D8FC0C; Fri, 7 May 2010 22:09:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o47M9Hqa024511; Fri, 7 May 2010 22:09:17 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47M9Hxf024507; Fri, 7 May 2010 22:09:17 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201005072209.o47M9Hxf024507@svn.freebsd.org> From: Fabien Thomas Date: Fri, 7 May 2010 22:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207761 - in head/sys: dev/bce dev/mxge sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 22:09:18 -0000 Author: fabient Date: Fri May 7 22:09:17 2010 New Revision: 207761 URL: http://svn.freebsd.org/changeset/base/207761 Log: Add a fastpath to allocate from packet zone when using m_getjcl. This will add support for packet zone for at least igb and ixgbe and will avoid to check for that in bce and mxge. MFC after: 1 week Modified: head/sys/dev/bce/if_bce.c head/sys/dev/mxge/if_mxge.c head/sys/sys/mbuf.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Fri May 7 21:48:51 2010 (r207760) +++ head/sys/dev/bce/if_bce.c Fri May 7 22:09:17 2010 (r207761) @@ -5059,11 +5059,8 @@ bce_get_rx_buf(struct bce_softc *sc, str #ifdef BCE_JUMBO_HDRSPLIT MGETHDR(m_new, M_DONTWAIT, MT_DATA); #else - if (sc->rx_bd_mbuf_alloc_size <= MCLBYTES) - m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - else - m_new = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, - sc->rx_bd_mbuf_alloc_size); + m_new = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + sc->rx_bd_mbuf_alloc_size); #endif if (m_new == NULL) { Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Fri May 7 21:48:51 2010 (r207760) +++ head/sys/dev/mxge/if_mxge.c Fri May 7 22:09:17 2010 (r207761) @@ -2400,10 +2400,7 @@ mxge_get_buf_big(struct mxge_slice_state mxge_rx_ring_t *rx = &ss->rx_big; int cnt, err, i; - if (rx->cl_size == MCLBYTES) - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - else - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, rx->cl_size); + m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, rx->cl_size); if (m == NULL) { rx->alloc_fail++; err = ENOBUFS; Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Fri May 7 21:48:51 2010 (r207760) +++ head/sys/sys/mbuf.h Fri May 7 22:09:17 2010 (r207761) @@ -523,6 +523,9 @@ m_getjcl(int how, short type, int flags, struct mbuf *m, *n; uma_zone_t zone; + if (size == MCLBYTES) + return m_getcl(how, type, flags); + args.flags = flags; args.type = type;