-
Notifications
You must be signed in to change notification settings - Fork 10
Experimental unordered #69
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|



No description provided.