From: Stefan Sperling Subject: Re: SoftLRO: remove 8 segment limit To: Jan Klemkow Cc: tech@openbsd.org Date: Fri, 15 Aug 2025 14:00:37 +0200 On Thu, Aug 14, 2025 at 08:42:36PM +0200, Jan Klemkow wrote: > Hi, > > The limit of 8 segments is no longer needed after the last fix[1]. > Thus, this code can be removed. > > ok? > > bye, > Jan ok stsp@ > [1]: https://cvsweb.openbsd.org/src/sys/netinet/tcp_input.c?rev=1.458&content-type=text/x-cvsweb-markup > > Index: netinet/tcp_input.c > =================================================================== > RCS file: /cvs/src/sys/netinet/tcp_input.c,v > diff -u -p -r1.460 tcp_input.c > --- netinet/tcp_input.c 14 Aug 2025 08:50:25 -0000 1.460 > +++ netinet/tcp_input.c 14 Aug 2025 18:33:59 -0000 > @@ -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, s > 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) { > @@ -4563,13 +4556,6 @@ tcp_softlro_glue(struct mbuf_list *ml, s > ether_extract_headers(mhead, &head); > 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; > >