Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/net: packetdrill: restore tcp_rcv_big_endseq.pkt

Commit 1cc93c48b5d7 ("selftests/net: packetdrill: remove tests for
tcp_rcv_*big") removed the test for the reverted commit 1d2fbaad7cd8
("tcp: stronger sk_rcvbuf checks") but also the one for commit
9ca48d616ed7 ("tcp: do not accept packets beyond window").

Restore the test with the necessary adaptation: expect a delayed ACK
instead of an immediate one, since tcp_can_ingest() does not fail
anymore for the last data packet.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Link: https://patch.msgid.link/20260301-tcp_rcv_big_endseq-v1-1-86ab7415ab58@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Simon Baatz and committed by
Jakub Kicinski
3f10543c 7cbe98f7

+44
+44
tools/testing/selftests/net/packetdrill/tcp_rcv_big_endseq.pkt
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + --mss=1000 4 + 5 + `./defaults.sh` 6 + 7 + 0 `nstat -n` 8 + 9 + // Establish a connection. 10 + +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 11 + +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 12 + +0 setsockopt(3, SOL_SOCKET, SO_RCVBUF, [10000], 4) = 0 13 + +0 bind(3, ..., ...) = 0 14 + +0 listen(3, 1) = 0 15 + 16 + +0 < S 0:0(0) win 32792 <mss 1000,nop,wscale 7> 17 + +0 > S. 0:0(0) ack 1 <mss 1460,nop,wscale 0> 18 + +.1 < . 1:1(0) ack 1 win 257 19 + 20 + +0 accept(3, ..., ...) = 4 21 + 22 + +0 < P. 1:4001(4000) ack 1 win 257 23 + +0 > . 1:1(0) ack 4001 win 5000 24 + 25 + // packet in sequence : SKB_DROP_REASON_TCP_INVALID_END_SEQUENCE / LINUX_MIB_BEYOND_WINDOW 26 + +0 < P. 4001:54001(50000) ack 1 win 257 27 + +0 > . 1:1(0) ack 4001 win 5000 28 + 29 + // ooo packet. : SKB_DROP_REASON_TCP_INVALID_END_SEQUENCE / LINUX_MIB_BEYOND_WINDOW 30 + +1 < P. 5001:55001(50000) ack 1 win 257 31 + +0 > . 1:1(0) ack 4001 win 5000 32 + 33 + // SKB_DROP_REASON_TCP_INVALID_SEQUENCE / LINUX_MIB_BEYOND_WINDOW 34 + +0 < P. 70001:80001(10000) ack 1 win 257 35 + +0 > . 1:1(0) ack 4001 win 5000 36 + 37 + +0 read(4, ..., 100000) = 4000 38 + 39 + // If queue is empty, accept a packet even if its end_seq is above wup + rcv_wnd 40 + +0 < P. 4001:54001(50000) ack 1 win 257 41 + * > . 1:1(0) ack 54001 win 0 42 + 43 + // Check LINUX_MIB_BEYOND_WINDOW has been incremented 3 times. 44 + +0 `nstat | grep TcpExtBeyondWindow | grep -q " 3 "`