Add M10.6c probe-marker prediction traces and close M10.6
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 12m33s
Foundation / checks (network) (push) Canceled after 10m23s
Foundation / checks (client) (push) Canceled after 12m33s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 12m33s
Foundation / checks (network) (push) Canceled after 10m23s
Foundation / checks (client) (push) Canceled after 12m33s
evo-motion-trace drives the engineering client's own session code through the owned impairment relay against a real-time 50 ms loopback region: exact without loss, 94-99 % exact at 60-200 ms RTT with 2-5 % loss, every profile converging after stopping, restart resync about 2-3 s (docs/networking/M10_PREDICTION_TRACES.md). The CTest motion-trace-smoke checks convergence, bounds and a majority of exact predictions. The relay lets a new sender take over after the current client has been silent for 1 s (reconnects); the client counts refusal receipts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -97,6 +97,7 @@ struct UdpRelay::Impl {
|
||||
std::uint16_t port{};
|
||||
sockaddr_in target{};
|
||||
std::optional<sockaddr_in> client;
|
||||
Clock::time_point client_seen{};
|
||||
mutable std::mutex mutex;
|
||||
Impairment up, down;
|
||||
RelayCounters counters;
|
||||
@@ -169,11 +170,17 @@ struct UdpRelay::Impl {
|
||||
if (n <= 0)
|
||||
continue;
|
||||
const std::lock_guard lock{mutex};
|
||||
if (side == 0 && !client)
|
||||
client = from; // The first client owns the relay.
|
||||
if (side == 0 && (from.sin_port != client->sin_port ||
|
||||
from.sin_addr.s_addr != client->sin_addr.s_addr))
|
||||
continue;
|
||||
// One client at a time: the first owns the relay; another sender takes over
|
||||
// only after the owner has been silent for a second (a reconnect, M10.6c).
|
||||
const bool owner = client && from.sin_port == client->sin_port &&
|
||||
from.sin_addr.s_addr == client->sin_addr.s_addr;
|
||||
if (side == 0 && !owner) {
|
||||
if (client && now - client_seen < std::chrono::seconds{1})
|
||||
continue;
|
||||
client = from;
|
||||
}
|
||||
if (side == 0)
|
||||
client_seen = now;
|
||||
admit(side == 0, {buffer.data(), buffer.data() + n}, now);
|
||||
}
|
||||
std::vector<Pending> ready;
|
||||
|
||||
Reference in New Issue
Block a user