Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Dec 2018 17:49:44 +0000 (UTC)
From:      Vincenzo Maffione <vmaffione@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r341481 - stable/11/sys/dev/cxgbe
Message-ID:  <201812041749.wB4Hnib4057975@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vmaffione
Date: Tue Dec  4 17:49:44 2018
New Revision: 341481
URL: https://svnweb.freebsd.org/changeset/base/341481

Log:
  MFC r341145
  
  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)
  Differential Revision:  https://reviews.freebsd.org/D17987

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

Modified: stable/11/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/11/sys/dev/cxgbe/t4_main.c	Tue Dec  4 17:47:43 2018	(r341480)
+++ stable/11/sys/dev/cxgbe/t4_main.c	Tue Dec  4 17:49:44 2018	(r341481)
@@ -1480,10 +1480,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
 	ifp->if_capenable = T4_CAP_ENABLE;
 	ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO |
 	    CSUM_UDP_IPV6 | CSUM_TCP_IPV6;
@@ -1497,7 +1493,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/11/sys/dev/cxgbe/t4_netmap.c
==============================================================================
--- stable/11/sys/dev/cxgbe/t4_netmap.c	Tue Dec  4 17:47:43 2018	(r341480)
+++ stable/11/sys/dev/cxgbe/t4_netmap.c	Tue Dec  4 17:49:44 2018	(r341481)
@@ -864,7 +864,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?201812041749.wB4Hnib4057975>