git: 99eaf07a3cef - main - vmxnet3: Propagate device-enable failure to iflib

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Fri, 11 Sep 2026 20:46:20 UTC
The branch main has been updated by kbowling:

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

commit 99eaf07a3cef77e61423e9431c0a8c5fd4d4be58
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-07 11:55:12 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-11 20:44:07 +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.
    
    MFC after:      2 weeks
    Sponsored by:   BBOX.io
---
 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 744205ef0e7d..3409f80a7919 100644
--- a/sys/dev/vmware/vmxnet3/if_vmx.c
+++ b/sys/dev/vmware/vmxnet3/if_vmx.c
@@ -1943,7 +1943,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);