svn commit: r341481 - stable/11/sys/dev/cxgbe
Vincenzo Maffione
vmaffione at FreeBSD.org
Tue Dec 4 17:49:46 UTC 2018
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
More information about the svn-src-stable-11
mailing list