Skip to content

Conversation

@pavel-kirienko
Copy link
Member

ACKs are now indicated via a dedicated flag in the header, and P2P messages are treated verbatim like ordinary topic messages. The metadata required for P2P responses is now managed entirely by Cy (one layer above libxxxards). As a result, the library has been slightly simplified, both at the API level and internally.

Copy link

Copilot AI left a 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 removes the P2P header from the library implementation, treating P2P messages the same as ordinary topic messages. ACKs are now indicated via a dedicated flag in the header rather than through P2P header metadata. The library has been simplified at both the API level and internally, with P2P response metadata now managed entirely by the application layer (Cy) rather than by libudpard.

Changes:

  • Replaced P2P-specific header (24 bytes) with a dedicated acknowledgement flag in the main header
  • Simplified TX feedback structure by removing topic_hash and transfer_id fields
  • Removed P2P-specific types (udpard_rx_port_p2p_t, udpard_rx_transfer_p2p_t, and related vtables)
  • Updated udpard_tx_push_p2p() to remove request_topic_hash and request_transfer_id parameters
  • Changed default UDPARD_USER_CONTEXT_PTR_COUNT from 4 to 2 pointers

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
libudpard/udpard.h Removed P2P-specific types and constants; simplified feedback structure; updated API signatures; made on_collision callback optional
libudpard/udpard.c Replaced P2P header parsing with acknowledgement flag handling; added flag validation; updated ACK serialization; improved assert usage
tests/src/test_intrusive_tx.c Updated meta_t to use flag_reliable and flag_acknowledgement; removed P2P header parameters from API calls
tests/src/test_intrusive_rx.c Removed P2P-specific port types and callbacks; updated ACK handling to use flag; removed test_rx_p2p_fragment_offsets
tests/src/test_intrusive_header.c Renamed flag_ack to flag_reliable in test cases
tests/src/test_intrusive_guards.c Simplified P2P push test calls; removed P2P port creation tests
tests/src/test_e2e_responses.cpp Updated P2P port handling to use regular ports; added is_ack_frame() helper; removed P2P-specific vtable and transfer types
tests/src/test_e2e_reliable_ordered.cpp Simplified ACK port handling; removed feedback assertions for topic_hash and transfer_id
tests/src/test_e2e_random.cpp Changed ACK port from udpard_rx_port_p2p_t to udpard_rx_port_t
tests/src/test_e2e_edge.cpp Removed test_udpard_rx_p2p_malformed_kind; updated P2P push tests to use simplified API
tests/src/test_e2e_api.cpp Updated P2P port handling to use regular port types and callbacks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pavel-kirienko pavel-kirienko merged commit 1a4263a into experimental Jan 31, 2026
19 checks passed
@pavel-kirienko pavel-kirienko deleted the experimental-p2p branch January 31, 2026 17:01
@sonarqubecloud
Copy link

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

Successfully merging this pull request may close these issues.

2 participants