[PATCH net-next v2 1/3] selftests: packetdrill: stop pinning rwnd in tcp_ooo_rcv_mss

Wesley Atwell posted 3 patches 1 week, 3 days ago
There is a newer version of this series
[PATCH net-next v2 1/3] selftests: packetdrill: stop pinning rwnd in tcp_ooo_rcv_mss
Posted by Wesley Atwell 1 week, 3 days ago
tcp_ooo_rcv_mss.pkt cares about the OOO SACK state and the resulting
tcpi_rcv_mss update.

Its exact advertised receive-window value is incidental to that test and
can legitimately move when unrelated rwnd accounting changes adjust the
ACK window.

Drop the hard-coded win 81 checks and keep only the ACK/SACK shape and
the tcpi_rcv_mss assertion.

Signed-off-by: Wesley Atwell <atwellwea@gmail.com>
---
 tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt b/tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt
index 7e6bc5fb0c8d..0b19de9f9307 100644
--- a/tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt
+++ b/tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt
@@ -17,11 +17,13 @@ sysctl -q net.ipv4.tcp_rmem="4096 131072 $((32*1024*1024))"`
    +0 accept(3, ..., ...) = 4
 
    +0 < . 2001:11001(9000) ack 1 win 257
-   +0 > . 1:1(0) ack 1 win 81 <nop,nop,sack 2001:11001>
+// This test cares about the OOO SACK state and the resulting tcpi_rcv_mss.
+// Keep the ACK/SACK shape exact, but do not pin the precise advertised
+// receive window here because unrelated rwnd accounting changes can adjust it.
+   +0 > . 1:1(0) ack 1 <nop,nop,sack 2001:11001>
 
 // check that ooo packet properly updates tcpi_rcv_mss
    +0 %{ assert tcpi_rcv_mss == 1000, tcpi_rcv_mss }%
 
    +0 < . 11001:21001(10000) ack 1 win 257
-   +0 > . 1:1(0) ack 1 win 81 <nop,nop,sack 2001:21001>
-
+   +0 > . 1:1(0) ack 1 <nop,nop,sack 2001:21001>
-- 
2.43.0
Re: [PATCH net-next v2 1/3] selftests: packetdrill: stop pinning rwnd in tcp_ooo_rcv_mss
Posted by Eric Dumazet 1 week, 3 days ago
On Mon, Mar 23, 2026 at 11:04 PM Wesley Atwell <atwellwea@gmail.com> wrote:
>
> tcp_ooo_rcv_mss.pkt cares about the OOO SACK state and the resulting
> tcpi_rcv_mss update.
>
> Its exact advertised receive-window value is incidental to that test and
> can legitimately move when unrelated rwnd accounting changes adjust the
> ACK window.
>
> Drop the hard-coded win 81 checks and keep only the ACK/SACK shape and
> the tcpi_rcv_mss assertion.
>
> Signed-off-by: Wesley Atwell <atwellwea@gmail.com>
> ---
>  tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt b/tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt
> index 7e6bc5fb0c8d..0b19de9f9307 100644
> --- a/tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt
> +++ b/tools/testing/selftests/net/packetdrill/tcp_ooo_rcv_mss.pkt
> @@ -17,11 +17,13 @@ sysctl -q net.ipv4.tcp_rmem="4096 131072 $((32*1024*1024))"`
>     +0 accept(3, ..., ...) = 4
>
>     +0 < . 2001:11001(9000) ack 1 win 257
> -   +0 > . 1:1(0) ack 1 win 81 <nop,nop,sack 2001:11001>
> +// This test cares about the OOO SACK state and the resulting tcpi_rcv_mss.
> +// Keep the ACK/SACK shape exact, but do not pin the precise advertised
> +// receive window here because unrelated rwnd accounting changes can adjust it.

I do not think we need a comment, the change is captured in the
changelog just fine.

Most packetdrill tests do not have 'win xxx' in their xmit packets, we
do not need
to explain this.

> +   +0 > . 1:1(0) ack 1 <nop,nop,sack 2001:11001>
>
>  // check that ooo packet properly updates tcpi_rcv_mss
>     +0 %{ assert tcpi_rcv_mss == 1000, tcpi_rcv_mss }%
>
>     +0 < . 11001:21001(10000) ack 1 win 257
> -   +0 > . 1:1(0) ack 1 win 81 <nop,nop,sack 2001:21001>
> -
> +   +0 > . 1:1(0) ack 1 <nop,nop,sack 2001:21001>
> --
> 2.43.0