svn commit: r341145 - head/sys/dev/cxgbe

Vincenzo Maffione vmaffione at FreeBSD.org
Wed Nov 28 15:30:00 UTC 2018


Author: vmaffione
Date: Wed Nov 28 15:29:58 2018
New Revision: 341145
URL: https://svnweb.freebsd.org/changeset/base/341145

Log:
  cxgbe: revert r309725
  
  After the fix contained in r341144, cxgbe does not need anymore
  to set the IFCAP_NETMAP flag manually.
  
  Reviewed by:	np
  Approved by:	gnn (mentor)
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D17987

Modified:
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/t4_netmap.c

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Wed Nov 28 14:07:34 2018	(r341144)
+++ head/sys/dev/cxgbe/t4_main.c	Wed Nov 28 15:29:58 2018	(r341145)
@@ -1633,10 +1633,6 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi)
 	if (vi->nofldrxq != 0)
 		ifp->if_capabilities |= IFCAP_TOE;
 #endif
-#ifdef DEV_NETMAP
-	if (vi->nnmrxq != 0)
-		ifp->if_capabilities |= IFCAP_NETMAP;
-#endif
 #ifdef RATELIMIT
 	if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) {
 		ifp->if_capabilities |= IFCAP_TXRTLMT;
@@ -1656,7 +1652,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi)
 
 	ether_ifattach(ifp, vi->hw_addr);
 #ifdef DEV_NETMAP
-	if (ifp->if_capabilities & IFCAP_NETMAP)
+	if (vi->nnmrxq != 0)
 		cxgbe_nm_attach(vi);
 #endif
 	sb = sbuf_new_auto();

Modified: head/sys/dev/cxgbe/t4_netmap.c
==============================================================================
--- head/sys/dev/cxgbe/t4_netmap.c	Wed Nov 28 14:07:34 2018	(r341144)
+++ head/sys/dev/cxgbe/t4_netmap.c	Wed Nov 28 15:29:58 2018	(r341145)
@@ -982,7 +982,7 @@ cxgbe_nm_attach(struct vi_info *vi)
 	na.nm_register = cxgbe_netmap_reg;
 	na.num_tx_rings = vi->nnmtxq;
 	na.num_rx_rings = vi->nnmrxq;
-	netmap_attach(&na);
+	netmap_attach(&na);	/* This adds IFCAP_NETMAP to if_capabilities */
 }
 
 void


More information about the svn-src-head mailing list