[Bug 257511] iflib: enabling promisc under netmap causes lockup when interface is down

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 10 Aug 2021 13:58:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257511

--- Comment #1 from Brian Poole <brian90013@gmail.com> ---
I tried commenting out the iflib_stop() call and setting err instead. With this
change, I can collect packets with netmap using the igb, ixgbe, ixl, and ice
drivers whether the interface is up or down. Setting the promiscuous bit after
initializing netmap does not cause a hang if the interface is down. I'm not
sure of the implications of my change, but for my use case it appears to work
well.

--- sys/net/iflib.c     (revision 370286)
+++ sys/net/iflib.c     (working copy)
@@ -4230,7 +4296,8 @@
                        } else
                                reinit = 1;
                } else if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) {
-                       iflib_stop(ctx);
+                       err = ENETDOWN; // Can't set flags while interface is
down
+//                     iflib_stop(ctx); // Calling this locks up netmap
                }
                ctx->ifc_if_flags = if_getflags(ifp);
                CTX_UNLOCK(ctx);

-- 
You are receiving this mail because:
You are the assignee for the bug.