Add: support for dropping late frames in RxTxApp#1458
Open
DawidWesierski4 wants to merge 9 commits intomainfrom
Open
Add: support for dropping late frames in RxTxApp#1458DawidWesierski4 wants to merge 9 commits intomainfrom
DawidWesierski4 wants to merge 9 commits intomainfrom
Conversation
f0346f2 to
d934735
Compare
eb98c84 to
df8218d
Compare
Replace the reactive st20p_tx_late_frame_drop (called from transport notify_frame_late) with a proactive timestamp check in next_frame. When DROP_WHEN_LATE + USER_PACING are both set, the pipeline now compares frame TAI against PTP wall time before handing a converted frame to transport. Dropped frames fire notify_frame_done and notify_frame_late callbacks, then recycle the slot. Also add drop_when_late JSON flag to RxTxApp configuration.
Add the same proactive timestamp-based drop logic from st20p to all remaining TX pipeline types: - st22p: check ENCODED frames in next_frame - st30p: check READY frames in next_frame - st40p: check READY frames in next_frame Add DROPPED frame state, frame_done_cb_called guard, and set frame status (COMPLETE/DROPPED) before notify_frame_done. Add ST_FRAME_STATUS_DROPPED to enum st_frame_status and st20p_tx_get_drop_count() public API.
Use -to_epoch/pkt_time instead of epochs-next_epochs for the stat_epoch_drop counter and notify_frame_late callback argument in tx_audio_session_sync_pacing.
Set st_frame_status on received frames before notifying the application, consistent with st20p RX: - st22p RX: propagate meta->status to src and dst frames - st30p RX: set COMPLETE (audio frames always arrive whole) - st40p RX: set COMPLETE or CORRUPTED based on seq_discont Add status field to struct st30_frame and struct st40_frame_info. Update st_frame_status doc comment for TX+RX usage.
add unified drop-frame parsing in RxTxApp, allow users to test drop frame functionality.
Degrade the log level of late frame drops from NOTICE to DBG. As the statistics every 10s will show them.
Move the late frame notification callback to avoid returning zeroed epoch time to the caller.
8d69d75 to
2ef73b4
Compare
awilczyns
approved these changes
Mar 12, 2026
| /* time bigger than the assigned epoch time */ | ||
| ST_SESSION_STAT_INC(s, port_user_stats, stat_epoch_mismatch); | ||
| if (s->ops.notify_frame_late) { | ||
| s->ops.notify_frame_late(s->ops.priv, -to_epoch / pkt_time); |
Collaborator
There was a problem hiding this comment.
Did you consider using abs() instead of adding a minus (-) to the negative value?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
commit 4e97bb1 (HEAD -> dropped_v2_debug1, upstream/dropped_v2_debug1)
Author: Wesierski, Dawid dawid.wesierski@intel.com
Date: Mon Mar 9 10:09:30 2026 -0400
commit f4f6a07
Author: Wesierski, Dawid dawid.wesierski@intel.com
Date: Mon Mar 9 09:43:27 2026 -0400
commit 0649e9c
Author: Wesierski, Dawid dawid.wesierski@intel.com
Date: Mon Mar 9 08:36:31 2026 -0400
commit 50ccfa9
Author: Wesierski, Dawid dawid.wesierski@intel.com
Date: Mon Mar 2 06:14:08 2026 -0500