From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 6DDA13854161; Mon, 11 Jul 2022 11:52:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DDA13854161 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] TCP: send full initial window when timestamps are in use X-Act-Checkin: newlib-cygwin X-Git-Author: Richard Scheffenegger X-Git-Refname: refs/heads/master X-Git-Oldrev: 43e76bafcd70f0639b3d9ea9c411de23b119c55f X-Git-Newrev: 7b30b9f648a25f3b615730864ddc86a433a93333 Message-Id: <20220711115239.6DDA13854161@sourceware.org> Date: Mon, 11 Jul 2022 11:52:39 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 11:52:39 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D7b30b9f648a= 25f3b615730864ddc86a433a93333 commit 7b30b9f648a25f3b615730864ddc86a433a93333 Author: Richard Scheffenegger Date: Fri Sep 25 10:38:19 2020 +0000 TCP: send full initial window when timestamps are in use =20 The fastpath in tcp_output tries to send out full segments, and avoid sending partial segments by comparing against the static t_maxseg variable. That value does not consider tcp options like timestamps, while the initial window calculation is using the correct dynamic tcp_maxseg() function. =20 Due to this interaction, the last, full size segment is considered too short and not sent out immediately. =20 Reviewed by: tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26478 Diff: --- newlib/libc/sys/rtems/include/netinet/tcp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/newlib/libc/sys/rtems/include/netinet/tcp.h b/newlib/libc/sys/= rtems/include/netinet/tcp.h index 0a5226836..faf142959 100644 --- a/newlib/libc/sys/rtems/include/netinet/tcp.h +++ b/newlib/libc/sys/rtems/include/netinet/tcp.h @@ -80,6 +80,8 @@ struct tcphdr { u_short th_urp; /* urgent pointer */ }; =20 +#define PADTCPOLEN(len) ((((len) / 4) + !!((len) % 4)) * 4) + #define TCPOPT_EOL 0 #define TCPOLEN_EOL 1 #define TCPOPT_PAD 0 /* padding after EOL */