Hello,
I am trying to compile a program that includes range match key, and I encountered the following error:
"error: Currently in p4c, the table forward_l2_0 cannot perform a range match on key ingress::meta.current as the key does not fit in under 5 PHV nibbles.
Are there constraints on the key size for range matches? Also, is the range matching algorithm in tofino now open source?
According to the message, you defined a table that uses range match kind on a key field that is longer than 20 bits (5 nibbles) and that is not supported by the compiler.
Unfortunately, I am not allowed to answer the rest of the questions in a public forum, since I am not aware of Intel ever publishing the range matching algorithm details. If you have access to ICRP Forum, please ask the question there so that I can provide more information.
It is my hope that sooner or later Intel will lift a lot of these restrictions, but currently this is not the case and your question clearly demonstrates the importance of doing that even (or especially) in light of open-sourcing the SDE.
Unfortunately, I am not allowed to answer the rest of the questions in a public forum, since I am not aware of Intel ever publishing the range matching algorithm details.
Considering much of the Tofino code is now open-source, we can probably use whatever exists in the code as our guideline