Skip to content

Feature/fabrics/jonas/protocols audio#31

Closed
mlefebvre1 wants to merge 10 commits into
mainfrom
feature/fabrics/jonas/protocols-audio
Closed

Feature/fabrics/jonas/protocols audio#31
mlefebvre1 wants to merge 10 commits into
mainfrom
feature/fabrics/jonas/protocols-audio

Conversation

@mlefebvre1
Copy link
Copy Markdown
Collaborator

*** Do not merge, just for review ***

@mlefebvre1 mlefebvre1 requested a review from jonasohland May 1, 2026 13:53
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Test Results

73 tests  +73   73 ✅ +73   10s ⏱️ +10s
 1 suites + 1    0 💤 ± 0 
 1 files   + 1    0 ❌ ± 0 

Results for commit 93a3b0a. ± Comparison against base commit ecd877e.

♻️ This comment has been updated with latest results.


std::optional<Target::SampleReadResult> RCTarget::readSamples()
{
if (auto res = readNext<QueueReadMode::NonBlocking>(std::chrono::steady_clock::duration::zero()); res)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all of these cases, it should probably be an "invalid state" error instead of just returning nothing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure about this. This change is consistent with the previous behavior where we return null which in the end gets translated to MXL_ERR_NOT_READY . The reason why it's ugly is that with C++20, there's no way to apply a monadic operation (transform) to an std::optional. We would have to wait for C++23 for that: https://en.cppreference.com/cpp/utility/optional/transform

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I seen.
I think we should change the behavior do a check before if the call to readNext can succeed with the desired result. If a target/initiator is configured for grains, trying to read samples should return an error that indicates that this operation is not supported for this type of target/initiator. (And vice versa).
Maybe we should even add an error for this specific case.

Comment thread lib/fabrics/ofi/src/internal/AudioBounceBuffer.hpp Outdated
Comment thread lib/fabrics/ofi/src/internal/AudioBounceBuffer.hpp Outdated
Comment thread lib/fabrics/ofi/src/internal/DataLayout.cpp Outdated
Comment thread lib/fabrics/ofi/src/internal/DataLayout.hpp Outdated
Comment thread lib/fabrics/ofi/src/internal/ProtocolEgressRMA.cpp Outdated
Comment thread lib/fabrics/ofi/src/internal/ProtocolEgressRMA.cpp Outdated
Comment thread lib/fabrics/ofi/src/internal/ProtocolEgressRMA.cpp
Comment thread lib/fabrics/ofi/src/internal/ProtocolEgressRMA.cpp
Comment thread lib/fabrics/ofi/src/internal/ProtocolIngressRMA.hpp Outdated
@mlefebvre1 mlefebvre1 force-pushed the feature/fabrics/jonas/protocols-audio branch 3 times, most recently from 1339c8b to bb59590 Compare May 5, 2026 20:08
mlefebvre1 and others added 10 commits May 6, 2026 09:12
Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
…st creation. Rename DataLayout substypes to Discrete/Continuous instead of Video/Audio. Change some variable declarations to the 'modern' way.

Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
…ed 'count' parameter validations to ensure the user doesn't pass a value that would exceed the size of the bounce buffer entry.

Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
…g audio entry header size of the entrySizeRequired.

Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
…for a given protocol.

Co-authored-by: Michael Lefebvre <michael.lefebvre.31@gmail.com>
Signed-off-by: Michael Lefebvre <michael.lefebvre@riedel.net>
@mlefebvre1 mlefebvre1 force-pushed the feature/fabrics/jonas/protocols-audio branch from 64806b4 to 93a3b0a Compare May 6, 2026 13:12
@mlefebvre1 mlefebvre1 closed this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants