Date: Wed, 11 Feb 2026 20:29:49 +0000 From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Zhenlei Huang <zlei@FreeBSD.org> Subject: git: 7d0345d32bbd - releng/14.4 - qlnxe: Avoid reinitializing the interface when it is already initialized Message-ID: <698ce6bd.451b3.65526bde@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7d0345d32bbdfe490ce88bb8704ef9d4e6adb189 commit 7d0345d32bbdfe490ce88bb8704ef9d4e6adb189 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2026-02-06 17:52:54 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2026-02-11 20:29:10 +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. Approved by: re (cperciva) 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 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");home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698ce6bd.451b3.65526bde>
