git: 386960a8805e - main - qlnxe: Advertise the IFCAP_HWSTATS capability
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Jul 2025 04:11:50 UTC
The branch main has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=386960a8805edc6d5ac6bb6215ad102a83314549
commit 386960a8805edc6d5ac6bb6215ad102a83314549
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-07-22 04:11:02 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-07-22 04:11:02 +0000
qlnxe: Advertise the IFCAP_HWSTATS capability
The hardware can count statistics and the driver has already retrieved
them via qlnx_get_counter().
Advertise the IFCAP_HWSTATS capability to avoid the net stack from
double counting IFCOUNTER_IBYTES.
Reviewed by: kbowling
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51451
---
sys/dev/qlnx/qlnxe/qlnx_os.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
index 60e807d55e01..4ad190374f87 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -2350,6 +2350,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha)
if_setcapabilitiesbit(ifp, IFCAP_TSO6, 0);
if_setcapabilitiesbit(ifp, IFCAP_LRO, 0);
if_setcapabilitiesbit(ifp, IFCAP_LINKSTATE, 0);
+ if_setcapabilitiesbit(ifp, IFCAP_HWSTATS, 0);
if_sethwtsomax(ifp, QLNX_MAX_TSO_FRAME_SIZE -
(ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN));