From 0d9de3fbf240a7a695e1819ad684db583f4d8958 Mon Sep 17 00:00:00 2001 From: vmaffione Date: Thu, 6 Aug 2020 21:37:38 +0000 Subject: [PATCH] iflib: netmap: drop redundant check The validity of head is already checked by nm_rxsync_prologue(). MFC after: 2 weeks --- sys/net/iflib.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 7468c1d70c0a..b7cc308d22f2 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1080,7 +1080,6 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int flags) 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; @@ -1088,9 +1087,6 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int flags) 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 * of receive buffers