Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Aug 2021 13:58:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 257511] iflib: enabling promisc under netmap causes lockup when interface is down
Message-ID:  <bug-257511-227-CEyIfd7xVO@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-257511-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

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.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-257511-227-CEyIfd7xVO>