From owner-svn-src-head@FreeBSD.ORG Fri Feb 27 19:12:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EE6C3F3; Fri, 27 Feb 2015 19:12:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19A1FADE; Fri, 27 Feb 2015 19:12:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1RJCZs9048458; Fri, 27 Feb 2015 19:12:35 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1RJCZK4048457; Fri, 27 Feb 2015 19:12:35 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201502271912.t1RJCZK4048457@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 27 Feb 2015 19:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279365 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 27 Feb 2015 19:12:36 -0000 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; /*