Date: Fri, 9 Dec 2016 02:21:27 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309725 - head/sys/dev/cxgbe Message-ID: <201612090221.uB92LR5f005050@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Fri Dec 9 02:21:27 2016 New Revision: 309725 URL: https://svnweb.freebsd.org/changeset/base/309725 Log: cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities any more (since r307394). Do it in the driver instead. MFC after: 1 week 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 Fri Dec 9 01:44:26 2016 (r309724) +++ head/sys/dev/cxgbe/t4_main.c Fri Dec 9 02:21:27 2016 (r309725) @@ -1417,6 +1417,10 @@ cxgbe_vi_attach(device_t dev, struct 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; @@ -1435,7 +1439,7 @@ cxgbe_vi_attach(device_t dev, struct vi_ ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP - if (vi->nnmrxq != 0) + if (ifp->if_capabilities & IFCAP_NETMAP) cxgbe_nm_attach(vi); #endif sb = sbuf_new_auto(); Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Fri Dec 9 01:44:26 2016 (r309724) +++ head/sys/dev/cxgbe/t4_netmap.c Fri Dec 9 02:21:27 2016 (r309725) @@ -870,7 +870,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); /* This adds IFCAP_NETMAP to if_capabilities */ + netmap_attach(&na); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612090221.uB92LR5f005050>