Skip to content

Commit

Permalink
set default caps at attach
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Macy committed Oct 17, 2016
1 parent 31fe751 commit 6425f45
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sys/net/iflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -3924,6 +3924,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)
{
Expand Down Expand Up @@ -3958,8 +3962,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,
Expand Down

0 comments on commit 6425f45

Please sign in to comment.