From owner-svn-src-head@freebsd.org Wed Jul 19 21:18:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A83A6D7E9C6; Wed, 19 Jul 2017 21:18:05 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7827E6CEFA; Wed, 19 Jul 2017 21:18:05 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JLI4Eu042973; Wed, 19 Jul 2017 21:18:04 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JLI4NM042972; Wed, 19 Jul 2017 21:18:04 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201707192118.v6JLI4NM042972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 19 Jul 2017 21:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321253 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 321253 X-SVN-Commit-Repository: base 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.23 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: Wed, 19 Jul 2017 21:18:05 -0000 Author: sbruno Date: Wed Jul 19 21:18:04 2017 New Revision: 321253 URL: https://svnweb.freebsd.org/changeset/base/321253 Log: Don't cache mbuf pointers if the number of descriptors is greater than the number of buffers. Submitted by: Matt Macy Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Jul 19 21:06:31 2017 (r321252) +++ head/sys/net/iflib.c Wed Jul 19 21:18:04 2017 (r321253) @@ -2927,6 +2927,14 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag m_free(tmp); continue; } + m = m->m_next; + count++; + } while (m != NULL); + if (count > *nsegs) + return (0); + m = *m0; + count = 0; + do { next = (pidx + count) & (ntxd-1); MPASS(ifsd_m[next] == NULL); ifsd_m[next] = m;