diff options
author | glebius <glebius@FreeBSD.org> | 2013-10-09 19:04:40 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2013-10-09 19:04:40 +0000 |
commit | 75528d8e36fb23734af42c83fe710155dc3e2d5c (patch) | |
tree | a73da61112c51368ee56913bcb5771167291b7ca /sys/dev | |
parent | 57b95400601bfa18b78d342b43a877efa06e81d1 (diff) | |
download | FreeBSD-src-75528d8e36fb23734af42c83fe710155dc3e2d5c.zip FreeBSD-src-75528d8e36fb23734af42c83fe710155dc3e2d5c.tar.gz |
There are some high performance NICs that count statistics in hardware,
and there are ifnets, that do that via counter(9). Provide a flag that
would skip cache line trashing '+=' operation in ether_input().
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Reviewed by: melifaro, adrian
Approved by: re (marius)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cxgbe/t4_main.c | 2 | ||||
-rw-r--r-- | sys/dev/ixgbe/ixgbe.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index d905cd5..c46ed5a0 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -950,7 +950,7 @@ cxgbe_probe(device_t dev) #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ - IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) + IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6 | IFCAP_HWSTATS) #define T4_CAP_ENABLE (T4_CAP) static int diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c index 3434125..e913bd5 100644 --- a/sys/dev/ixgbe/ixgbe.c +++ b/sys/dev/ixgbe/ixgbe.c @@ -2662,7 +2662,8 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter) ifp->if_capabilities |= IFCAP_LRO; ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO - | IFCAP_VLAN_MTU; + | IFCAP_VLAN_MTU + | IFCAP_HWSTATS; ifp->if_capenable = ifp->if_capabilities; /* |