doc: fix rte_hash_hash comment for ambiguity
PATCH 1/1 doc: fix rte_hash_hash comment for ambiguity
rte_hash_hash is multi-thread safe but not multi-process safe because of the use of function pointers. Previous document and comment says the other way around. This commit fixes the issue.
--- doc/guides/prog_guide/multi_proc_support.rst | 2 +- lib/librte_hash/rte_hash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
doc/guides/prog_guide/multi_proc_support.rst +1 -1
@@ -176,7 +176,7 @@ Some of these are documented below: * The use of function pointers between multiple processes running based of different compiled binaries is not supported, since the location of a given function in one process may be different to its location in a second. - This prevents the librte_hash library from behaving properly as in a multi-threaded instance, + This prevents the librte_hash library from behaving properly as in a multi-process instance, since it uses a pointer to the hash function internally. To work around this issue, it is recommended that multi-process applications perform the hash calculations by directly calling
lib/librte_hash/rte_hash.h +1 -1
@@ -463,7 +463,7 @@ rte_hash_lookup_with_hash(const struct rte_hash *h,/** * Calc a hash value by key. -* This operation is not multi-thread safe. +* This operation is not multi-process safe. * * @param h * Hash table to look in.
Signature · 1 line
2.7.4
Quoted 49 lines · Yipeng Wang
rte_hash_hashis multi-thread safe but not multi-process safe because of the use of function pointers. Previous document and comment says the other way around. This commit fixes the issue.Fixes fc1f2750a3ec ("doc: programmers guide")Fixes 48a399119619 ("hash: replace with cuckoo hash implementation")Signed-off-by Yipeng Wang <[email protected]>Suggested-by Pablo de Lara <[email protected]>Reported-by Andrey Nikolaev <[email protected]>---
doc/guides/prog_guide/multi_proc_support.rst| 2 +-lib/librte_hash/rte_hash.h| 2 +-2 files changed, 2 insertions(+), 2 deletions(-)doc/guides/prog_guide/multi_proc_support.rst +1
-1@@ -176,7 +176,7 @@ Some of these are documented below: * The use of function pointers between multiple processes running based of different compiled binaries is not supported, since the location of a given function in one process may be different to its location in a second. - This prevents the librte_hash library from behaving properly as in a multi-threaded instance, + This prevents the librte_hash library from behaving properly as in a multi-process instance, since it uses a pointer to the hash function internally.To work around this issue, it is recommended that multi-process applications perform the hash calculations by directly calling
lib/librte_hash/rte_hash.h +1
-1@@ -463,7 +463,7 @@ rte_hash_lookup_with_hash(const struct rte_hash *h,/** * Calc a hash value by key. -* This operation is not multi-thread safe. +* This operation is not multi-process safe. * * @param h * Hash table to look in. Signature · 1 line
2.7.4
Quoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yipeng Wang
Sent: Monday, April 29, 2019 10:40 AM
To: Wang, Yipeng1 <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]; Burakov, Anatoly <[email protected]>
Cc: [email protected]
Subject: [dpdk-dev] [PATCH] doc: fixrte_hash_hashcomment for ambiguity
Quoted 3 lines
rte_hash_hashis multi-thread safe but not multi-process safe because of the use of function pointers. Previous document and comment says the other way around. This commit fixes the issue.
Thomas Monjalon
AppliedQuoted 5 lines
Quoted 3 lines
rte_hash_hashis multi-thread safe but not multi-process safe because of the use of function pointers. Previous document and comment says the other way around. This commit fixes the issue.Acked-by John McNamara <[email protected]>
Applied, thanks