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:
Zbigniew Bodek 2016-02-25 14:19:02 +00:00
parent 44dd269352
commit 44f2eb96bd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296033

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