* [dpdk-users] rte_hash_hash in DPDK2.0
@ 2017-02-08 10:55 Bar, Nir
2017-02-08 16:19 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 2+ messages in thread
From: Bar, Nir @ 2017-02-08 10:55 UTC (permalink / raw)
To: users
Hi,
Why rte_has_hash() in DPDK-2.0 isn't multi thread safe?
It only calculates hash.
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-users] rte_hash_hash in DPDK2.0
2017-02-08 10:55 [dpdk-users] rte_hash_hash in DPDK2.0 Bar, Nir
@ 2017-02-08 16:19 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 2+ messages in thread
From: De Lara Guarch, Pablo @ 2017-02-08 16:19 UTC (permalink / raw)
To: Bar, Nir, users
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-08 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 10:55 [dpdk-users] rte_hash_hash in DPDK2.0 Bar, Nir
2017-02-08 16:19 ` De Lara Guarch, Pablo
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).