mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-15 23:39:29 +00:00

Same as initial tests, import verbatim from github.com/google/packetdrill, aside from: - update `source ./defaults.sh` path to adjust for flat dir - add SPDX headers - remove author statements if any - drop blank lines at EOF Same test process as previous tests. Both with and without debug mode. Recording the steps once: make mrproper vng --build \ --config tools/testing/selftests/net/packetdrill/config \ --config kernel/configs/debug.config vng -v --run . --user root --cpus 4 -- \ make -C tools/testing/selftests TARGETS=net/packetdrill run_tests Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Soham Chakradeo <sohamch@google.com> Link: https://patch.msgid.link/20241217185203.297935-2-sohamch.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0
|
|
// Verify that setsockopt calls that force a route refresh do not
|
|
// cause problems matching SACKs with packets in the write queue.
|
|
// This variant tests IP_TOS.
|
|
|
|
`./defaults.sh`
|
|
|
|
// Establish a connection.
|
|
0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
|
|
+0 setsockopt(3, SOL_IP, IP_MTU_DISCOVER, [IP_PMTUDISC_DONT], 1) = 0
|
|
+0...0.010 connect(3, ..., ...) = 0
|
|
|
|
+0 > S 0:0(0) <mss 1460,sackOK,TS val 100 ecr 0,nop,wscale 8>
|
|
+.01 < S. 0:0(0) ack 1 win 65535 <mss 1460,nop,wscale 2,nop,nop,sackOK>
|
|
+0 > . 1:1(0) ack 1
|
|
|
|
+.01 write(3, ..., 5840) = 5840
|
|
+0 > P. 1:5841(5840) ack 1
|
|
+.01 < . 1:1(0) ack 5841 win 65535
|
|
|
|
+.01 write(3, ..., 5840) = 5840
|
|
+0 > P. 5841:11681(5840) ack 1
|
|
+.01 < . 1:1(0) ack 11681 win 65535
|
|
|
|
+.01 write(3, ..., 14600) = 14600
|
|
+0 > P. 11681:26281(14600) ack 1
|
|
|
|
// Try the socket option that we know can force a route refresh.
|
|
+0 setsockopt(3, SOL_IP, IP_TOS, [4], 1) = 0
|
|
// Then revert to avoid routing/mangling/etc implications of that setting.
|
|
+0 setsockopt(3, SOL_IP, IP_TOS, [0], 1) = 0
|
|
|
|
// Verify that we do not retransmit the SACKed segments.
|
|
+.01 < . 1:1(0) ack 13141 win 65535 <sack 16061:17521 20441:26281,nop,nop>
|
|
+0 > . 13141:16061(2920) ack 1
|
|
+0 > P. 17521:20441(2920) ack 1
|
|
+.01 < . 1:1(0) ack 26281 win 65535
|