[Bug 254695] Hyper-V + TCP_BBR: Kernel Panic: Assertion in_epoch(net_epoch_preempt) failed at netinet/tcp_lro.c:1180

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 23 Aug 2021 12:57:16 UTC

--- Comment #34 from Gordon Bergling <gbe@FreeBSD.org> ---
I think I have found a way to enable TCP BBR and RACK on Hyper-V again with the
following patch, which adds NET_EPOCH{ENTER,EXIT} calls around
hn_chan_rollup(), in which the panic is happening.

diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index cd0b5a5fa8b9..fa141adad9f6 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/taskqueue.h>
 #include <sys/buf_ring.h>
 #include <sys/eventhandler.h>
+#include <sys/epoch.h>

 #include <machine/atomic.h>
 #include <machine/in_cksum.h>
@@ -2883,7 +2884,10 @@ static void
 hn_chan_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr)
 #if defined(INET) || defined(INET6)
+       struct epoch_tracker et;
+       NET_EPOCH_ENTER(et);
+       NET_EPOCH_EXIT(et);


If have been running with this change for about three days and haven't had a
panic since then.

One question remains before opening a differential for it. Should I place
something around these NET_EPOCH_* calls like HAVE_BBR or something?

The panic within tcp_lro_flush_all() happens only if TCP BBR or RACK are been

You are receiving this mail because:
You are on the CC list for the bug.