From: Jan Klemkow Subject: Re: names for TSO and LRO To: Alexander Bluhm Cc: tech@openbsd.org Date: Thu, 17 Apr 2025 15:25:46 +0200 On Wed, Apr 16, 2025 at 11:59:43PM +0200, Jan Klemkow wrote: > On Wed, Apr 16, 2025 at 11:39:21PM GMT, Alexander Bluhm wrote: > > Now that we have software LRO, we need consistent naming with TSO. > > One is called tcp_softlro and the other tcp_copper. As claudio@ > > suggested the descriptive name "copper", I would like to have it > > this way for LRO. tcp_glue_enqueue() came to my mind. > > In my opinion we should not make up new names for already established > things. LRO und TSO are established names [1]. If you google "tcp > glue" you will very misleading results. Looks like its a product name > for some glue. Also "tcp copper" won't get better search results. > > Thus, I suggest to rename tcp_copper() to tcp_softtso() to get things > consistent here. Or, tcp_tso() and tcp_lro() to keep it shorter. > > [1]: https://en.wikipedia.org/wiki/TCP_offload_engine As explained in me message before. I suggest this diff to make this naming consistent. ok? bye, jan Index: netinet/ip_output.c =================================================================== RCS file: /cvs/src/sys/netinet/ip_output.c,v diff -u -p -r1.407 ip_output.c --- netinet/ip_output.c 12 Mar 2025 01:44:27 -0000 1.407 +++ netinet/ip_output.c 17 Apr 2025 13:06:26 -0000 @@ -634,7 +634,7 @@ ip_output_ipsec_send(struct tdb *tdb, st m->m_flags &= ~(M_MCAST | M_BCAST); if (tso) { - error = tcp_chopper(m, &ml, encif, len); + error = tcp_softtso(m, &ml, encif, len); if (error) goto done; } else { Index: netinet/tcp_output.c =================================================================== RCS file: /cvs/src/sys/netinet/tcp_output.c,v diff -u -p -r1.153 tcp_output.c --- netinet/tcp_output.c 17 Feb 2025 12:46:02 -0000 1.153 +++ netinet/tcp_output.c 17 Apr 2025 13:16:15 -0000 @@ -1199,7 +1199,7 @@ tcp_setpersist(struct tcpcb *tp) } int -tcp_chopper(struct mbuf *m0, struct mbuf_list *ml, struct ifnet *ifp, +tcp_softtso(struct mbuf *m0, struct mbuf_list *ml, struct ifnet *ifp, u_int mss) { struct ip *ip = NULL; @@ -1394,7 +1394,7 @@ tcp_if_output_tso(struct ifnet *ifp, str } /* as fallback do TSO in software */ - if ((error = tcp_chopper(*mp, &ml, ifp, (*mp)->m_pkthdr.ph_mss)) || + if ((error = tcp_softtso(*mp, &ml, ifp, (*mp)->m_pkthdr.ph_mss)) || (error = if_output_ml(ifp, &ml, dst, rt))) goto done; tcpstat_inc(tcps_outswtso); Index: netinet/tcp_var.h =================================================================== RCS file: /cvs/src/sys/netinet/tcp_var.h,v diff -u -p -r1.187 tcp_var.h --- netinet/tcp_var.h 16 Apr 2025 17:17:06 -0000 1.187 +++ netinet/tcp_var.h 17 Apr 2025 13:07:22 -0000 @@ -731,7 +731,7 @@ struct tcpcb * tcp_newtcpcb(struct inpcb *, int); void tcp_notify(struct inpcb *, int); int tcp_output(struct tcpcb *); -int tcp_chopper(struct mbuf *, struct mbuf_list *, struct ifnet *, u_int); +int tcp_softtso(struct mbuf *, struct mbuf_list *, struct ifnet *, u_int); int tcp_if_output_tso(struct ifnet *, struct mbuf **, struct sockaddr *, struct rtentry *, uint32_t, u_int); void tcp_pulloutofband(struct socket *, u_int, struct mbuf *, int); Index: netinet6/ip6_output.c =================================================================== RCS file: /cvs/src/sys/netinet6/ip6_output.c,v diff -u -p -r1.297 ip6_output.c --- netinet6/ip6_output.c 2 Mar 2025 21:28:32 -0000 1.297 +++ netinet6/ip6_output.c 17 Apr 2025 13:09:10 -0000 @@ -2899,7 +2899,7 @@ ip6_output_ipsec_send(struct tdb *tdb, s m->m_flags &= ~(M_BCAST | M_MCAST); if (tso) { - error = tcp_chopper(m, &ml, encif, len); + error = tcp_softtso(m, &ml, encif, len); if (error) goto done; } else {