Date: Sat, 7 Jan 2012 01:12:22 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r229755 - in stable/7/sys: dev/bce dev/mxge sys Message-ID: <201201070112.q071CMpu017279@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Sat Jan 7 01:12:21 2012 New Revision: 229755 URL: http://svn.freebsd.org/changeset/base/229755 Log: MFC r207761: 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. Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/mxge/if_mxge.c stable/7/sys/sys/mbuf.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Sat Jan 7 01:08:17 2012 (r229754) +++ stable/7/sys/dev/bce/if_bce.c Sat Jan 7 01:12:21 2012 (r229755) @@ -5017,11 +5017,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: stable/7/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/7/sys/dev/mxge/if_mxge.c Sat Jan 7 01:08:17 2012 (r229754) +++ stable/7/sys/dev/mxge/if_mxge.c Sat Jan 7 01:12:21 2012 (r229755) @@ -2260,10 +2260,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: stable/7/sys/sys/mbuf.h ============================================================================== --- stable/7/sys/sys/mbuf.h Sat Jan 7 01:08:17 2012 (r229754) +++ stable/7/sys/sys/mbuf.h Sat Jan 7 01:12:21 2012 (r229755) @@ -484,6 +484,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201070112.q071CMpu017279>