I am porting a P4 table key of match type as range to VPP.  I found the VPP
API here:

 

https://github.com/FDio/vpp/blob/5b755e2f9fce239b5280ac1e5e21f835464fa017/sr
c/vnet/ip/ip_source_and_port_range_check.h#L128

 

Incidentally, a range can be converted into tcam (value, mask) pair.  If VPP
is ever interested in simulating a tcam or converting range to tcam pair, my
company has C source code below.  This code was contributed to the p4
compiler repo to convert P4 Ranges used in P4 Parser to tcam entries.

 

https://github.com/hesingh/range-to-tcam-val-mask/blob/master/range-to-tcam.
cpp

 

Hemant

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17510): https://lists.fd.io/g/vpp-dev/message/17510
Mute This Topic: https://lists.fd.io/mt/77080104/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to