git: 9c1a2561cbdc - stable/15 - vmxnet3: Propagate device-enable failure to iflib

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Thu, 29 Oct 2026 04:59:38 UTC
The branch stable/15 has been updated by kbowling:

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

commit 9c1a2561cbdcb161070d9e7d88ab308e0d3c2cd1
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-07 11:55:12 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-10-29 04:59:29 +0000

    vmxnet3: Propagate device-enable failure to iflib
    
    Do not let iflib publish a running interface when the virtual device
    rejected its enable command.  Mark initialization failed and leave the
    interface stopped.
    
    Sponsored by:   BBOX.io
    
    (cherry picked from commit 99eaf07a3cef77e61423e9431c0a8c5fd4d4be58)
---
 sys/dev/vmware/vmxnet3/if_vmx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c
index c5e21b164b4b..7b3b1ee051f8 100644
--- a/sys/dev/vmware/vmxnet3/if_vmx.c
+++ b/sys/dev/vmware/vmxnet3/if_vmx.c
@@ -1956,7 +1956,10 @@ vmxnet3_init(if_ctx_t ctx)
 	vmxnet3_reinit_shared_data(sc);
 	vmxnet3_reinit_queues(sc);
 
-	vmxnet3_enable_device(sc);
+	if (vmxnet3_enable_device(sc) != 0) {
+		iflib_init_failed(ctx);
+		return;
+	}
 
 	vmxnet3_reinit_rxfilters(sc);
 	vmxnet3_link_status(sc);