No, a u64 suffices. See how the u64 works with a bihash for any value, not 
just pkt_filter4_0_value, in the code example given below.



struct pkt_filter4_0_value val = {}, *value;

  val.action = permit4;

  val.u.permit4.abits = 130;

  val.u.permit4.ig_strip = 0;

  val.u.permit4.outer_desc = 1;

  val.u.permit4.teid = 5241;

  val.u.permit4.ip = 0x03030302;

  val.u.permit4.src_ip = 0x03030301;

  val.u.permit4.dstPort = 2152;

  val.u.permit4.filt_dir = 1;

  val.u.permit4.reflec_qos = 0;



  value = malloc(sizeof(val));

  memcpy(value, &val, sizeof(val));

  kv.value = (u64) value;

  clib_bihash_add_del_48_8 (&ump->hash_table_pkt_filter4_0, &kv, 1);



Hemant



-----Original Message-----
From: Benoit Ganne (bganne) <bga...@cisco.com>
Sent: Wednesday, January 20, 2021 8:13 AM
To: hem...@mnkcg.com; ne...@graphiant.com; ayour...@gmail.com
Cc: vpp-dev@lists.fd.io
Subject: RE: [vpp-dev] classifier howto?



> A github link is included in the JIRA issue to articulate the use case,

>  <https://jira.fd.io/browse/VPP-1967> https://jira.fd.io/browse/VPP-1967

> The github link has a value for a classifier entry shown:

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

> The value is a value used in a 5G UPF.



Is the 64-bits value you refer to the "struct pkt_filter4_0_value"? It looks 
much bigger than 64-bits to me...



Best

ben

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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18566): https://lists.fd.io/g/vpp-dev/message/18566
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