svn commit: r364452 - stable/12/sys/net

Vincenzo Maffione vmaffione at FreeBSD.org
Fri Aug 21 07:54:17 UTC 2020


Author: vmaffione
Date: Fri Aug 21 07:54:16 2020
New Revision: 364452
URL: https://svnweb.freebsd.org/changeset/base/364452

Log:
  MFC r363997
  
  iflib: netmap: drop redundant check
  
  The validity of head is already checked by nm_rxsync_prologue().

Modified:
  stable/12/sys/net/iflib.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/iflib.c
==============================================================================
--- stable/12/sys/net/iflib.c	Fri Aug 21 07:52:56 2020	(r364451)
+++ stable/12/sys/net/iflib.c	Fri Aug 21 07:54:16 2020	(r364452)
@@ -1085,16 +1085,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


More information about the svn-src-all mailing list