Implementing Checksum for IPv4 Headers with Options in P4 without functions

9 views
Skip to first unread message

Sandman

unread,
Oct 10, 2023, 6:19:55 PM10/10/23
to p4-design
Hi all,

I am new to this forum and also new to P4 coding in general. I have been really struggling with a specific lab problem that I have been trying to work out.

The problem is that I have been trying to implement a simple p4 code that would implement a checksum function for the IPv4 headers (with options) from scratch without using any extra functions in P4. But, as of now, I have not been able to make any progress for 2 months. Most of the online forums talk about coding in the v1model switch architecture but I am trying to implement the checksum functionality in xsa.p4 architecture. I know that there is a Checksum extern but I am not allowed to use it. I need to implement the algorithm from scratch. Also, it has been really difficult for me since there is no option of using loops in the language as well. I have scrambled around a lot to find anything that could help me with it but, to no avail. I am in desperate need of help from somebody who is experienced.

Could you anybody please kindly help me with it? I really, really need your help especially since I am new to this language and it has been really difficult for me to navigate through the language's capabilities and limitations.

Hoping for your kind consideration. Thanks in advance.

Regards,
Sandeep Bal
Reply all
Reply to author
Forward
0 new messages