Date: Thu, 6 Aug 2020 21:37:38 +0000 (UTC) From: Vincenzo Maffione <vmaffione@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363997 - head/sys/net Message-ID: <202008062137.076Lbc9q045830@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vmaffione Date: Thu Aug 6 21:37:38 2020 New Revision: 363997 URL: https://svnweb.freebsd.org/changeset/base/363997 Log: iflib: netmap: drop redundant check The validity of head is already checked by nm_rxsync_prologue(). MFC after: 2 weeks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Aug 6 21:32:25 2020 (r363996) +++ head/sys/net/iflib.c Thu Aug 6 21:37:38 2020 (r363997) @@ -1080,16 +1080,12 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl uint32_t nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; if_ctx_t ctx = ifp->if_softc; iflib_rxq_t rxq = &ctx->ifc_rxqs[kring->ring_id]; iflib_fl_t fl = &rxq->ifr_fl[0]; struct if_rxd_info ri; - - if (head > lim) - return netmap_ring_reinit(kring); /* * netmap only uses free list 0, to avoid out of order consumption
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008062137.076Lbc9q045830>