Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IRxSocket media data buffer type should be configurable #426

Open
thirtytwobits opened this issue Feb 1, 2025 · 2 comments
Open

IRxSocket media data buffer type should be configurable #426

thirtytwobits opened this issue Feb 1, 2025 · 2 comments

Comments

@thirtytwobits
Copy link
Contributor

thirtytwobits commented Feb 1, 2025

We currently require receive sockets to return std::unique_ptr<cetl::byte, PmrRawBytesDeleter> payload_ptr which forces the use of a PmrRawBytesDeleter which is incorrect for FreeRTOS zero copy. Instead I need a deleter that invokes FreeRTOS_ReleaseUDPPayloadBuffer.

We could just set the deleter type in libcyphal/config.hpp (see #419). This doesn't support heterogenous socket implementations however. Other ideas are welcome. We should also plan for different media layers that may need an additional data pointer as well; one for the payload data and another that is the key for the buffer in a memory pool (where the two are not the same thing. I'd tell you how FreeRTOS+TCP avoids the need for this additional data but you really don't want to know).

@thirtytwobits thirtytwobits changed the title IRxSocket media data buffer type should be opaque IRxSocket media data buffer type should be configurable Feb 1, 2025
@pavel-kirienko
Copy link
Member

The idea is that you will have your own pmr that invokes FreeRTOS_ReleaseUDPPayloadBuffer. Am I missing something in the problem formulation?

@pavel-kirienko
Copy link
Member

See #352 (comment)

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

No branches or pull requests

2 participants