You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on integrating the VitisNetP4 IP into the OpenNIC design using the XSA architecture. As part of this process, I need to implement checksum offloading in P4.
The IPv4 checksum is working correctly since it does not require access to the packet payload. However, when attempting to compute the checksum for TCP/UDP packets, which require payload access, I am unable to extract the necessary data.
Could you please guide me on how to extract the packet payload using P4 in the XSA architecture? Additionally, if you have any example code related to this, I would appreciate it.
The text was updated successfully, but these errors were encountered:
@thomascalvert-xlnx Is this something you know about, or can forward to someone who does?
It is not clear to me whether this issue has anything to do with published code in the p4c repo, or is purely related to implementation of an architecture that is not in this repo at all.
Usually the TCP checksum is calculated by differential over the header, without looking at the payload -- compute the checksum over the incoming headers (assuming the checksum there is correct) and subtracting it from the checksum over the outgoing headers. This should give an outgoing packet with a correct checksum iff the checksum on the incoming packet was correct.
This is a general approach used on P4 for most architectures, not specific to XSA or any other specific architecture.
@vijayaKesavan19 according to the official documentation, VitisNetP4 supports the standard Checksum and InternetChecksum externs but these can't be used for checksumming the payload:
This extern [...] is primarily intended for IPv4 checksum calculations. It can also be used for UDP checksum updates, but not full UDP checksum calculations as the calculation over the packet payload is not supported.
In any case, this p4c repository does not support XSA. Is your project in collaboration with a team from AMD/Xilinx? It may be worth contacting them to request a roadmap item. Alternatively you could look to implement a custom extern or augment the existing ones to allow checksumming over the payload.
@ChrisDodd the incremental strategy won't work in the case of a NIC which is expected to offload the full checksum computation from the host (assuming this is indeed the goal here).
Hi,
I am working on integrating the VitisNetP4 IP into the OpenNIC design using the XSA architecture. As part of this process, I need to implement checksum offloading in P4.
The IPv4 checksum is working correctly since it does not require access to the packet payload. However, when attempting to compute the checksum for TCP/UDP packets, which require payload access, I am unable to extract the necessary data.
Could you please guide me on how to extract the packet payload using P4 in the XSA architecture? Additionally, if you have any example code related to this, I would appreciate it.
The text was updated successfully, but these errors were encountered: