Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2018 15:29:59 +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: r341145 - head/sys/dev/cxgbe
Message-ID:  <201811281529.wASFTxES047740@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811281529.wASFTxES047740>