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 <m...@mattmacy.io>
  Reported by:  Ben Woods <woods...@freebsd.org>
  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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to