git: 403586d88a5f - stable/15 - tcp: don't set flowid in tcp_input()

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Thu, 29 Oct 2026 07:41:29 UTC
The branch stable/15 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=403586d88a5f86deb1c5e65f620fd70a70aefc72

commit 403586d88a5f86deb1c5e65f620fd70a70aefc72
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-12-03 23:15:45 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-10-29 07:37:58 +0000

    tcp: don't set flowid in tcp_input()
    
    With dd0e6bb996dc setting it always on connect(2) and syncache always
    picking up the flowid from the incoming packet, any ESTABLISHED connection
    shall have the flowid already set.
    
    Reviewed by:            tuexen, gallatin
    Differential Revision:  https://reviews.freebsd.org/D53886
    
    (cherry picked from commit ee18f8be21655c2d98c1c1bd4e081c366fa91c9a)
---
 sys/netinet/tcp_input.c | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 01f82108c5fe..ea032550dfed 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -921,37 +921,6 @@ findpcb:
 	}
 	INP_LOCK_ASSERT(inp);
 
-	if ((inp->inp_flowtype == M_HASHTYPE_NONE) &&
-	    !SOLISTENING(inp->inp_socket)) {
-		if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
-			inp->inp_flowid = m->m_pkthdr.flowid;
-			inp->inp_flowtype = M_HASHTYPE_GET(m);
-#ifdef	RSS
-		} else {
-			  /* assign flowid by software RSS hash */
-#ifdef INET6
-			  if (isipv6) {
-				rss_proto_software_hash_v6(&inp->in6p_faddr,
-							   &inp->in6p_laddr,
-							   inp->inp_fport,
-							   inp->inp_lport,
-							   IPPROTO_TCP,
-							   &inp->inp_flowid,
-							   &inp->inp_flowtype);
-			  } else
-#endif	/* INET6 */
-			  {
-				rss_proto_software_hash_v4(inp->inp_faddr,
-							   inp->inp_laddr,
-							   inp->inp_fport,
-							   inp->inp_lport,
-							   IPPROTO_TCP,
-							   &inp->inp_flowid,
-							   &inp->inp_flowtype);
-			  }
-#endif	/* RSS */
-		}
-	}
 #if defined(IPSEC) || defined(IPSEC_SUPPORT)
 #ifdef INET6
 	if (isipv6 && IPSEC_ENABLED(ipv6) &&