diff options
author | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2021-01-24 21:38:59 +0000 |
---|---|---|
committer | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2021-01-31 08:52:57 +0000 |
commit | a8ca736bb4edb18848b6a828d946d1ddee419b56 (patch) | |
tree | 0867e49d6e18d1d91bfddd16dd194b734f281eba | |
parent | e0e00874a3c30a8d418417d5901c065f15b5896e (diff) | |
download | src-a8ca736bb4edb18848b6a828d946d1ddee419b56.tar.gz src-a8ca736bb4edb18848b6a828d946d1ddee419b56.zip |
iflib: netmap: move per-packet operation out of fragments loop
MFC after: 1 week
(cherry picked from commit f80efe5016ba01b2948ca1f0eb8fe34adab5b864)
-rw-r--r-- | sys/net/iflib.c | 13 |
1 files 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) { |