git: c10e6bc0f007 - main - qlnxe: Avoid reinitializing the interface when it is already initialized
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Feb 2026 17:59:30 UTC
The branch main has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=c10e6bc0f0079e90cb484323ad71d437f1882422
commit c10e6bc0f0079e90cb484323ad71d437f1882422
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2026-02-06 17:52:54 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2026-02-06 17:52:54 +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
---
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 b0dac3a82582..bc0282e3c22b 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -2431,7 +2431,8 @@ qlnx_init(void *arg)
QL_DPRINT2(ha, "enter\n");
QLNX_LOCK(ha);
- qlnx_init_locked(ha);
+ if ((if_getdrvflags(ha->ifp) & IFF_DRV_RUNNING) == 0)
+ qlnx_init_locked(ha);
QLNX_UNLOCK(ha);
QL_DPRINT2(ha, "exit\n");