The branch stable/13 has been updated by zlei:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=8f1de03b50d00211597d7221055b44890fea7fd8

commit 8f1de03b50d00211597d7221055b44890fea7fd8
Author:     Zhenlei Huang <[email protected]>
AuthorDate: 2025-07-22 04:11:02 +0000
Commit:     Zhenlei Huang <[email protected]>
CommitDate: 2026-02-26 14:17:22 +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)
    (cherry picked from commit bfbb93b6de6afc8aba8df90e2a28db1c93cbd143)
---
 sys/dev/qlnx/qlnxe/qlnx_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
index 2586539617dd..ad7843dd5596 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -2389,7 +2389,6 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha)
 
        ifp->if_capabilities = IFCAP_HWCSUM;
        ifp->if_capabilities |= IFCAP_JUMBO_MTU;
-
        ifp->if_capabilities |= IFCAP_VLAN_MTU;
        ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING;
        ifp->if_capabilities |= IFCAP_VLAN_HWFILTER;
@@ -2399,6 +2398,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha)
        ifp->if_capabilities |= IFCAP_TSO6;
        ifp->if_capabilities |= IFCAP_LRO;
        ifp->if_capabilities |= IFCAP_LINKSTATE;
+       ifp->if_capabilities |= IFCAP_HWSTATS;
 
        ifp->if_hw_tsomax =  QLNX_MAX_TSO_FRAME_SIZE -
                                (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN);

Reply via email to