Yay, I issued my first code review for VPP using gerrit for the issue of
this email!

 

https://gerrit.fd.io/r/c/vpp/+/30844

 

The JIRA issue I filed today is at: https://jira.fd.io/browse/VPP-1967

 

Thanks all for replying.

 

Hemant

 

From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of hemant via
lists.fd.io
Sent: Monday, January 18, 2021 8:41 PM
To: hem...@mnkcg.com; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] classifier howto?

 

Please see this PR to fix what I need.  

 

https://github.com/FDio/vpp/pull/33

 

Please review - thanks.  

 

Hemant

 

From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  <vpp-dev@lists.fd.io
<mailto:vpp-dev@lists.fd.io> > On Behalf Of hemant via lists.fd.io
Sent: Monday, January 18, 2021 10:52 AM
To: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> 
Subject: [vpp-dev] classifier howto?

 

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 (#18553): https://lists.fd.io/g/vpp-dev/message/18553
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