Merged
Conversation
- Add udpard_rx_mode_t enum with ordered/unordered/stateless modes - Update udpard_rx_port_new() to accept mode as separate parameter - Remove UDPARD_RX_REORDERING_WINDOW_UNORDERED/STATELESS constants - Update all test call sites and fixtures - Maintain 100% code coverage
There was a problem hiding this comment.
Pull request overview
This PR refactors the RX port configuration to use an explicit udpard_rx_mode_t enum instead of special sentinel reordering window values, and updates the library API, documentation, and tests accordingly. It also adjusts tests to cover invalid mode/window combinations and ignores the reordering window for unordered/stateless modes, plus a small .gitignore tweak.
Changes:
- Introduces
udpard_rx_mode_t(udpard_rx_unordered,udpard_rx_ordered,udpard_rx_stateless) and updatesudpard_rx_port_tandudpard_rx_port_new()to accept an explicit mode and a separatereordering_windowparameter. - Reworks all RX-related tests (intrusive, guards, e2e, and integration) to use the new mode API, ensuring unordered/stateless modes pass a zero reordering window and expand guard coverage for invalid modes and windows.
- Updates documentation to describe the new mode semantics (window ignored in unordered/stateless) and removes the old
UDPARD_RX_REORDERING_WINDOW_*macros; adds.sisyphus/to.gitignore.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libudpard/udpard.h | Defines udpard_rx_mode_t, extends udpard_rx_port_t with a mode field, changes udpard_rx_port_new() signature to take a mode and window, and updates mode-related documentation. |
| libudpard/udpard.c | Implements new udpard_rx_port_new() logic that selects the internal vtable based on udpard_rx_mode_t, ignores reordering_window for unordered/stateless, updates unordered-mode assertions, and adapts the P2P helper to the new API. |
| tests/src/test_intrusive_rx.c | Updates intrusive RX tests to call udpard_rx_port_new() with explicit modes and appropriate windows, and initializes test ports with the new mode/reordering_window fields for coverage of ordered/unordered/stateless behaviors. |
| tests/src/test_intrusive_guards.c | Adjusts RX guard tests to the new API, validating error handling for null ports, bad memory, invalid udpard_rx_mode_t values, and invalid ordered reordering windows, plus a valid stateless configuration. |
| tests/src/test_integration_sockets.cpp | Updates the socket integration fixture to construct RX subject ports in unordered mode with a zero reordering window via the new API. |
| tests/src/test_e2e_responses.cpp | Updates e2e response tests to create topic subscription ports in unordered mode with a zero reordering window. |
| tests/src/test_e2e_reliable_ordered.cpp | Ensures reliable ordered e2e tests construct the receiver topic port in ordered mode with the configured reordering window. |
| tests/src/test_e2e_random.cpp | Refactors random e2e tests to parameterize RX ports by arrays of modes and windows, exercising ordered and unordered configurations via the new API. |
| tests/src/test_e2e_edge.cpp | Extends the RX Fixture to accept mode and reordering_window, adjusts all edge-case tests to pass the correct mode (ordered vs unordered) and window, and updates other unordered uses to pass udpard_rx_unordered with zero window. |
| tests/src/test_e2e_api.cpp | Updates e2e API tests to construct RX ports using the explicit unordered mode and zero reordering window. |
| .gitignore | Adds .sisyphus/ to the ignored paths for local tooling or artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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.