From 7f05c7497df7f231dfcf736570e37d94bb436d70 Mon Sep 17 00:00:00 2001 From: jan Date: Mon, 18 Aug 2025 13:54:01 +0000 Subject: [PATCH] SoftLRO: remove 8 segments limit This limit is no longer needed after the last fix here. ok stsp@ bluhm@ --- sys/netinet/tcp_input.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index c68e4f36295..3bdd57208d1 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.460 2025/08/14 08:50:25 mvs Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.461 2025/08/18 13:54:01 jan Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -4500,8 +4500,7 @@ void tcp_softlro_glue(struct mbuf_list *ml, struct mbuf *mtail, struct ifnet *ifp) { struct ether_extracted head, tail; - struct mbuf *m, *mhead; - unsigned int headcnt, tailcnt; + struct mbuf *mhead; if (!ISSET(ifp->if_xflags, IFXF_LRO)) goto dontmerge; @@ -4524,12 +4523,6 @@ tcp_softlro_glue(struct mbuf_list *ml, struct mbuf *mtail, struct ifnet *ifp) if (!tcp_softlro_check(mtail, &tail)) goto dontmerge; - tailcnt = 0; - for (m = mtail; m != NULL; m = m->m_next) { - if (tailcnt++ >= 8) - goto dontmerge; - } - mtail->m_pkthdr.ph_mss = tail.paylen; for (mhead = ml->ml_head; mhead != NULL; mhead = mhead->m_nextpkt) { @@ -4564,13 +4557,6 @@ tcp_softlro_glue(struct mbuf_list *ml, struct mbuf *mtail, struct ifnet *ifp) if (!tcp_softlro_compare(&head, &tail)) continue; - /* Limit mbuf chain to avoid m_defrag calls when forwarding. */ - headcnt = tailcnt; - for (m = mhead; m != NULL; m = m->m_next) { - if (headcnt++ >= 8) - goto dontmerge; - } - tcp_softlro_concat(mhead, &head, mtail, &tail); return; }