From owner-svn-src-all@freebsd.org Tue Oct 18 14:02:46 2016 Return-Path: Delivered-To: svn-src-all@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 96D87C1644C; Tue, 18 Oct 2016 14:02:46 +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 68D98BD3; Tue, 18 Oct 2016 14:02:46 +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 u9IE2jah013345; Tue, 18 Oct 2016 14:02:45 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9IE2j5I013344; Tue, 18 Oct 2016 14:02:45 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201610181402.u9IE2j5I013344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 18 Oct 2016 14:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307568 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2016 14:02:46 -0000 Author: sbruno Date: Tue Oct 18 14:02:45 2016 New Revision: 307568 URL: https://svnweb.freebsd.org/changeset/base/307568 Log: Set default capabilities at attach. ref: https://github.com/NextBSD/NextBSD/commit/6425f45e5fc89f64925995bbcfc09c7558d896ea Submitted by: mmacy@nextbsd.org Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Oct 18 14:00:26 2016 (r307567) +++ head/sys/net/iflib.c Tue Oct 18 14:02:45 2016 (r307568) @@ -3903,6 +3903,10 @@ _iflib_assert(if_shared_ctx_t sctx) MPASS(sctx->isc_ntxd_default[0]); } +#define DEFAULT_CAPS (IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \ + IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTAGGING | \ + IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_HWTSO | IFCAP_HWSTATS) + static int iflib_register(if_ctx_t ctx) { @@ -3937,8 +3941,9 @@ iflib_register(if_ctx_t ctx) if_setqflushfn(ifp, iflib_if_qflush); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); - if_setcapabilities(ifp, 0); - if_setcapenable(ifp, 0); + /* XXX - move this in to the driver for non-default settings */ + if_setcapabilities(ifp, DEFAULT_CAPS); + if_setcapenable(ifp, DEFAULT_CAPS); ctx->ifc_vlan_attach_event = EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ctx,