Skip to content

Fix UDP payload pointer calculation: use correct struct size for udp header#96

Open
berdvana wants to merge 2 commits into
Xilinx-CNS:masterfrom
berdvana:fix/udp-payload-iovbase-pointer
Open

Fix UDP payload pointer calculation: use correct struct size for udp header#96
berdvana wants to merge 2 commits into
Xilinx-CNS:masterfrom
berdvana:fix/udp-payload-iovbase-pointer

Conversation

@berdvana

@berdvana berdvana commented Oct 11, 2025

Copy link
Copy Markdown

I get it TCPdirect/Openonload is designed primarily for 64-bit platforms—where pointer size coincidentally matches the 8-byte UDP header, masking the issue—is this the right way to do it ? because protocol handling should be platform-agnostic right ? The code initially subtracted the pointer size (4 bytes on 32-bit or 8 on 64-bit) instead of the struct's fixed size, Fixed by using sizeof(*udp).

@berdvana berdvana requested a review from a team as a code owner October 11, 2025 08:02
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.

1 participant