Repository navigation
Conversation
Replay packet delivery opportunities (PDOs) instead of bandwidth, like the link queue of mahimahi. The head packet uses the bytes of each PDO (counted by L3 length), so a packet can need several PDOs and one PDO can send several packets. Unused bytes are wasted when there is nothing to send. dequeue() returns one packet and keeps the bytes left in the current PDO, so the next call goes on with the same PDO without waiting. PDOs before the next packet's arrival are skipped instead of waking up for each one. Needs the pdo-model feature of netem-trace (stack-rs/netem-trace#29). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If a bug keeps some packet in the cell, the test now fails after 5s instead of waiting forever. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.5.0 includes the pdo-model feature from stack-rs/netem-trace#29, so PdoReplayCell builds without a local patch now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
netem-trace#29 is merged and 0.5.0 is out, thanks @Lethe10137 and @BobAnkh for the reviews! I pushed 88eb4e7, which bumps netem-trace to 0.5.0 (no local patch anymore), so CI should be able to build this now. On my machine the 8 I'm moving this out of draft. The two questions from the description are still open: should bytes be counted with |
|
A packet now uses l3_length() plus the extra length from the BwType of the queue, so it is the L3 length by default (BwType::NetworkLayer), as in the other cells. Add a test with BwType::LinkLayer.
|
Thanks @Lethe10137! I pushed 4a697d2. Now the cell counts each packet as I'll start on part 2 (the config wiring) next. |
This is the first part of #98: a cell that replays heavy PDOs (mahimahi style traces), following the design @Lethe10137 described there. It uses the
pdo-modelfeature and PDO trace types from stack-rs/netem-trace#29, released in netem-trace 0.5.0.What it does:
PdoReplayCelltakes aHeavyPdoTrace((interval since last PDO, bytes)) and a packet queue. No bandwidth anywheredequeue()returns one packet at a time. The bytes left in the current PDO stay in the cell, so the nextdequeue()sends the next packet right away without sleepingload_mahimahi_heavy_pdo_tracerepeats forever by default anywayAQM:is_empty()andis_queue_empty()Not in this PR (next ones):
Things I wasn't sure about:
l3_length()to match mahimahi, not with the queue'sget_packet_size()(which can add 14 B for L2). Should it follow the queue'sBwTypeinstead?How I tested (Ubuntu 24.04 in WSL, stable Rust, with netem-trace 0.5.0):
cells::pdo: bytes carrying over, many small packets in one PDO, wasted bytes after being idle, a mahimahi trace with two lines in the same ms, zero buffer, and a random test (3 seeds) that checks every departure time against a small copy of mahimahi'suse_a_delivery_opportunitylogicreplay()now fails after 5 scargo clippy --all-features --all-targets -- -Dwarningsandcargo fmt --all -- --checkare cleanzero_buffer_bw_replay,test_replay_delay_cell,test_replay_delay_cell_change_state), but they fail the same way on main without this change, so I think it's my WSL setupRefs #98
🤖 Generated with Claude Code