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

UDP Media Layer send method's design is incorrect #432

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

UDP Media Layer send method's design is incorrect #432

thirtytwobits opened this issue Feb 2, 2025 · 1 comment

Comments

@thirtytwobits
Copy link
Contributor

thirtytwobits commented Feb 2, 2025

The current media layer abstraction calls "send" on a socket with a span of spans to transmit. For embedded systems this is difficult to handle as the platform's send method may return an out-of-resources error which cannot be cleared until/unless the callstack unwinds and a yield point is reached to allow the scheduler run the network driver.

While we currently only ever send a single span in this span-of-spans, the interface doesn't let the developer know about this behavioural contract. The implementer is left to try to handle the type of complex timing and resource management issues libcyphal is meant to alleviate.

We should simply change this to always have a single fragment in the method.

@pavel-kirienko
Copy link
Member

The current media layer abstraction calls "send" on a socket with a span of spans to transmit. For embedded systems this is difficult to handle as the platform's send method may return an out-of-resources error which cannot be cleared until/unless the callstack unwinds and a yield point is reached to allow the scheduler run the network driver.

How is this different for the case when there is only one span? All spans belong to the same UDP datagram / CAN frame / whatever else transport-specific entity there is, so they either go out together, or they are dropped together.

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