Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Feb 2026 10:45:10 +0000
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: aef23e8e2736 - stable/13 - qlnxe: Avoid reinitializing the interface when it is already initialized
Message-ID:  <699d8136.36620.2a37f8ec@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/13 has been updated by zlei:

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

commit aef23e8e2736e839051bd7664b19ec0b9dc2dbf3
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2026-02-06 17:52:54 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2026-02-24 10:15:37 +0000

    qlnxe: Avoid reinitializing the interface when it is already initialized
    
    qlnx_init_locked() unconditionally uninitialize the interface thus is
    actually reinitializing the interface. Well the init routine qlnx_init()
    is to initialize the interface by net stack when assigned with the first
    inet or inet6 address. The ioctl SIOCSIFADDR for the first inet6 address
    is handled by ether_ioctl() thus the interface is reinitialized no matter
    it was initialized or not.
    
    Add a driver status check for that to avoid reinitializing. Further plan
    is removing SIOCSIFADDR ioctl from the driver and let ether_ioctl() handle
    it.
    
    Reviewed by:    kbowling
    MFC after:      5 days
    Differential Revision:  https://reviews.freebsd.org/D54887
    
    (cherry picked from commit c10e6bc0f0079e90cb484323ad71d437f1882422)
    (cherry picked from commit 8731ff4871d5397bae65bf184c44629a52c0e97b)
    (cherry picked from commit ee6495580925b337f5851b6ee0f1188f81d7a6c8)
---
 sys/dev/qlnx/qlnxe/qlnx_os.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
index f0d83c3356ff..8bb599065f0c 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -2480,7 +2480,8 @@ qlnx_init(void *arg)
 	QL_DPRINT2(ha, "enter\n");
 
 	QLNX_LOCK(ha);
-	qlnx_init_locked(ha);
+	if ((ha->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+		qlnx_init_locked(ha);
 	QLNX_UNLOCK(ha);
 
 	QL_DPRINT2(ha, "exit\n");


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?699d8136.36620.2a37f8ec>