From owner-dev-commits-src-branches@freebsd.org Sun Jan 31 08:53:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A43A4E831E; Sun, 31 Jan 2021 08:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DT4bc0Wnmz4lvD; Sun, 31 Jan 2021 08:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D35542516F; Sun, 31 Jan 2021 08:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10V8qx2V017857; Sun, 31 Jan 2021 08:52:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10V8qxpH017856; Sun, 31 Jan 2021 08:52:59 GMT (envelope-from git) Date: Sun, 31 Jan 2021 08:52:59 GMT Message-Id: <202101310852.10V8qxpH017856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vincenzo Maffione Subject: git: a8ca736bb4ed - stable/13 - iflib: netmap: move per-packet operation out of fragments loop MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vmaffione X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a8ca736bb4edb18848b6a828d946d1ddee419b56 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2021 08:53:00 -0000 The branch stable/13 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=a8ca736bb4edb18848b6a828d946d1ddee419b56 commit a8ca736bb4edb18848b6a828d946d1ddee419b56 Author: Vincenzo Maffione AuthorDate: 2021-01-24 21:38:59 +0000 Commit: Vincenzo Maffione CommitDate: 2021-01-31 08:52:57 +0000 iflib: netmap: move per-packet operation out of fragments loop MFC after: 1 week (cherry picked from commit f80efe5016ba01b2948ca1f0eb8fe34adab5b864) --- sys/net/iflib.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 0d4124599419..d10c11f865fe 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1211,17 +1211,18 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int flags) ring->slot[nm_i].flags = NS_MOREFRAG; } - if (have_rxcq) { - *cidxp = ri.iri_cidx; - while (*cidxp >= scctx->isc_nrxd[0]) - *cidxp -= scctx->isc_nrxd[0]; - } - bus_dmamap_sync(fl->ifl_buf_tag, fl->ifl_sds.ifsd_map[nic_i], BUS_DMASYNC_POSTREAD); nm_i = nm_next(nm_i, lim); fl->ifl_cidx = nic_i = nm_next(nic_i, lim); } + + if (have_rxcq) { + *cidxp = ri.iri_cidx; + while (*cidxp >= scctx->isc_nrxd[0]) + *cidxp -= scctx->isc_nrxd[0]; + } + } if (n) { /* update the state variables */ if (netmap_no_pendintr && !force_update) {