tools/testing/selftests/net/packetdrill/tcp_tcp_info_tcp-info-rwnd-limited.pkt
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/packetdrill/tcp_tcp_info_tcp-info-rwnd-limited.pkt
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/packetdrill/tcp_tcp_info_tcp-info-rwnd-limited.pkt- Extension
.pkt- Size
- 1894 bytes
- Lines
- 55
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
// Test rwnd limited time in tcp_info for client side.
`./defaults.sh`
// Create a socket and set it to non-blocking.
0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
+0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0 > S 0:0(0) <mss 1460,sackOK,TS val 100 ecr 0,nop,wscale 8>
// Server advertises 0 receive window.
+.01 < S. 0:0(0) ack 1 win 0 <mss 1000,nop,nop,sackOK>
+0 > . 1:1(0) ack 1
+0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
+0 fcntl(3, F_SETFL, O_RDWR) = 0 // set back to blocking
// Make sure that initial rwnd limited time is 0.
+0 %{ assert tcpi_rwnd_limited == 0, tcpi_rwnd_limited }%
// Receive window limited time starts here.
+0 write(3, ..., 1000) = 1000
// Check that rwnd limited time in tcp_info is around 0.1s.
+.1 %{ assert 98000 <= tcpi_rwnd_limited <= 110000, tcpi_rwnd_limited }%
// Server opens the receive window.
+.1 < . 1:1(0) ack 1 win 2000
// Check that rwnd limited time in tcp_info is around 0.2s.
+0 %{ assert 198000 <= tcpi_rwnd_limited <= 210000, tcpi_rwnd_limited }%
+0 > P. 1:1001(1000) ack 1
// Server advertises a very small receive window.
+.03 < . 1:1(0) ack 1001 win 10
// Receive window limited time starts again.
+0 write(3, ..., 1000) = 1000
// Server opens the receive window again.
+.1 < . 1:1(0) ack 1001 win 2000
// Check that rwnd limited time in tcp_info is around 0.3s
// and busy time is 0.3 + 0.03 (server opened small window temporarily).
+0 %{ assert 298000 <= tcpi_rwnd_limited <= 310000, tcpi_rwnd_limited;\
assert 328000 <= tcpi_busy_time <= 340000, tcpi_busy_time;\
}%
+0 > P. 1001:2001(1000) ack 1
+.02 < . 1:1(0) ack 2001 win 2000
+0 %{ assert 348000 <= tcpi_busy_time <= 360000, tcpi_busy_time }%
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.