svn commit: r341362 - stable/12/sys/dev/cxgbe

Vincenzo Maffione vmaffione at FreeBSD.org
Sat Dec 1 11:52:14 UTC 2018


Author: vmaffione
Date: Sat Dec  1 11:52:13 2018
New Revision: 341362
URL: https://svnweb.freebsd.org/changeset/base/341362

Log:
  MFC r341145
  
  cxgbe: revert r309725
  
  After the fix contained in r341144, cxgbe does not need anymore
  to set the IFCAP_NETMAP flag manually.
  
  Differential Revision:	https://reviews.freebsd.org/D17987

Modified:
  stable/12/sys/dev/cxgbe/t4_main.c
  stable/12/sys/dev/cxgbe/t4_netmap.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/12/sys/dev/cxgbe/t4_main.c	Sat Dec  1 11:50:52 2018	(r341361)
+++ stable/12/sys/dev/cxgbe/t4_main.c	Sat Dec  1 11:52:13 2018	(r341362)
@@ -1522,10 +1522,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;
@@ -1541,7 +1537,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: stable/12/sys/dev/cxgbe/t4_netmap.c
==============================================================================
--- stable/12/sys/dev/cxgbe/t4_netmap.c	Sat Dec  1 11:50:52 2018	(r341361)
+++ stable/12/sys/dev/cxgbe/t4_netmap.c	Sat Dec  1 11:52:13 2018	(r341362)
@@ -913,7 +913,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-stable-12 mailing list