From: Kuniyuki Iwashima <kuniyu@google.com>
To: Eric Dumazet <edumazet@kernel.org>,
Neal Cardwell <ncardwell@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>
Cc: Simon Horman <horms@kernel.org>,
Yuchung Cheng <ycheng@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
netdev@vger.kernel.org
Subject: [PATCH v1 net-next 09/10] selftest: packetdrill: Add tests for Generic PLB.
Date: Fri, 4 Dec 2026 17:54:39 +0900 [thread overview]
Message-ID: <20261204085551.1518105-10-kuniyu@google.com> (raw)
In-Reply-To: <20261204085551.1518105-1-kuniyu@google.com>
tcp_plb_loss_rate.pkt verifies that rehash happens when
cur_rate drops sharply.
tcp_plb_loss_rto_suspend.pkt verifies Generic PLB is also
suspended for net.ipv4.tcp_plb_suspend_rto_sec seconds.
tcp_plb_loss_tlp.pkt verifies spurious TLP does not rehash
but TLP loss rehashes the flow.
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
---
.../net/packetdrill/tcp_plb_loss_rate.pkt | 83 +++++++++
.../packetdrill/tcp_plb_loss_rto_suspend.pkt | 166 ++++++++++++++++++
.../net/packetdrill/tcp_plb_loss_tlp.pkt | 102 +++++++++++
3 files changed, 351 insertions(+)
create mode 100644 tools/testing/selftests/net/packetdrill/tcp_plb_loss_rate.pkt
create mode 100644 tools/testing/selftests/net/packetdrill/tcp_plb_loss_rto_suspend.pkt
create mode 100644 tools/testing/selftests/net/packetdrill/tcp_plb_loss_tlp.pkt
diff --git a/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rate.pkt b/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rate.pkt
new file mode 100644
index 000000000000..2e81fde34e60
--- /dev/null
+++ b/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rate.pkt
@@ -0,0 +1,83 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Test TCP Generic PLB: rate-drop triggered PLB rehash in Fast Recovery.
+// - Phase 1: 4 Fast Recovery rounds (< 5) -> no rehash.
+// - Phase 2: Record non-app-limited plb_max_rate, then drop cur_rate
+// upon entering the 5th Fast Recovery -> rehash.
+
+`./defaults.sh
+sysctl -q net.ipv4.tcp_early_retrans=0
+sysctl -q net.ipv4.tcp_plb_loss_rehash_prob=255`
+
+ 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+ +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+ +0 bind(3, ..., ...) = 0
+ +0 listen(3, 1) = 0
+
+// Use 10ms handshake RTT (srtt ~ 10ms, RTO ~ 210ms > 50ms rate-drop wait).
+ +.01 < S 0:0(0) win 32792 <mss 100,sackOK,nop,nop,nop,wscale 7>
+ +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8>
+ +.01 < . 1:1(0) ack 1 win 320
+ +0 accept(3, ..., ...) = 4
+
+// Grow cwnd to 40 in Slow Start and record high plb_max_rate (~1125B / 10ms).
+ +0 write(4, ..., 3000) = 3000
+ +0 > (flowlabel 0x1) P. 1:1001(1000) ack 1
+ +.01 < . 1:1(0) ack 1001 win 320
+ +0 > (flowlabel 0x1) P. 1001:3001(2000) ack 1
+ +.01 < . 1:1(0) ack 3001 win 320
+
+// Phase 1: 4 Fast Recovery rounds (plb_loss_recoveries = 1..4 < 5 -> no rehash).
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 3001:3401(400) ack 1
+ +.01 < . 1:1(0) ack 3001 win 320 <sack 3101:3401,nop,nop>
+ +0 > (flowlabel 0x1) . 3001:3101(100) ack 1
+ +0 %{ assert tcpi_rehash == 0, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 3401 win 320
+
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 3401:3801(400) ack 1
+ +.01 < . 1:1(0) ack 3401 win 320 <sack 3501:3801,nop,nop>
+ +0 > (flowlabel 0x1) . 3401:3501(100) ack 1
+ +0 %{ assert tcpi_rehash == 0, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 3801 win 320
+
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 3801:4201(400) ack 1
+ +.01 < . 1:1(0) ack 3801 win 320 <sack 3901:4201,nop,nop>
+ +0 > (flowlabel 0x1) . 3801:3901(100) ack 1
+ +0 %{ assert tcpi_rehash == 0, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 4201 win 320
+
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 4201:4601(400) ack 1
+ +.01 < . 1:1(0) ack 4201 win 320 <sack 4301:4601,nop,nop>
+ +0 > (flowlabel 0x1) . 4201:4301(100) ack 1
+ +0 %{ assert tcpi_rehash == 0, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 4601 win 320
+ +0 %{ assert tcpi_ca_state == TCP_CA_Open, tcpi_ca_state }%
+
+// Phase 2 (5th recovery with delivery rate drop -> rehash): cwnd == 9.
+// Write 9 + 4 = 13 segments (1300B).
+// Batch 1 (900B) is sent with is_app_limited = 1.
+ +.01 write(4, ..., 1300) = 1300
+ +0 > (flowlabel 0x1) . 4601:5501(900) ack 1
+
+// ACK Batch 1 at +.01: clears app_limited and clocks out Batch 2 (400B)
+// with is_app_limited = 0.
+ +.01 < . 1:1(0) ack 5501 win 320
+ +0 > (flowlabel 0x1) P. 5501:5901(400) ack 1
+
+// Lose 5501:5601.
+// 1st SACK at +.05 updates rate sample to 1 segment / 50ms with is_app_limited = 0.
+// 2nd SACK makes sacked_out == 3 and enters Fast Recovery on the 5th recovery.
+ +.05 < . 1:1(0) ack 5501 win 320 <sack 5601:5701,nop,nop>
+ +0 < . 1:1(0) ack 5501 win 320 <sack 5601:5901,nop,nop>
+
+// Rate-drop on 5th recovery triggers rehash:
+// Fast retransmit has flowlabel 0x2 and tcpi_rehash == 1.
+ +0 > (flowlabel 0x2) . 5501:5601(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+
+// Clean finish.
+ +.01 < . 1:1(0) ack 5901 win 320
diff --git a/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rto_suspend.pkt b/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rto_suspend.pkt
new file mode 100644
index 000000000000..c44f7c65c8e5
--- /dev/null
+++ b/tools/testing/selftests/net/packetdrill/tcp_plb_loss_rto_suspend.pkt
@@ -0,0 +1,166 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Test TCP Generic PLB: RTO reset of plb_loss_recoveries and RTO suspension.
+// - Pre-RTO: 1 Fast Recovery sets plb_loss_recoveries = 1.
+// - RTO: rehashes the socket, sets plb_pause_until to [1.0s, 2.0s),
+// and resets plb_loss_recoveries to 0.
+// - Phase 1: 5 Fast Recoveries within < 1.0s reach plb_loss_recoveries == 5
+// with rate_prob == 255, but rehash is suppressed by plb_pause_until.
+// - Phase 2: After > 2.0s, 4 Fast Recoveries (< 5) do not rehash, and the
+// 5th Fast Recovery clears plb_pause_until and triggers PLB rehash.
+
+`./defaults.sh
+sysctl -q net.ipv4.tcp_early_retrans=0
+sysctl -q net.ipv4.tcp_plb_loss_rehash_prob=255
+sysctl -q net.ipv4.tcp_plb_suspend_rto_sec=1`
+
+ 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+ +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+ +0 bind(3, ..., ...) = 0
+ +0 listen(3, 1) = 0
+
+// Use 10ms handshake RTT.
+ +.01 < S 0:0(0) win 32792 <mss 100,sackOK,nop,nop,nop,wscale 7>
+ +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8>
+ +.01 < . 1:1(0) ack 1 win 320
+ +0 accept(3, ..., ...) = 4
+
+// Grow cwnd to 40 in Slow Start and record high plb_max_rate (~1125B / 10ms).
+ +0 write(4, ..., 3000) = 3000
+ +0 > (flowlabel 0x1) P. 1:1001(1000) ack 1
+ +.01 < . 1:1(0) ack 1001 win 320
+ +0 > (flowlabel 0x1) P. 1001:3001(2000) ack 1
+ +.01 < . 1:1(0) ack 3001 win 320
+
+// Pre-RTO Fast Recovery: plb_loss_recoveries becomes 1.
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 3001:3401(400) ack 1
+ +.01 < . 1:1(0) ack 3001 win 320 <sack 3101:3401,nop,nop>
+ +0 > (flowlabel 0x1) . 3001:3101(100) ack 1
+ +0 %{ assert tcpi_rehash == 0, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 3401 win 320
+
+// RTO: rehashes flowlabel to 0x2 (tcpi_rehash == 1), sets pause_until to [1s, 2s),
+// and resets plb_loss_recoveries from 1 to 0.
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x1) P. 3401:3501(100) ack 1
++.19~+.27 > (flowlabel 0x2) P. 3401:3501(100) ack 1
+ +.01 < . 1:1(0) ack 3501 win 320
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+
+// Phase 1: 5 Fast Recoveries within < 1.0s since RTO.
+// Recovery 1 (plb_loss_recoveries == 1):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 3501:3601(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 3601:3701(100) ack 1
+ +.01 < . 1:1(0) ack 3501 win 320 <sack 3601:3701,nop,nop>
+ +0 > (flowlabel 0x2) P. 3501:3601(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 3701 win 320
+
+// Recovery 2 (plb_loss_recoveries == 2):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 3701:3801(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 3801:3901(100) ack 1
+ +.01 < . 1:1(0) ack 3701 win 320 <sack 3801:3901,nop,nop>
+ +0 > (flowlabel 0x2) P. 3701:3801(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 3901 win 320
+
+// Recovery 3 (plb_loss_recoveries == 3):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 3901:4001(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 4001:4101(100) ack 1
+ +.01 < . 1:1(0) ack 3901 win 320 <sack 4001:4101,nop,nop>
+ +0 > (flowlabel 0x2) P. 3901:4001(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 4101 win 320
+
+// Recovery 4 (plb_loss_recoveries == 4):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 4101:4201(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 4201:4301(100) ack 1
+ +.01 < . 1:1(0) ack 4101 win 320 <sack 4201:4301,nop,nop>
+ +0 > (flowlabel 0x2) P. 4101:4201(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 4301 win 320
+
+// Deliver non-app-limited data and wait 50ms to establish low rate sample
+// (rate_prob == 255) before Recovery 5 in Phase 1:
+ +0 write(4, ..., 300) = 300
+ +0 > (flowlabel 0x2) . 4301:4501(200) ack 1
+ +.01 < . 1:1(0) ack 4501 win 320
+ +0 > (flowlabel 0x2) P. 4501:4601(100) ack 1
+ +.05 < . 1:1(0) ack 4601 win 320
+
+// Recovery 5 (plb_loss_recoveries reaches 5 and resets to 0; suppressed by pause_until):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 4601:4701(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 4701:4801(100) ack 1
+ +.01 < . 1:1(0) ack 4601 win 320 <sack 4701:4801,nop,nop>
+ +0 > (flowlabel 0x2) P. 4601:4701(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 4801 win 320
+
+// Phase 2: Wait 2.5s (> 2.0s max suspension window).
+// Recovery 1 in Phase 2 (plb_loss_recoveries == 1):
+ +2.5 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 4801:4901(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 4901:5001(100) ack 1
+ +.01 < . 1:1(0) ack 4801 win 320 <sack 4901:5001,nop,nop>
+ +0 > (flowlabel 0x2) P. 4801:4901(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 5001 win 320
+
+// Recovery 2 in Phase 2 (plb_loss_recoveries == 2):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 5001:5101(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 5101:5201(100) ack 1
+ +.01 < . 1:1(0) ack 5001 win 320 <sack 5101:5201,nop,nop>
+ +0 > (flowlabel 0x2) P. 5001:5101(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 5201 win 320
+
+// Recovery 3 in Phase 2 (plb_loss_recoveries == 3):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 5201:5301(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 5301:5401(100) ack 1
+ +.01 < . 1:1(0) ack 5201 win 320 <sack 5301:5401,nop,nop>
+ +0 > (flowlabel 0x2) P. 5201:5301(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 5401 win 320
+
+// Recovery 4 in Phase 2 (plb_loss_recoveries == 4):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 5401:5501(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 5501:5601(100) ack 1
+ +.01 < . 1:1(0) ack 5401 win 320 <sack 5501:5601,nop,nop>
+ +0 > (flowlabel 0x2) P. 5401:5501(100) ack 1
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 5601 win 320
+
+// Deliver non-app-limited data and wait 50ms to establish low rate sample:
+ +0 write(4, ..., 300) = 300
+ +0 > (flowlabel 0x2) . 5601:5801(200) ack 1
+ +.01 < . 1:1(0) ack 5801 win 320
+ +0 > (flowlabel 0x2) P. 5801:5901(100) ack 1
+ +.05 < . 1:1(0) ack 5901 win 320
+
+// Recovery 5 in Phase 2 (plb_loss_recoveries reaches 5 -> clears pause_until and rehashes):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 5901:6001(100) ack 1
+ +.02 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 6001:6101(100) ack 1
+ +.01 < . 1:1(0) ack 5901 win 320 <sack 6001:6101,nop,nop>
+ +0 > (flowlabel 0x3) P. 5901:6001(100) ack 1
+ +0 %{ assert tcpi_rehash == 2, tcpi_rehash }%
+ +.01 < . 1:1(0) ack 6101 win 320
diff --git a/tools/testing/selftests/net/packetdrill/tcp_plb_loss_tlp.pkt b/tools/testing/selftests/net/packetdrill/tcp_plb_loss_tlp.pkt
new file mode 100644
index 000000000000..d6c8ee5d184e
--- /dev/null
+++ b/tools/testing/selftests/net/packetdrill/tcp_plb_loss_tlp.pkt
@@ -0,0 +1,102 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Test TCP Generic PLB: TLP loss probe triggered PLB rehash.
+// - Setup: Establish high plb_max_rate and 4 Fast Recoveries
+// so plb_loss_recoveries == 4.
+// - Part A: Spurious TLP acked by DSACK does not call
+// tcp_plb_check_rehash_loss() -> no rehash.
+// - Part B: Real tail loss detected by TLP (after(ack, tp->tlp_high_seq))
+// increments plb_loss_recoveries to 5 and triggers PLB rehash.
+
+`./defaults.sh
+sysctl -q net.ipv4.tcp_plb_loss_rehash_prob=255`
+
+ 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+ +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+ +0 bind(3, ..., ...) = 0
+ +0 listen(3, 1) = 0
+
+// Use 10ms handshake RTT.
+ +.01 < S 0:0(0) win 32792 <mss 100,sackOK,nop,nop,nop,wscale 7>
+ +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8>
+ +.01 < . 1:1(0) ack 1 win 320
+ +0 accept(3, ..., ...) = 4
+
+// Grow cwnd to 40 in Slow Start and record high plb_max_rate (~1125B / 10ms).
+ +0 write(4, ..., 3000) = 3000
+ +0 > (flowlabel 0x1) P. 1:1001(1000) ack 1
+ +.01 < . 1:1(0) ack 1001 win 320
+ +0 > (flowlabel 0x1) P. 1001:3001(2000) ack 1
+ +.01 < . 1:1(0) ack 3001 win 320
+
+// Trigger 4 Fast Recovery rounds so plb_loss_recoveries == 4 (< 5).
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 3001:3401(400) ack 1
+ +.01 < . 1:1(0) ack 3001 win 320 <sack 3101:3401,nop,nop>
+ +0 > (flowlabel 0x1) . 3001:3101(100) ack 1
+ +.01 < . 1:1(0) ack 3401 win 320
+
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 3401:3801(400) ack 1
+ +.01 < . 1:1(0) ack 3401 win 320 <sack 3501:3801,nop,nop>
+ +0 > (flowlabel 0x1) . 3401:3501(100) ack 1
+ +.01 < . 1:1(0) ack 3801 win 320
+
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 3801:4201(400) ack 1
+ +.01 < . 1:1(0) ack 3801 win 320 <sack 3901:4201,nop,nop>
+ +0 > (flowlabel 0x1) . 3801:3901(100) ack 1
+ +.01 < . 1:1(0) ack 4201 win 320
+
+ +0 write(4, ..., 400) = 400
+ +0 > (flowlabel 0x1) P. 4201:4601(400) ack 1
+ +.01 < . 1:1(0) ack 4201 win 320 <sack 4301:4601,nop,nop>
+ +0 > (flowlabel 0x1) . 4201:4301(100) ack 1
+ +.01 < . 1:1(0) ack 4601 win 320
+ +0 %{ assert tcpi_rehash == 0, tcpi_rehash }%
+
+// Part A: DSACK TLP (no actual loss) must NOT call tcp_plb_check_rehash_loss().
+// cwnd == 9. Write 9 + 2 = 11 segments (1100B) so Batch 2 (5501:5701, 200B)
+// is clocked out with is_app_limited = 0.
+ +0 write(4, ..., 1100) = 1100
+ +0 > (flowlabel 0x1) . 4601:5501(900) ack 1
+ +.01 < . 1:1(0) ack 5501 win 320
+ +0 > (flowlabel 0x1) P. 5501:5701(200) ack 1
+
+// With packets_out == 2 > 1 and srtt == 10ms, TLP probe fires
+// at 2 * srtt + 2ms = 22ms:
++.018~+.040 > (flowlabel 0x1) P. 5601:5701(100) ack 1
+
+// Wait +.05 (< 210ms RTO) and ACK 5601 (1 segment / ~72ms with is_app_limited = 0),
+// rearming RTO while keeping tlp_high_seq == 5701.
+ +.05 < . 1:1(0) ack 5601 win 320
+
+// Wait +.05 and receive DSACK. FLAG_DSACK_TLP skips tcp_plb_check_rehash_loss(),
+// so plb_loss_recoveries stays 4 and no rehash occurs.
+ +.05 < . 1:1(0) ack 5701 win 320 <sack 5601:5701,nop,nop>
+ +0 %{ assert tcpi_rehash == 0, tcpi_rehash }%
+
+// Part B: TLP Loss Recovery (after(ack, tp->tlp_high_seq)) calls
+// tcp_plb_check_rehash_loss(), incrementing plb_loss_recoveries to 5.
+// Write 2 segments (200B) so packets_out == 2 > 1:
+ +0 write(4, ..., 200) = 200
+ +0 > (flowlabel 0x1) P. 5701:5901(200) ack 1
+
+// With packets_out == 2 > 1 and srtt ~ 18ms, TLP probe fires at
+// 2 * srtt + 2ms ~ 38ms (tlp_high_seq = 5901):
++.028~+.055 > (flowlabel 0x1) P. 5801:5901(100) ack 1
+
+// Sender transmits new data while TLP is in flight (tlp_high_seq remains 5901):
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x1) P. 5901:6001(100) ack 1
+
+// Peer cumulatively ACKs 6001 (ack 6001 > tlp_high_seq 5901).
+// tcp_process_tlp_ack() runs before tcp_rate_gen(), sees
+// after(ack, tp->tlp_high_seq) on the 5th recovery, and triggers rehash!
+ +.01 < . 1:1(0) ack 6001 win 320
+ +0 %{ assert tcpi_rehash == 1, tcpi_rehash }%
+
+// Outbound packet now has flowlabel 0x2.
+ +0 write(4, ..., 100) = 100
+ +0 > (flowlabel 0x2) P. 6001:6101(100) ack 1
+ +.01 < . 1:1(0) ack 6101 win 320
--
2.56.1.915.g69d5ec7298-goog
next prev parent reply other threads:[~2026-12-04 8:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 8:54 [PATCH v1 net-next 00/10] tcp: Introduce Generic PLB Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 01/10] tcp: Return early when tcp_plb_check_rehash() does not rehash a flow Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 02/10] tcp: Don't call get_random_u32_below(0) in tcp_plb_update_state_upon_rto() Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 03/10] tcp: Move struct tcp_plb_state to struct tcp_sock Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 04/10] tcp: Call tcp_plb_update_state_upon_rto() after rehash in tcp_write_timeout() Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 05/10] tcp: Rename tcp_plb_check_rehash() to tcp_plb_check_rehash_ecn() Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 06/10] tcp: Factorise tcp_plb_rehash() Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 07/10] tcp: Lower tcp_plb_suspend_rto_sec default Kuniyuki Iwashima
2026-12-04 8:54 ` [PATCH v1 net-next 08/10] tcp: Introduce Generic PLB Kuniyuki Iwashima
2026-12-04 8:54 ` Kuniyuki Iwashima [this message]
2026-12-04 8:54 ` [PATCH v1 net-next 10/10] selftest: net: Disable Generic PLB in ecmp_rehash.sh Kuniyuki Iwashima
2026-12-04 9:03 ` [PATCH v1 net-next 00/10] tcp: Introduce Generic PLB netdev-bot+sinfo
2026-12-04 9:29 ` Kuniyuki Iwashima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204085551.1518105-10-kuniyu@google.com \
--to=kuniyu@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=ycheng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox