Flagging two latent issues that are harmless today (burst_frames=1, stop-and-wait) but activate as soon as K>1 burst framing is enabled. Raising now while the burst machinery is being reworked so they are on the radar before the window opens.
B — Implicit ACK zeroes the whole tx window
arq_fsm.c lines 1672 and 1720 — both implicit-ACK paths (RX_DATA and RX_MODE_REQ in WAIT_ACK) unconditionally zero tx_window_count:
sess->tx_window_count = 0; /* implicit ACK covers the window */
At K=1 this is correct. At K>1, the IRS sending DATA (or MODE_REQ) is an implicit ACK for one specific frame — not for the entire burst. The ISS discards frames 2..K that the IRS has not yet received, and they are never retransmitted.
PR #103 added ARQ_FLAG_CTRL_ACKSEQ to the MODE_ACK response, but the RX_DATA implicit ACK path at line 1672 does not use ack_seq and still zeroes the full window.
Fix direction: use ev->ack_seq to determine how many frames the IRS has actually received and slide the window accordingly, matching the explicit-ACK path at lines 1456–1501.
C — HARQ Chase combining accumulator is not keyed per sequence number
modem/freedv/freedv_700.c — f->harq_llr is a single per-FreeDV-instance accumulator. modem.c documents the assumption explicitly (lines 1040–1043):
/* Every ARQ mode is burst_frames==1 (one DATA frame per preamble), so each
* retransmission the IRS sees is a fresh, bit-identical copy of the single
* in-flight frame */
At K>1, multiple frames with different sequence numbers are decoded through the same FreeDV instance. If frame N fails and frame N+1 also fails, the accumulator gains N+1's LLRs mixed with N's. When frame N is retransmitted, the fallback combine uses this corrupted sum.
Fix direction: key the accumulator to the ARQ sequence number; reset on seq change. Alternatively, disable Chase combining for K>1 until per-seq keying is in place.
Both are safe to ignore while burst_frames=1. Issue B in particular becomes a silent data-loss path the moment K>1 is activated.
Flagging two latent issues that are harmless today (
burst_frames=1, stop-and-wait) but activate as soon as K>1 burst framing is enabled. Raising now while the burst machinery is being reworked so they are on the radar before the window opens.B — Implicit ACK zeroes the whole tx window
arq_fsm.clines 1672 and 1720 — both implicit-ACK paths (RX_DATAandRX_MODE_REQinWAIT_ACK) unconditionally zerotx_window_count:At K=1 this is correct. At K>1, the IRS sending DATA (or MODE_REQ) is an implicit ACK for one specific frame — not for the entire burst. The ISS discards frames 2..K that the IRS has not yet received, and they are never retransmitted.
PR #103 added
ARQ_FLAG_CTRL_ACKSEQto theMODE_ACKresponse, but theRX_DATAimplicit ACK path at line 1672 does not useack_seqand still zeroes the full window.Fix direction: use
ev->ack_seqto determine how many frames the IRS has actually received and slide the window accordingly, matching the explicit-ACK path at lines 1456–1501.C — HARQ Chase combining accumulator is not keyed per sequence number
modem/freedv/freedv_700.c—f->harq_llris a single per-FreeDV-instance accumulator.modem.cdocuments the assumption explicitly (lines 1040–1043):At K>1, multiple frames with different sequence numbers are decoded through the same FreeDV instance. If frame N fails and frame N+1 also fails, the accumulator gains N+1's LLRs mixed with N's. When frame N is retransmitted, the fallback combine uses this corrupted sum.
Fix direction: key the accumulator to the ARQ sequence number; reset on seq change. Alternatively, disable Chase combining for K>1 until per-seq keying is in place.
Both are safe to ignore while
burst_frames=1. Issue B in particular becomes a silent data-loss path the moment K>1 is activated.