svn commit: r279365 - head/sys/dev/xen/netfront
Gleb Smirnoff
glebius at FreeBSD.org
Fri Feb 27 19:12:36 UTC 2015
Author: glebius
Date: Fri Feb 27 19:12:35 2015
New Revision: 279365
URL: https://svnweb.freebsd.org/changeset/base/279365
Log:
Use m_getjcl() instead of old mbuf(9) KPIs.
Tested by: royger
Modified:
head/sys/dev/xen/netfront/netfront.c
Modified: head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- head/sys/dev/xen/netfront/netfront.c Fri Feb 27 19:05:23 2015 (r279364)
+++ head/sys/dev/xen/netfront/netfront.c Fri Feb 27 19:12:35 2015 (r279365)
@@ -815,17 +815,8 @@ network_alloc_rx_buffers(struct netfront
*/
batch_target = sc->rx_target - (req_prod - sc->rx.rsp_cons);
for (i = mbufq_len(&sc->xn_rx_batch); i < batch_target; i++) {
- MGETHDR(m_new, M_NOWAIT, MT_DATA);
+ m_new = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
if (m_new == NULL) {
- printf("%s: MGETHDR failed\n", __func__);
- goto no_mbuf;
- }
-
- if (m_cljget(m_new, M_NOWAIT, MJUMPAGESIZE) == NULL) {
- printf("%s: m_cljget failed\n", __func__);
- m_freem(m_new);
-
-no_mbuf:
if (i != 0)
goto refill;
/*
More information about the svn-src-all
mailing list