[dpdk-users] rte_hash_hash in DPDK2.0
De Lara Guarch, Pablo
pablo.de.lara.guarch at intel.com
Wed Feb 8 17:19:54 CET 2017
> -----Original Message-----
> From: users [mailto:users-bounces at dpdk.org] On Behalf Of Bar, Nir
> Sent: Wednesday, February 08, 2017 10:55 AM
> To: users at dpdk.org
> Subject: [dpdk-users] rte_hash_hash in DPDK2.0
> 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.
> * 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.
More information about the users