git: bfbb93b6de6a - stable/14 - qlnxe: Advertise the IFCAP_HWSTATS capability
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 31 Jul 2025 04:41:12 UTC
The branch stable/14 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=bfbb93b6de6afc8aba8df90e2a28db1c93cbd143
commit bfbb93b6de6afc8aba8df90e2a28db1c93cbd143
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-07-22 04:11:02 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-07-31 04:40:23 +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
(cherry picked from commit 386960a8805edc6d5ac6bb6215ad102a83314549)
---
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 6519c216ebf5..1be77dcc3d37 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));