From owner-svn-src-head@freebsd.org Thu Aug 10 03:11:06 2017 Return-Path: Delivered-To: svn-src-head@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 650E5DB5796; Thu, 10 Aug 2017 03:11:06 +0000 (UTC) (envelope-from sbruno@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 33E5F6C6D8; Thu, 10 Aug 2017 03:11:06 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7A3B51h053191; Thu, 10 Aug 2017 03:11:05 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7A3B5dl053190; Thu, 10 Aug 2017 03:11:05 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201708100311.v7A3B5dl053190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 10 Aug 2017 03:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322337 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 322337 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Aug 2017 03:11:06 -0000 Author: sbruno Date: Thu Aug 10 03:11:05 2017 New Revision: 322337 URL: https://svnweb.freebsd.org/changeset/base/322337 Log: Export IFCAP_HWSTATS so that we don't experience double stats counting on iflib enabled devices. PR: 220198 Submitted by: Matt Macy Reported by: Ben Woods Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Aug 10 02:55:22 2017 (r322336) +++ head/sys/net/iflib.c Thu Aug 10 03:11:05 2017 (r322337) @@ -3723,7 +3723,7 @@ iflib_if_qflush(if_t ifp) #define IFCAP_FLAGS (IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \ - IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTAGGING | \ + IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTAGGING | IFCAP_HWSTATS | \ IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_HWTSO) static int @@ -4096,8 +4096,8 @@ iflib_device_register(device_t dev, void *sc, if_share MPASS(scctx->isc_tx_csum_flags); #endif - if_setcapabilities(ifp, scctx->isc_capenable); - if_setcapenable(ifp, scctx->isc_capenable); + if_setcapabilities(ifp, scctx->isc_capenable | IFCAP_HWSTATS); + if_setcapenable(ifp, scctx->isc_capenable | IFCAP_HWSTATS); if (scctx->isc_ntxqsets == 0 || (scctx->isc_ntxqsets_max && scctx->isc_ntxqsets_max < scctx->isc_ntxqsets)) scctx->isc_ntxqsets = scctx->isc_ntxqsets_max;