From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Bar, Nir" <Nir.Bar@verint.com>, "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] rte_hash_hash in DPDK2.0
Date: Wed, 8 Feb 2017 16:19:54 +0000 [thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D897476D6A80@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <33C55E1E4B8F6F44A79984DB4C8FD76DF35E5A54@TLVMBX2.verint.corp.verintsystems.com>
Hi Nir,
> -----Original Message-----
> From: users [mailto:users-bounces@dpdk.org] On Behalf Of Bar, Nir
> Sent: Wednesday, February 08, 2017 10:55 AM
> To: users@dpdk.org
> Subject: [dpdk-users] rte_hash_hash in DPDK2.0
>
> Hi,
>
> Why rte_has_hash() in DPDK-2.0 isn't multi thread safe?
>
> It only calculates hash.
>
Rte_hash_hash is multi-thread safe, but not multi-process safe, as it uses a function pointer to get the actual hash function.
Thanks,
Pablo
> Thanks,
> Nir
>
>
> **
> * Calc a hash value by key. This operation is not multi-process safe.
> *
> * @param h
> * Hash table to look in.
> * @param key
> * Key to find.
> * @return
> * - hash value
> */
> static inline hash_sig_t
> rte_hash_hash(const struct rte_hash *h, const void *key)
> {
> /* calc hash result by key */
> return h->hash_func(key, h->key_len, h->hash_func_init_val);
> }
>
> --
> This electronic message may contain proprietary and confidential
> information of Verint Systems Inc., its affiliates and/or subsidiaries.
> The information is intended to be for the use of the individual(s) or
> entity(ies) named above. If you are not the intended recipient (or
> authorized to receive this e-mail for the intended recipient), you may not
> use, copy, disclose or distribute to anyone this message or any information
> contained in this message. If you have received this electronic message in
> error, please notify us by replying to this e-mail.
prev parent reply other threads:[~2017-02-08 16:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 10:55 Bar, Nir
2017-02-08 16:19 ` De Lara Guarch, Pablo [this message]
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=E115CCD9D858EF4F90C690B0DCB4D897476D6A80@IRSMSX108.ger.corp.intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=Nir.Bar@verint.com \
--cc=users@dpdk.org \
/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).