From d7cde43f95bf432b6894c3cf804a8dffe99461e4 Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Thu, 21 May 2026 09:28:46 -0400 Subject: [PATCH] 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 --- sys/net/if_loop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 33ddd3a8540..fc5ce9548bc 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)