I am used to the bihash's easy to understand key-value pair API to program
an entry for table lookup using the hash.

 

https://github.com/FDio/vpp/blob/master/src/vppinfra/bihash_48_8.h#L39

 

The value in the struct is a u64.

 

To see how I program a classifier entry for use by the data plane, I looked
at the classifier entry data structure:

 

https://github.com/FDio/vpp/blob/master/src/vnet/classify/vnet_classify.h#L6
6

 

The data structure uses a "u32x4 key[0];" key, but where is the value?  I am
used to seeing a key and value in an entry.  

 

Is "u32 opaque_index" the value?  

If yes, why does bihash use a "u64" for value but the classifier uses a u32?

If the classifier table is hit, my next_node needs the "value" associated
with the key that incurred the table hit.  After all, for bihash, e.g.,
clib_bihash_search_48_8() API returns an explicit value. 

 

I plan to use the API in vnet_classify_add_del_session() to program ip4 and
ip6 src and dst address prefix matching.

 

Thanks,

 

Hemant

 

 

 

 

 

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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18536): https://lists.fd.io/g/vpp-dev/message/18536
Mute This Topic: https://lists.fd.io/mt/79925983/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to