Revert "loopback: Clear hash unconditionally."

This reverts commit 2fe37927d4.

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
This commit is contained in:
Andrew Gallatin
2026-05-21 09:28:46 -04:00
parent 81b47a7c60
commit d7cde43f95
+2
View File
@@ -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)