From owner-svn-src-stable@freebsd.org Wed May 24 21:54:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE59AD80698; Wed, 24 May 2017 21:54:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8658A123D; Wed, 24 May 2017 21:54:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLs4Jk040652; Wed, 24 May 2017 21:54:04 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLs4t1040650; Wed, 24 May 2017 21:54:04 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242154.v4OLs4t1040650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 21:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318826 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:54:05 -0000 Author: np Date: Wed May 24 21:54:04 2017 New Revision: 318826 URL: https://svnweb.freebsd.org/changeset/base/318826 Log: MFC r309725: cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities any more (since r307394). Do it in the driver instead. Modified: stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 21:53:47 2017 (r318825) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 21:54:04 2017 (r318826) @@ -1370,6 +1370,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; @@ -1388,7 +1392,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: stable/10/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:53:47 2017 (r318825) +++ stable/10/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:54:04 2017 (r318826) @@ -874,7 +874,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