-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement the RX pipeline #43
Conversation
…slightly refactor things to reduce copypasta
👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing staggering in my review but a few points I'd like to discuss.
…r to value semantics #sonar
/// required context to compute the size, or if the memory resource implementation does not require deallocation size. | ||
/// | ||
/// The head of the fragment list is passed by value so it is not freed. This is in line with the UdpardRxTransfer | ||
/// design, where the head is stored by value to reduce indirection in small transfers. We call it Scott's Head. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only style feedback at this point.
Kudos, SonarCloud Quality Gate passed! 0 Bugs 92.2% Coverage The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Implement the common parts of the RX pipeline. At this point, about 90% of the work is done. All that is left is to add the basic public API wrappers for subscriptions and RPC-services. For details about the implementation of the RX pipeline refer to the line that says "Internally, the RX pipeline is arranged as follows".
Slightly refactor the code added earlier to uphold orthogonality and avoid unnecessary duplication.
Trivial renamings to keep names shorter, e.g.:
UdpardConstPayload
->UdpardPayload
(const implied by default; there's alsoUdpardMutablePayload
)UdpardPayloadFragmentHandle
->UdpardFragment
Establish an internal convention that functions named "Destroy" deallocate the passed memory while "Free" only deallocate the memory of the associated resources. This is not API-visible.
Remove the
port_id
field fromUdpardRxPort
because it is not needed.After this is merged, the remaining task is to simply implement the public RX pipeline functions on top of:
rxPortInit
rxPortAcceptFrame
rxPortFree
The test coverage is supposed to be full but llvm-cov slightly misreports it.