aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>2026-05-21 13:28:46 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>2026-05-21 13:34:40 +0000
commitd7cde43f95bf432b6894c3cf804a8dffe99461e4 (patch)
tree28c2c9b413cd91526db107420907df6e35eeced5
parent81b47a7c604f1d563283759572fa7a1f9d4dc56f (diff)
Revert "loopback: Clear hash unconditionally."
This reverts commit 2fe37927d41990abe8d1c336e75fd75873285e90. This turns out to have been misguided. First, clearing the hash results in all loopback ip/ip6 traffic being hashed to the netisr queue associated with the if_index of the loopback interface. Eg, it bottlenecks loopback traffic. When the hash is kept, traffic is spread evenly among netisrs. Also, it is safe to keep the hash here. The clearing was only needed when RSS core selection is enabled; we only enabled the consistent hashing parts of RSS globally, not the cpuid mapping stuff. So there is no need to clear it. Reviewed by: glebius Sponsored by: Netflix
-rw-r--r--sys/net/if_loop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 33ddd3a8540e..fc5ce9548bcc 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -219,7 +219,9 @@ looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len);
+#ifdef RSS
M_HASHTYPE_CLEAR(m);
+#endif
/* BPF writes need to be handled specially. */
if (dst->sa_family == AF_UNSPEC || dst->sa_family == pseudo_AF_HDRCMPLT)