From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Yeddula, Avinash" <ayeddula@ciena.com>,
"dev@dpdk.org" <dev@dpdk.org>, "Bly, Mike" <mbly@ciena.com>
Subject: Re: [dpdk-dev] DPDK hash function related question
Date: Tue, 22 Sep 2015 10:05:10 +0000 [thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126478D64A1@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <A1E50D8AD6310E47A6C10F075AEDC0220379E2BFE5@ONWVEXCHMB01.ciena.com>
Hi Avinash,
Yes, the hash function is configurable.
Are you using a DPDK release older than 2.1? In DPDK we moved away from test_hash to CRC-based hashes. Please take a look at DPDK release 2.1 examples/ip_pipeline application: in pipeline_flow_classification_be.c, we use CRC-based hash functions defined in file hash_func.h from the same folder.
Regards,
Cristian
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yeddula, Avinash
> Sent: Tuesday, September 22, 2015 1:34 AM
> To: dev@dpdk.org; Bly, Mike
> Subject: [dpdk-dev] DPDK hash function related question
>
> Hello All,
>
> I'm DPDK extensible bucket hash in the rte_table library of packet
> framework. My question is related to the actual hash function that computes
> the hash signature.
>
> All the available examples have initialized it to test_hash. I do not see any
> hash function available in rte_table library , that computes the actual
> signature
>
>
>
> struct rte_table_hash_ext_params hash_table_params = {
>
> .key_size = TABLE_ENTRY_KEY_SIZE,
>
> .n_keys = TABLE_MAX_SIZE,
>
> .n_buckets = TABLE_MAX_BUCKET_COUNT,
>
> .n_buckets_ext = TABLE_MAX_EXT_BUCKET_COUNT,
>
> .f_hash = test_hash,
>
> .seed = 0,
>
> .signature_offset = 0;
>
> .key_offset = __builtin_offsetof(struct metadata_t, tbl_key),
>
> };
>
>
>
> So, I wanted to use hash functions from DPDK rte_hash library. This is what
> I'm doing and looking at the code this looks ok to me.
>
> I'm at least a week or 2 away from testing this part of the code. I wanted to
> confirm that, there is no fundamental flaw in using the DPDK rte_hash library
> and rte_table library like this. Could someone confirm this please ?
>
>
>
> #define DEFAULT_HASH_FUNC rte_hash_crc
>
>
>
> struct rte_table_hash_ext_params hash_table_params = {
>
> .key_size = TABLE_ENTRY_KEY_SIZE,
>
> .n_keys = TABLE_MAX_SIZE,
>
> .n_buckets = TABLE_MAX_BUCKET_COUNT,
>
> .n_buckets_ext = TABLE_MAX_EXT_BUCKET_COUNT,
>
> .f_hash = DEFAULT_HASH_FUNC ,
>
> .seed = 0,
>
> .signature_offset = 0;
>
> .key_offset = __builtin_offsetof(struct metadata_t, tbl_key),
>
> };
>
>
>
> Thanks
>
> -Avinash
>
next prev parent reply other threads:[~2015-09-22 10:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 22:34 Yeddula, Avinash
2015-09-22 10:05 ` Dumitrescu, Cristian [this message]
2015-09-22 13:40 ` Thomas Monjalon
2015-09-23 12:47 ` Dumitrescu, Cristian
2015-10-12 17:03 ` Yeddula, Avinash
2015-10-13 8:05 ` De Lara Guarch, Pablo
2015-10-13 11:44 ` Dumitrescu, Cristian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EB4FA525960D640B5BDFFD6A3D89126478D64A1@IRSMSX108.ger.corp.intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=ayeddula@ciena.com \
--cc=dev@dpdk.org \
--cc=mbly@ciena.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).