Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Feb 2015 19:12:35 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279365 - head/sys/dev/xen/netfront
Message-ID:  <201502271912.t1RJCZK4048457@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 			/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502271912.t1RJCZK4048457>