From nobody Sat Oct 22 02:51:32 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MvQpP6ChKz4gTWn for ; Sat, 22 Oct 2022 02:51:41 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MvQpP2ggHz3wVx for ; Sat, 22 Oct 2022 02:51:41 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: by mail-pg1-x52e.google.com with SMTP id 128so4147666pga.1 for ; Fri, 21 Oct 2022 19:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=uVPhhdQjtEZNAN2RUlw4fuYmrJ/WzdzlHl7iqEyjcRU=; b=YLuhAVh2yMJWZR+r9BwTv6gZcLQuiG1pmXP0QbuUUiWXE+EG4K4znv3oyJ1RlEbmuU 8wbSvDfkZngQb4NS6liVPTLO/7x8oMpbe7kmWF76Yurd8bhQ2fRymfPSn5MmysdaKtdf yI1/VxWwKI1MxuWvrjhRrRFeUSHGacJWOfybCzutoodQHBJhmHH/iqKrWwuFiY6nvgsM TTqo22wesTEZCahfl8l14Dofm2t/cmqiY4cY1jeoKvjLGXiyZ4P6Dh6VeP1sBmUGzZcZ YeeBXnApKozp/dDV6Avn7dXEeUqkhf7CnEjkqYW+eJYi3GA7j7bdE2/bhOYPUSxlqIIP O9gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uVPhhdQjtEZNAN2RUlw4fuYmrJ/WzdzlHl7iqEyjcRU=; b=J7AQmwRXrQ4lG4ZAyvckLk8tdf2OYDIJtLOzm2VzS0dD78ty3m+4n6QCo8/hGxcMM2 mh2LuUkcPSxMleVE4+VVneYCi/dMSYgLl2pNE5aE8Q6rMwHpc1DKRneiJNykzoP0qifC 21pCwNBCMcgW1vvfRazivz7I1cibv5ewfnH4fPLy1WdFLHxeOkUAeb/KbeNE4V2KV8i5 YhPVxxvS0CZBqqYOb2dUY2DghFfDwGOSQLCkU3XDF5GB9x4gA0ylFdh3hrmjKBOMyNza OVLQ5vh1SuAnQ9pf05MWMmim81J6vISh8lUhyPste7gNyPny5bYo87Dac4PB2uYov0Gn yx3g== X-Gm-Message-State: ACrzQf0CdCbolPZRYICedFchD0qHBpCBdmKd20CoBLxLDSfGZeVP7OC3 ijmcU8ufCZq/8c7bvxmVcYQdjjjCjg5nbhQs X-Google-Smtp-Source: AMsMyM51dA2/THyBdyW3AOWQQhtMWNQUBbKUWIWSB8YpoDWDkPjcOsUzMCm6/eO3DlDgyNSvQD5Prw== X-Received: by 2002:a63:7704:0:b0:464:3985:8963 with SMTP id s4-20020a637704000000b0046439858963mr19390273pgc.154.1666407100033; Fri, 21 Oct 2022 19:51:40 -0700 (PDT) Received: from [172.17.252.129] (ns1.oxydns.net. [45.32.91.63]) by smtp.gmail.com with ESMTPSA id w70-20020a628249000000b0056242774037sm1660641pfd.194.2022.10.21.19.51.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Oct 2022 19:51:39 -0700 (PDT) From: Zhenlei Huang Message-Id: <330A9146-F7CC-4CAB-9003-2F90B872AC3E@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_0987CBA6-7ECA-4B84-BEC7-7256BD5AFCA9" List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Too aggressive TCP ACKs Date: Sat, 22 Oct 2022 10:51:32 +0800 In-Reply-To: <0FED34A9-D093-442A-83B7-08C06D11F8B5@lurchi.franken.de> Cc: freebsd-net@freebsd.org To: Michael Tuexen References: <75D35F36-7759-4168-ADBA-C2414F5B53BC@gmail.com> <712641B3-5196-40CC-9B64-04637F16F649@lurchi.franken.de> <62A0DD30-B3ED-48BE-9C01-146487599092@gmail.com> <0FED34A9-D093-442A-83B7-08C06D11F8B5@lurchi.franken.de> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4MvQpP2ggHz3wVx X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=YLuhAVh2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of zlei.huang@gmail.com designates 2607:f8b0:4864:20::52e as permitted sender) smtp.mailfrom=zlei.huang@gmail.com X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TAGGED_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::52e:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_0987CBA6-7ECA-4B84-BEC7-7256BD5AFCA9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Oct 22, 2022, at 2:16 AM, Michael Tuexen = > wrote: >=20 >> On 21. Oct 2022, at 17:00, Zhenlei Huang > wrote: >>=20 >>=20 >>> On Oct 21, 2022, at 10:34 PM, Michael Tuexen = > wrote: >>>=20 >>>> On 21. Oct 2022, at 16:19, Zhenlei Huang > wrote: >>>>=20 >>>> Hi, >>>>=20 >>>> While I was repeating = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258755 = , I observed = a >>>> strange behavior. The TCP ACKs from FreeBSD host are too = aggressive. >>>>=20 >>>> My setup is simple: >>>> A B >>>> [ MacOS ] <=3D=3D=3D=3D> [ FreeBSD VM ] >>>> 192.168.120.1 192.168.12.134 (disable tso and lro) >>>> While A <--- B, i.e. A as server and B as client, the packets rate = looks good. >>>>=20 >>>> One session on B: >>>>=20 >>>> root@:~ # iperf3 -c 192.168.120.1 -b 10m >>>> Connecting to host 192.168.120.1, port 5201 >>>> [ 5] local 192.168.120.134 port 54459 connected to 192.168.120.1 = port 5201 >>>> [ ID] Interval Transfer Bitrate Retr Cwnd >>>> [ 5] 0.00-1.00 sec 1.25 MBytes 10.5 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 1.00-2.00 sec 1.25 MBytes 10.5 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 2.00-3.00 sec 1.12 MBytes 9.44 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 3.00-4.00 sec 1.25 MBytes 10.5 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 4.00-5.00 sec 1.12 MBytes 9.44 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 5.00-6.00 sec 1.25 MBytes 10.5 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 6.00-7.00 sec 1.12 MBytes 9.44 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 7.00-8.00 sec 1.25 MBytes 10.5 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 8.00-9.00 sec 1.12 MBytes 9.44 Mbits/sec 0 257 = KBytes =20 >>>> [ 5] 9.00-10.00 sec 1.25 MBytes 10.5 Mbits/sec 0 257 = KBytes =20 >>>> - - - - - - - - - - - - - - - - - - - - - - - - - >>>> [ ID] Interval Transfer Bitrate Retr >>>> [ 5] 0.00-10.00 sec 12.0 MBytes 10.1 Mbits/sec 0 = sender >>>> [ 5] 0.00-10.00 sec 12.0 MBytes 10.1 Mbits/sec = receiver >>>>=20 >>>> iperf Done. >>>>=20 >>>> Another session on B: >>>>=20 >>>> root@:~ # netstat -w 1 -I vmx0 >>>> input vmx0 output >>>> packets errs idrops bytes packets errs bytes colls >>>> 0 0 0 0 0 0 0 0 >>>> 0 0 0 0 0 0 0 0 >>>> 342 0 0 22600 526 0 775724 0 >>>> 150 0 0 9900 851 0 1281454 0 >>>> 109 0 0 7194 901 0 1357850 0 >>>> 126 0 0 8316 828 0 1246632 0 >>>> 122 0 0 8052 910 0 1370780 0 >>>> 109 0 0 7194 819 0 1233702 0 >>>> 120 0 0 7920 910 0 1370780 0 >>>> 110 0 0 7260 819 0 1233702 0 >>>> 123 0 0 8118 910 0 1370780 0 >>>> 109 0 0 7194 819 0 1233702 0 >>>> 73 0 0 5088 465 0 686342 0 >>>> 0 0 0 0 0 0 0 0 >>>> 0 0 0 0 0 0 0 0 >>>>=20 >>>>=20 >>>>=20 >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>=20 >>>>=20 >>>> While A ---> B, i.e. A as client and B as server, the ACKs sent = from B looks strange. >>>>=20 >>>> Session on A: >>>>=20 >>>> % iperf3 -c 192.168.120.134 -b 10m >>>> Connecting to host 192.168.120.134, port 5201 >>>> [ 5] local 192.168.120.1 port 52370 connected to 192.168.120.134 = port 5201 >>>> [ ID] Interval Transfer Bitrate >>>> [ 5] 0.00-1.00 sec 1.25 MBytes 10.5 Mbits/sec = =20 >>>> [ 5] 1.00-2.00 sec 1.25 MBytes 10.5 Mbits/sec = =20 >>>> [ 5] 2.00-3.00 sec 1.12 MBytes 9.44 Mbits/sec = =20 >>>> [ 5] 3.00-4.00 sec 1.25 MBytes 10.5 Mbits/sec = =20 >>>> [ 5] 4.00-5.00 sec 1.12 MBytes 9.44 Mbits/sec = =20 >>>> [ 5] 5.00-6.00 sec 1.25 MBytes 10.5 Mbits/sec = =20 >>>> [ 5] 6.00-7.00 sec 1.12 MBytes 9.44 Mbits/sec = =20 >>>> [ 5] 7.00-8.00 sec 1.25 MBytes 10.5 Mbits/sec = =20 >>>> [ 5] 8.00-9.00 sec 1.12 MBytes 9.44 Mbits/sec = =20 >>>> [ 5] 9.00-10.00 sec 1.25 MBytes 10.5 Mbits/sec = =20 >>>> - - - - - - - - - - - - - - - - - - - - - - - - - >>>> [ ID] Interval Transfer Bitrate >>>> [ 5] 0.00-10.00 sec 12.0 MBytes 10.1 Mbits/sec = sender >>>> [ 5] 0.00-10.00 sec 12.0 MBytes 10.1 Mbits/sec = receiver >>>>=20 >>>> iperf Done. >>>>=20 >>>> Session on B: >>>>=20 >>>> root@:~ # netstat -w 1 -I vmx0 >>>> input vmx0 output >>>> packets errs idrops bytes packets errs bytes colls >>>> 0 0 0 0 0 0 0 0 >>>> 0 0 0 0 0 0 0 0 >>>> 649 0 0 960562 330 0 21800 0 >>>> 819 0 0 1233702 415 0 27390 0 >>>> 910 0 0 1370780 459 0 30294 0 >>>> 819 0 0 1233702 415 0 27390 0 >>>> 910 0 0 1370780 459 0 30294 0 >>>> 910 0 0 1370780 460 0 30360 0 >>>> 819 0 0 1233702 414 0 27324 0 >>>> 910 0 0 1370780 460 0 30360 0 >>>> 819 0 0 1233702 414 0 27324 0 >>>> 910 0 0 1370780 460 0 30360 0 >>>> 285 0 0 412287 147 0 9981 0 >>>> 0 0 0 0 0 0 0 0 >>>> 0 0 0 0 0 0 0 0 >>>> 0 0 0 0 0 0 0 0 >>>>=20 >>>>=20 >>>> The ACK packets replied from B (the FreeBSD VM) are too aggressive. = They are >>>> about one half of TCP packets received from A. >>>>=20 >>>> I've tested with different bitrates, from 10m to 300m, all behave = the same. >>>> Tested with baremetal FreeBSD 13.1 Box as B (with intel em driver), = the=20 >>>> bitrates is 1g, also behaves the same. >>>>=20 >>>> Also tried different FreeBSD versions, 11.4, 12.3, stable/13 and = current/14 all=20 >>>> behave the same. >>>>=20 >>>>=20 >>>> My question is, is that the expected behavior of current default = TCP stack? >>> That is what I would expect. TCP (on FreeBSD) is acking every other = packet. This >>> is also what is specified. MacOS, at least newer versions, send less = ACKs. >> Thanks for fast response! >>=20 >> My have old memories about SACK which helps TCP performance. This = behavior >> seems odd from my mind. But those memories date back to 2008, that is = 14 years ago. > I don't think anything has changed since then from a specification = point of view Hacked some RFCs from 1122, and the transport protocol is stable, and = apparently it should be. >>=20 >> The current implementation of TCP stack in FreeBSD head is too = complexed for me. >> Can you please point me the RFCs specifying this? So I can start over = with a quick glue. > Send an ACK for every other frame if everything is OK, send it = immediately if there are some gaps: > https://datatracker.ietf.org/doc/html/rfc9293#section-3.8.6.3 = > This applies also to the case where you use SACK. I think I confused SACK with delayed ACK. Thanks! >=20 > Best regards > Michael >>=20 >> Thanks! >>>=20 >>> Best regards >>> Michael >>>>=20 >>>>=20 >>>>=20 >>>> Best regards, >>>> Zhenlei --Apple-Mail=_0987CBA6-7ECA-4B84-BEC7-7256BD5AFCA9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Oct 22, 2022, at 2:16 AM, Michael Tuexen = <michael.tuexen@lurchi.franken.de> wrote:

On = 21. Oct 2022, at 17:00, Zhenlei Huang <zlei.huang@gmail.com> wrote:


On Oct = 21, 2022, at 10:34 PM, Michael Tuexen <michael.tuexen@lurchi.franken.de> wrote:

On 21. = Oct 2022, at 16:19, Zhenlei Huang <zlei.huang@gmail.com> wrote:

Hi,

While I was repeating https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258755,= I observed a
strange behavior. The TCP ACKs from FreeBSD = host are too aggressive.

My setup is = simple:
       A =             &n= bsp;           &nbs= p;       B
 [ = MacOS ]  <=3D=3D=3D=3D> [ FreeBSD VM ]
192.168.120.1 =            192.168.= 12.134 (disable tso and lro)
While A <--- B, i.e. A as = server and B as client, the packets rate looks good.

One session on B:

root@:~ # = iperf3 -c 192.168.120.1 -b 10m
Connecting to host = 192.168.120.1, port 5201
[  5] local 192.168.120.134 = port 54459 connected to 192.168.120.1 port 5201
[ ID] = Interval =           Transfer =     Bitrate =         Retr  Cwnd
[  5]   0.00-1.00   sec  1.25 = MBytes  10.5 Mbits/sec    0    257 = KBytes       
[  5] =   1.00-2.00   sec  1.25 MBytes  10.5 = Mbits/sec    0    257 KBytes =       
[  5] =   2.00-3.00   sec  1.12 MBytes  9.44 = Mbits/sec    0    257 KBytes =       
[  5] =   3.00-4.00   sec  1.25 MBytes  10.5 = Mbits/sec    0    257 KBytes =       
[  5] =   4.00-5.00   sec  1.12 MBytes  9.44 = Mbits/sec    0    257 KBytes =       
[  5] =   5.00-6.00   sec  1.25 MBytes  10.5 = Mbits/sec    0    257 KBytes =       
[  5] =   6.00-7.00   sec  1.12 MBytes  9.44 = Mbits/sec    0    257 KBytes =       
[  5] =   7.00-8.00   sec  1.25 MBytes  10.5 = Mbits/sec    0    257 KBytes =       
[  5] =   8.00-9.00   sec  1.12 MBytes  9.44 = Mbits/sec    0    257 KBytes =       
[  5] =   9.00-10.00  sec  1.25 MBytes  10.5 Mbits/sec =    0    257 KBytes =       
- - - - - - - - - - - = - - - - - - - - - - - - - -
[ ID] Interval =           Transfer =     Bitrate =         Retr
[ =  5]   0.00-10.00  sec  12.0 MBytes  10.1 = Mbits/sec    0 =             se= nder
[  5]   0.00-10.00  sec =  12.0 MBytes  10.1 Mbits/sec =             &n= bsp;    receiver

iperf = Done.

Another session on B:
root@:~ # netstat -w 1 -I vmx0
          inp= ut           vmx0 =           output
 packets  errs idrops =      bytes    packets  errs =      bytes colls
       0 =     0     0 =          0 =          0 =     0 =          0 =     0
       0 =     0     0 =          0 =          0 =     0 =          0 =     0
     342 =     0     0 =      22600 =        526     0 =     775724     0
     150     0 =     0       9900 =        851     0 =    1281454     0
     109     0 =     0       7194 =        901     0 =    1357850     0
     126     0 =     0       8316 =        828     0 =    1246632     0
     122     0 =     0       8052 =        910     0 =    1370780     0
     109     0 =     0       7194 =        819     0 =    1233702     0
     120     0 =     0       7920 =        910     0 =    1370780     0
     110     0 =     0       7260 =        819     0 =    1233702     0
     123     0 =     0       8118 =        910     0 =    1370780     0
     109     0 =     0       7194 =        819     0 =    1233702     0
      73 =     0     0 =       5088 =        465     0 =     686342     0
       0 =     0     0 =          0 =          0 =     0 =          0 =     0
       0 =     0     0 =          0 =          0 =     0 =          0 =     0



=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


While A ---> B, i.e. A as client and B as = server, the ACKs sent from B looks strange.

Session on A:

% iperf3 -c = 192.168.120.134 -b 10m
Connecting to host 192.168.120.134, = port 5201
[  5] local 192.168.120.1 port 52370 = connected to 192.168.120.134 port 5201
[ ID] Interval =           Transfer =     Bitrate
[  5] =   0.00-1.00   sec  1.25 MBytes  10.5 = Mbits/sec =             &n= bsp;    
[  5] =   1.00-2.00   sec  1.25 MBytes  10.5 = Mbits/sec =             &n= bsp;    
[  5] =   2.00-3.00   sec  1.12 MBytes  9.44 = Mbits/sec =             &n= bsp;    
[  5] =   3.00-4.00   sec  1.25 MBytes  10.5 = Mbits/sec =             &n= bsp;    
[  5] =   4.00-5.00   sec  1.12 MBytes  9.44 = Mbits/sec =             &n= bsp;    
[  5] =   5.00-6.00   sec  1.25 MBytes  10.5 = Mbits/sec =             &n= bsp;    
[  5] =   6.00-7.00   sec  1.12 MBytes  9.44 = Mbits/sec =             &n= bsp;    
[  5] =   7.00-8.00   sec  1.25 MBytes  10.5 = Mbits/sec =             &n= bsp;    
[  5] =   8.00-9.00   sec  1.12 MBytes  9.44 = Mbits/sec =             &n= bsp;    
[  5] =   9.00-10.00  sec  1.25 MBytes  10.5 Mbits/sec =             &n= bsp;    
- - - - - - - - - - - - - - - = - - - - - - - - - -
[ ID] Interval =           Transfer =     Bitrate
[  5] =   0.00-10.00  sec  12.0 MBytes  10.1 Mbits/sec =             &n= bsp;    sender
[  5] =   0.00-10.00  sec  12.0 MBytes  10.1 Mbits/sec =             &n= bsp;    receiver

iperf = Done.

Session on B:

root@:~ # netstat -w 1 -I vmx0
          inp= ut           vmx0 =           output
 packets  errs idrops =      bytes    packets  errs =      bytes colls
       0 =     0     0 =          0 =          0 =     0 =          0 =     0
       0 =     0     0 =          0 =          0 =     0 =          0 =     0
     649 =     0     0 =     960562 =        330     0 =      21800     0
     819     0 =     0    1233702 =        415     0 =      27390     0
     910     0 =     0    1370780 =        459     0 =      30294     0
     819     0 =     0    1233702 =        415     0 =      27390     0
     910     0 =     0    1370780 =        459     0 =      30294     0
     910     0 =     0    1370780 =        460     0 =      30360     0
     819     0 =     0    1233702 =        414     0 =      27324     0
     910     0 =     0    1370780 =        460     0 =      30360     0
     819     0 =     0    1233702 =        414     0 =      27324     0
     910     0 =     0    1370780 =        460     0 =      30360     0
     285     0 =     0     412287 =        147     0 =       9981     0
       0 =     0     0 =          0 =          0 =     0 =          0 =     0
       0 =     0     0 =          0 =          0 =     0 =          0 =     0
       0 =     0     0 =          0 =          0 =     0 =          0 =     0


The = ACK packets replied from B (the FreeBSD VM) are too aggressive. They = are
about one half of TCP packets received from A.

I've tested with different bitrates, from 10m = to 300m, all behave the same.
Tested with baremetal = FreeBSD 13.1 Box as B (with intel em driver), the 
bitrates is = 1g, also  behaves the same.

Also tried = different FreeBSD versions, 11.4, 12.3, stable/13 and current/14 = all 
behave the same.


My= question is, is that the expected behavior of current default TCP = stack?
That is what I would expect. TCP (on = FreeBSD) is acking every other packet. This
is also what = is specified. MacOS, at least newer versions, send less ACKs.
Thanks for fast response!

My have old memories about SACK which helps TCP performance. = This behavior
seems odd from my mind. But those memories = date back to 2008, that is 14 years ago.
I don't think anything has = changed since then from a specification point of view
Hacked some RFCs from 1122, and the = transport protocol is stable, and apparently
it should = be.

The current implementation of TCP stack in FreeBSD head is = too complexed for me.
Can you please point me the RFCs = specifying this? So I can start over with a quick glue.
Send an ACK for every other frame if everything is OK, send = it immediately if there are some gaps:
https://datatracker.ietf.org/doc/html/rfc9293#section-3.8.6.3
This applies = also to the case where you use SACK.
I think I confused = SACK with delayed ACK.


= --Apple-Mail=_0987CBA6-7ECA-4B84-BEC7-7256BD5AFCA9--