From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: passt.top; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=irdRAS8b; dkim-atps=neutral Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by passt.top (Postfix) with ESMTPS id 767165A061E for ; Mon, 27 Jan 2025 11:06:18 +0100 (CET) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5dbfab8a2b0so8416541a12.3 for ; Mon, 27 Jan 2025 02:06:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737972378; x=1738577178; darn=passt.top; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VH4CnsVoFIKrMW+ju8mTDp4FzGeBRfrpK/9n+IGNSMk=; b=irdRAS8bCs8C+BSe10Dlz2wqxngYn4PW0AfwWcuc0J6Bj1/FyTt7LxNjK9ZNtSYtLC Pu4IyJ+r2RoZSFqH+XEEUdvOqL9L2EVi26udvoRBoEDDSWi4OjoygBxbTxJcxAcctErb ahWEeYWzRAz+pfy5gqSc8KLTNgMgG7jA75jdlOTzLP2Sd7Qto8IH9WTgLQJVl1yeHicT 1FzogXv8qePl9Am18gNEKslra0bUG2SS93yUfzBYXkvJ42KTVtJvhzf4nkgxPn4xQEqX 3vuxcrFWPNi15S2sJZ3Ra4NBK3invLwh9ksQn4v5G3b09iOrxPUPdeMh+hBPjt6ZM+aA +Rjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737972378; x=1738577178; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VH4CnsVoFIKrMW+ju8mTDp4FzGeBRfrpK/9n+IGNSMk=; b=udbAQ01G6FYFt8kHQMUnAODuF6UfjCeQJY3wLRAE7tJ/+iN341HKQwPQH89SFSkqbN rvGwMl+9yL9uaCudJXCDW60bMW97ecngg0XH+rb8TXkhT2WBTekDHpgjrl5ApLuuV5sN 91hVjS21v9HEcpzy77kPidYLBMpOZWl79i3tb1XDMaUWj/lmB2xEldIG/egAWow8l1Er qNOYMT1ZL/XblSr+G8UCOFBKUpHpEdUOVuRTV14L7eDQ96d/nLkosEu4RQAyxsA4m2tr /2wifMPBhyPkiLcfjnzGEvWe1OhwX94h5noAP6JNqNQEHfudQEpGbxItqsMw2EZ2HkRf ej2A== X-Forwarded-Encrypted: i=1; AJvYcCUbuT36pLGwqdsvGy8rvNkpuKoeCG6BxpVGkKjjQK5i4zDArTs7Q8qmZUcpClUZ4r86hk5eqJBc2M8=@passt.top X-Gm-Message-State: AOJu0YxppVBn9cZ8LdZoEkdS+ZDtgWnXPHvcyRFmNDGAyEw51HAhavtV v+PrBxSuGnlBdsTYRnqdtVKltnqfZCL2XVA35rR/OuDlfXAPNpOCHzFE48ZKHVMUUMe783XHBAt DbN01vjshVtZmxyJHokdBfKfroyMil+x3PHQe X-Gm-Gg: ASbGncsa5HvCV/eOICZG9cjlk4Uu2Kp6cHbqfiLmeq5GXNVAmWvC/C/LO2s14FgLsDj tyd7117hjF6mUdiBvySmX69vkXNNxsKezkSidhKP2vvnisfVimGl8oVsFX6iMgQ== X-Google-Smtp-Source: AGHT+IEK0mfFCDU+rZIY3KCdjtBVZ94LbVI87w4XHtZxLqFTpobyjupwLsSAXcuDdRgIJurDmKfQLwh2SuyS+UzEkEc= X-Received: by 2002:a05:6402:1e96:b0:5dc:1239:1e40 with SMTP id 4fb4d7f45d1cf-5dc12391edamr12713038a12.31.1737972377908; Mon, 27 Jan 2025 02:06:17 -0800 (PST) MIME-Version: 1.0 References: <20250117214035.2414668-1-jmaloy@redhat.com> <20250127110121.1f53b27d@elisabeth> In-Reply-To: <20250127110121.1f53b27d@elisabeth> From: Eric Dumazet Date: Mon, 27 Jan 2025 11:06:07 +0100 X-Gm-Features: AWEUYZnFUBRn0g4lzs0Ys1IPU6Wx9pJClaC24giX4xaag7aSllHJ2EKBa1kjAvY Message-ID: Subject: Re: [net,v2] tcp: correct handling of extreme memory squeeze To: Stefano Brivio Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-MailFrom: edumazet@google.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: BASWJOGUMW7JN7KMSK5FQ2WABM2UNVTL X-Message-ID-Hash: BASWJOGUMW7JN7KMSK5FQ2WABM2UNVTL X-Mailman-Approved-At: Mon, 27 Jan 2025 18:12:04 +0100 CC: Jon Maloy , Neal Cardwell , netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com, eric.dumazet@gmail.com, Menglong Dong X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, Jan 27, 2025 at 11:01=E2=80=AFAM Stefano Brivio wrote: > > On Fri, 24 Jan 2025 12:40:16 -0500 > Jon Maloy wrote: > > > I can certainly clear tp->pred_flags and post it again, maybe with > > an improved and shortened log. Would that be acceptable? > > Talking about an improved log, what strikes me the most of the whole > problem is: > > $ tshark -r iperf3_jon_zero_window.pcap -td -Y 'frame.number in { 1064 ..= 1068 }' > 1064 0.004416 192.168.122.1 =E2=86=92 192.168.122.198 TCP 65534 34482 = =E2=86=92 5201 [ACK] Seq=3D1611679466 Ack=3D1 Win=3D36864 Len=3D65480 > 1065 0.007334 192.168.122.1 =E2=86=92 192.168.122.198 TCP 65534 34482 = =E2=86=92 5201 [ACK] Seq=3D1611744946 Ack=3D1 Win=3D36864 Len=3D65480 > 1066 0.005104 192.168.122.1 =E2=86=92 192.168.122.198 TCP 56382 [TCP W= indow Full] 34482 =E2=86=92 5201 [ACK] Seq=3D1611810426 Ack=3D1 Win=3D36864= Len=3D56328 > 1067 0.015226 192.168.122.198 =E2=86=92 192.168.122.1 TCP 54 [TCP Zero= Window] 5201 =E2=86=92 34482 [ACK] Seq=3D1 Ack=3D1611090146 Win=3D0 Len=3D0 > 1068 6.298138 fe80::44b3:f5ff:fe86:c529 =E2=86=92 ff02::2 ICMPv6 = 70 Router Solicitation from 46:b3:f5:86:c5:29 > > ...and then the silence, 192.168.122.198 never announces that its > window is not zero, so the peer gives up 15 seconds later: > > $ tshark -r iperf3_jon_zero_window_cut.pcap -td -Y 'frame.number in { 106= 9 .. 1070 }' > 1069 8.709313 192.168.122.1 =E2=86=92 192.168.122.198 TCP 55 34466 =E2= =86=92 5201 [ACK] Seq=3D166 Ack=3D5 Win=3D36864 Len=3D1 > 1070 0.008943 192.168.122.198 =E2=86=92 192.168.122.1 TCP 54 5201 =E2= =86=92 34482 [FIN, ACK] Seq=3D1 Ack=3D1611090146 Win=3D778240 Len=3D0 > > Data in frame #1069 is iperf3 ending the test. > > This didn't happen before e2142825c120 ("net: tcp: send zero-window > ACK when no memory") so it's a relatively recent (17 months) regression. > > It actually looks pretty simple (and rather serious) to me. > With all that, it should be pretty easy to cook a packetdrill test, right ? packetdrill tests are part of tools/testing/selftests/net/ already, we are not asking for something unreasonable.