Skip to contentSkip to conversation

doc: fix rte_hash_hash comment for ambiguity

PATCH Applied Yipeng Wang 4 participants 4 messages Apr 29, 2019 – May 4, 2019

lore
Share & tools
lore
#0 lore raw

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.

Fixes fc1f2750a3ec ("doc: programmers guide")
Fixes 48a399119619 ("hash: replace with cuckoo hash implementation")
---
 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
index 1384fe3..761fca9 100644
@@ -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
index c93d1a1..abba8d7 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
Quoted 49 lines · Yipeng Wang

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.

Fixes fc1f2750a3ec ("doc: programmers guide")
Fixes 48a399119619 ("hash: replace with cuckoo hash implementation")

---
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
index 1384fe3..761fca9 100644
@@ -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
index c93d1a1..abba8d7 100644
@@ -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
Acked-by on v1 1/1
#2 lore raw
In reply to Yipeng Wang
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: fix rte_hash_hash comment for ambiguity

Quoted 3 lines

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.

#3 lore raw
Quoted 5 lines
Quoted 3 lines

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.

Applied, thanks