Date: Tue, 18 Oct 2016 14:02:45 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307568 - head/sys/net Message-ID: <201610181402.u9IE2j5I013344@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610181402.u9IE2j5I013344>