aboutsummaryrefslogtreecommitdiffstats
path: root/link/test-link.c
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-29 09:27:49 +0100
committereunhhu <[email protected]>2026-09-29 09:27:49 +0100
commitf26f5fbd0a487a9a2848f819361b4e6fdd7a9cb1 (patch)
tree624028b8a84299842bd3d3456be5962dd7dd420c /link/test-link.c
parenta6c825b8613177e32e9bf43e2abd6ac820bc8321 (diff)
downloadpure-f26f5fbd0a487a9a2848f819361b4e6fdd7a9cb1.tar.gz
pure-f26f5fbd0a487a9a2848f819361b4e6fdd7a9cb1.zip
Find how large a packet the path carries: 1,452 bytes once a probe is acknowledged
A link starts at 1,200 bytes; once an RTT is known it sends a PING padded to 1,452 (DPLPMTUD, RFC 8899), alone and with the don't-fragment bit, and uses that size once it is acknowledged. A probe lost is no congestion; it is tried again a second on, three times, then ten minutes on. GSO is asked for each burst (a control message), not the socket, so a packet sent alone is never cut. CUBIC counts in the datagram. On loopback packets fall by 19-27%; the CPU a record falls 13% at 1 KiB and 7% at 16 KiB; in the simulator of a 50 Mbit/s path with 1% loss the goodput rises from 6.1 to 7.0 Mbit/s (5%: 2.3 to 3.0).
Diffstat (limited to 'link/test-link.c')
-rw-r--r--link/test-link.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/link/test-link.c b/link/test-link.c
index 8be32a9..a05f8bc 100644
--- a/link/test-link.c
+++ b/link/test-link.c
@@ -45,7 +45,7 @@ typedef struct {
uint64_t at;
bool to_receiver;
size_t size;
- unsigned char bytes[PURE_LINK_DATAGRAM];
+ unsigned char bytes[PURE_LINK_DATAGRAM_MOST];
} Packet;
typedef struct {
@@ -185,7 +185,7 @@ static Outcome run(const Case *c, const char *dir) {
PureLinkReceiver *r = receiver_of(&w, b, public_b, public_a, memo, c->idle_ms);
PureLinkCounts sent_before = {0}, heard_before = {0};
bool receiver_restarted = !c->receiver_restart_after, sender_restarted = !c->sender_restart_after;
- unsigned char out[PURE_LINK_DATAGRAM];
+ unsigned char out[PURE_LINK_DATAGRAM_MOST];
while (w.heard < c->records || pure_link_sender_stored(s) < c->records) {
CHECK(w.now < 600000 * MS, "%s: not done after ten minutes (heard %llu of %llu)", c->name,
(unsigned long long)w.heard, (unsigned long long)c->records);