Enable HWSTATS capability for VNIC

VNIC manages counters in hardware hence it is desired to have this
option enabled to avoid redundant stats update in ether_input_internal().

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5323
This commit is contained in:
zbb 2016-02-25 14:19:02 +00:00
parent d405ca6c4e
commit ea8079df86

View File

@ -360,6 +360,7 @@ nicvf_setup_ifnet(struct nicvf *nic)
*/
/* IP/TCP/UDP HW checksums */
if_setcapabilitiesbit(ifp, IFCAP_HWCSUM, 0);
if_setcapabilitiesbit(ifp, IFCAP_HWSTATS, 0);
if_sethwassistbits(ifp, (CSUM_IP | CSUM_TCP | CSUM_UDP), 0);
#ifdef DEVICE_POLLING