Export IFCAP_HWSTATS so that we don't experience double stats counting

on iflib enabled devices.

PR:		220198
Submitted by:	Matt Macy <matt@mattmacy.io>
Reported by:	Ben Woods <woodsb02@freebsd.org>
Sponsored by:	Limelight Networks
This commit is contained in:
sbruno 2017-08-10 03:11:05 +00:00
parent 0b3aa1c5cc
commit 3be0299b70

View File

@ -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_shared_ctx_t sctx, if_ctx_t *ct
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;