Repository navigation
Fix latency issue with rl pacing - #1649
Merged
Merged
Conversation
Sakoram
force-pushed
the
fix-latency-issue-with-rl-pacing
branch
from
July 16, 2026 11:31
02a56af to
9b04ad5
Compare
Sakoram
force-pushed
the
fix-latency-issue-with-rl-pacing
branch
from
July 23, 2026 14:10
9b04ad5 to
9831aaf
Compare
Sakoram
force-pushed
the
Fix-complaince-checks
branch
2 times, most recently
from
July 28, 2026 14:17
dcfa843 to
617c0b6
Compare
Sakoram
force-pushed
the
fix-latency-issue-with-rl-pacing
branch
from
July 29, 2026 09:21
9831aaf to
6c20f67
Compare
Sakoram
force-pushed
the
Fix-complaince-checks
branch
5 times, most recently
from
July 31, 2026 08:15
257fe07 to
b67b50d
Compare
Sakoram
force-pushed
the
fix-latency-issue-with-rl-pacing
branch
from
July 31, 2026 10:57
6c20f67 to
db1e27f
Compare
Sakoram
force-pushed
the
fix-latency-issue-with-rl-pacing
branch
2 times, most recently
from
August 5, 2026 13:46
dc4e56b to
ce013ef
Compare
Sakoram
marked this pull request as ready for review
August 5, 2026 13:47
Sakoram
requested review from
DawidWesierski4,
awilczyns,
moleksy and
soopel
as code owners
August 5, 2026 13:47
DawidWesierski4
left a comment
Collaborator
There was a problem hiding this comment.
Gonna do another PR for now this all
Hold the first content packet until its target TSC and derive default gates from the same media-clock instant as the RTP timestamp. Preserve exact-user TAI requests and cover ST20/ST40 timing boundaries. Signed-off-by: Kasiewicz, Marek <marek.kasiewicz@intel.com>
Release held mbufs on both ports before replacing shared pools while preserving sibling queue recovery requests. Cover repeated cleanup, simultaneous requests, and partial-burst ownership. Signed-off-by: Kasiewicz, Marek <marek.kasiewicz@intel.com>
Check every default, user, exact, jittered, and interlaced frame against a hardware-tested 300 us regression ceiling. Keep RTP timing and frame-count checks strict without percentage outlier state. Signed-off-by: Kasiewicz, Marek <marek.kasiewicz@intel.com>
Run build and test tools with bounded decoded output and checkout-local MTL and DPDK libraries. Keep gtest routing shell-free and report actionable NoCtx assertion failures. Signed-off-by: Kasiewicz, Marek <marek.kasiewicz@intel.com>
DawidWesierski4
force-pushed
the
fix-latency-issue-with-rl-pacing
branch
from
August 19, 2026 08:59
ce013ef to
1f26713
Compare
Sakoram
added a commit
that referenced
this pull request
Aug 21, 2026
Review feedback on #1649 from DawidWesierski4, plus two defects found while verifying it. st_muldiv_u64_round_closest() was exported but has no caller outside st_fmt.c -- neither the library nor the unit tests, which reach the clock math through the public st10_* API. Made it static again and dropped it from st_fmt.h. st_tai_round_to_media_clk_ns() stays non-static: it is called from both st_tx_video_session.c and st_tx_ancillary_session.c. st_tai_round_to_media_clk_ns() returned 0 for an invalid sampling rate. As a TAI that is unconditionally in the past, so time_to_tx_ns collapses to 0 and the frame goes out at line rate. Degrade to a no-op snap instead. Hoisted the duplicated "exact user pacing was requested AND a timestamp was actually supplied" test into a named bool in both sync_pacing paths. The condition itself is unchanged: with EXACT_USER_PACING set but no timestamp supplied, start_time_tai comes from the epoch, the same source as the no-flag path, and still needs the media-clock snap. Gating on the flag alone would skip it, which the new test pins. Documented why tv_uinit() releases software-held mbufs before tv_uinit_hw(): the latter frees and clears s->pad[], after which the pad references retained by failed bursts can no longer be given back and leak out of the per-interface tx_mbuf_pool. Freeing extbuf chain mbufs early is not a use-after-free because sh_info counts every live chain mbuf, NIC-owned ones included, so tv_frame_free_cb() cannot fire while any packet of that frame is still in a TX descriptor. Updated the knowledge base, which described the previous ordering as load-bearing. Also noted the teardown tv_mempool_free() as deliberately best-effort, hoisted a loop-invariant NULL check out of the pad release loop, and fixed a struct rte_mbuf* being assigned false instead of NULL. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Kasiewicz, Marek <marek.kasiewicz@intel.com>
Review feedback on #1649 from DawidWesierski4, plus two defects found while verifying it. st_muldiv_u64_round_closest() was exported but has no caller outside st_fmt.c -- neither the library nor the unit tests, which reach the clock math through the public st10_* API. Made it static again and dropped it from st_fmt.h. st_tai_round_to_media_clk_ns() stays non-static: it is called from both st_tx_video_session.c and st_tx_ancillary_session.c. st_tai_round_to_media_clk_ns() returned 0 for an invalid sampling rate. As a TAI that is unconditionally in the past, so time_to_tx_ns collapses to 0 and the frame goes out at line rate. Degrade to a no-op snap instead. Hoisted the duplicated "exact user pacing was requested AND a timestamp was actually supplied" test into a named bool in both sync_pacing paths. The condition itself is unchanged: with EXACT_USER_PACING set but no timestamp supplied, start_time_tai comes from the epoch, the same source as the no-flag path, and still needs the media-clock snap. Gating on the flag alone would skip it, which the new test pins. Documented why tv_uinit() releases software-held mbufs before tv_uinit_hw(): the latter frees and clears s->pad[], after which the pad references retained by failed bursts can no longer be given back and leak out of the per-interface tx_mbuf_pool. Freeing extbuf chain mbufs early is not a use-after-free because sh_info counts every live chain mbuf, NIC-owned ones included, so tv_frame_free_cb() cannot fire while any packet of that frame is still in a TX descriptor. Updated the knowledge base, which described the previous ordering as load-bearing. Also noted the teardown tv_mempool_free() as deliberately best-effort, hoisted a loop-invariant NULL check out of the pad release loop, and fixed a struct rte_mbuf* being assigned false instead of NULL. Signed-off-by: Kasiewicz, Marek <marek.kasiewicz@intel.com>
st20_tx_queue_fatal_error() now refuses to replace a session's pools when tv_mempool_free() reports one is still in use, but nothing exercised that path -- the existing transmitter tests only reach the extracted cleanup helper, never the recovery entry point or the pool release it gates on. mt_mempool_free() returns 0 even when it declines to free an in-use pool, so tv_mempool_free() has to detect that itself and keep the pointer. Pinning both halves of the ownership split: an owned pool is freed and cleared, an owned pool with an outstanding mbuf reports busy and stays reachable, returning the mbuf makes it freeable again, and a pool the session only borrows (tx_mono_pool, mbuf_mempool_reuse_rx) is cleared but left alive for whoever else shares it. Signed-off-by: Kasiewicz, Marek <marek.kasiewicz@intel.com>
Sakoram
force-pushed
the
fix-latency-issue-with-rl-pacing
branch
from
August 21, 2026 08:47
168f31a to
24990a2
Compare
DawidWesierski4
approved these changes
Aug 24, 2026
Sakoram
enabled auto-merge (rebase)
August 25, 2026 07:07
awilczyns
approved these changes
Aug 25, 2026
Sakoram
added a commit
that referenced
this pull request
Aug 25, 2026
Review feedback on #1649 from DawidWesierski4, plus two defects found while verifying it. st_muldiv_u64_round_closest() was exported but has no caller outside st_fmt.c -- neither the library nor the unit tests, which reach the clock math through the public st10_* API. Made it static again and dropped it from st_fmt.h. st_tai_round_to_media_clk_ns() stays non-static: it is called from both st_tx_video_session.c and st_tx_ancillary_session.c. st_tai_round_to_media_clk_ns() returned 0 for an invalid sampling rate. As a TAI that is unconditionally in the past, so time_to_tx_ns collapses to 0 and the frame goes out at line rate. Degrade to a no-op snap instead. Hoisted the duplicated "exact user pacing was requested AND a timestamp was actually supplied" test into a named bool in both sync_pacing paths. The condition itself is unchanged: with EXACT_USER_PACING set but no timestamp supplied, start_time_tai comes from the epoch, the same source as the no-flag path, and still needs the media-clock snap. Gating on the flag alone would skip it, which the new test pins. Documented why tv_uinit() releases software-held mbufs before tv_uinit_hw(): the latter frees and clears s->pad[], after which the pad references retained by failed bursts can no longer be given back and leak out of the per-interface tx_mbuf_pool. Freeing extbuf chain mbufs early is not a use-after-free because sh_info counts every live chain mbuf, NIC-owned ones included, so tv_frame_free_cb() cannot fire while any packet of that frame is still in a TX descriptor. Updated the knowledge base, which described the previous ordering as load-bearing. Also noted the teardown tv_mempool_free() as deliberately best-effort, hoisted a loop-invariant NULL check out of the pad release loop, and fixed a struct rte_mbuf* being assigned false instead of NULL. Signed-off-by: Kasiewicz, Marek <marek.kasiewicz@intel.com>
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.
No description provided.