From c49be83d7fdaed8f772595dcaa95073154ff7371 Mon Sep 17 00:00:00 2001 From: darwvin-dev Date: Tue, 13 Oct 2026 12:07:27 +0330 Subject: [PATCH] MT#55283 initialise kernel SSRC loss tracker The kernel tracks lost packets per SSRC through the `lost_bits` window in the shared ssrc_stats, which was left zeroed, while userspace starts its own window as all-received. As userspace already advances `ext_seq` before a stream is kernelised, the kernel then counted up to 32 packets it did receive as lost, both per SSRC and in the interface and global packets_lost counters. Start the shared window as all-received too. Change-Id: I3d6cd85a1b764a6bb3296daf7489091767449554 Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 3b7343282681b57e6bb0dfa7e87c024beb60d6d9) --- daemon/ssrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/ssrc.c b/daemon/ssrc.c index 1b37158dc..7c20c149d 100644 --- a/daemon/ssrc.c +++ b/daemon/ssrc.c @@ -39,6 +39,7 @@ static struct ssrc_entry *create_ssrc_entry_call(void *uptr) { ent->ssrc_map_out = ssl_random(); atomic64_set_na(&ent->last_sample, rtpe_now); ent->stats = bufferpool_alloc0(shm_bufferpool, sizeof(*ent->stats)); + ent->stats->lost_bits = -1; // kernel tracker, so it doesn't count its first 32 packets as lost ent->lost_bits = -1; return &ent->h; }