We have seen a case where our .p4 code did not build in the IDE because we had too many elements in a header stack.
What other limitations are there:
- maximum number of parse states?
- maximum number of tables?
- maximum number of control functions?
- maximum number of header types?
- maximum number of declared headers?
- maximum field width?
- maximum bytes that can be matched at once?
Is there a document that discloses these limits? I can build until failure but I wondered if there is a better way. I have a configurable application that uses extreme amounts of all of these things, but in particular, it is best to configure it to use the maximum number of tables and control functions, whatever those numbers are, for the given device I deploy it to.
Thank you, this is very helpful!
My use case is a P4 program that virtually hosts other P4 programs, like a hypervisor. So the more resources my hypervisor has, the more numbers and types of programs it can host. To implement a dynamically programmable parser, I have a header stack of say 100 elements where each element is a generic header type with a single, one byte-wide field. I extract a default number of bytes (say 20) and then in the ingress pipeline I have some tables that look at what has been extracted. Potentially, this could result in an action that includes the resubmit primitive, after first setting a metadata field with the number of bytes that should be extracted. Once the packet is resubmitted, this field is read by the parser, triggering the branches among parse states that result in extracting the correct number of bytes. I know this approach sounds convoluted but it arose at a time when parser exceptions were not available - today I will look at simply extracting bytes until a parser exception is triggered.--
You received this message because you are subscribed to the Google Groups "open-nfp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-nfp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-nfp/CAA1sxtwDJu3z_aJp4PLfBgdZde_wuSQeTV39eOhbO1FM61M4uQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.