DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: add thread-safety information about EFD library
@ 2017-02-14 15:02 Pablo de Lara
  2017-02-14 15:36 ` Mcnamara, John
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo de Lara @ 2017-02-14 15:02 UTC (permalink / raw)
  To: john.mcnamara; +Cc: dev, Pablo de Lara

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/prog_guide/efd_lib.rst | 15 +++++++++++++++
 lib/librte_efd/rte_efd.h          |  6 ++++++
 2 files changed, 21 insertions(+)

diff --git a/doc/guides/prog_guide/efd_lib.rst b/doc/guides/prog_guide/efd_lib.rst
index 5b8e4e3..3f90fa9 100644
--- a/doc/guides/prog_guide/efd_lib.rst
+++ b/doc/guides/prog_guide/efd_lib.rst
@@ -270,6 +270,11 @@ failed to find a suitable perfect hash or the group was full). The function
 will return ``EFD_UPDATE_NO_CHANGE (3)`` if there is no change to the EFD
 table (i.e, same value already exists).
 
+.. Note::
+
+   This function is not multi-thread safe and should only be called
+   from one thread.
+
 EFD Lookup
 ~~~~~~~~~~
 
@@ -285,6 +290,11 @@ lookup function. ``rte_efd_lookup_bulk()`` is the bulk lookup function,
 that looks up num_keys simultaneously stored in the key_list and the
 corresponding return values will be returned in the value_list.
 
+.. Note::
+
+   This function is multi-thread safe, but there should not be other threads
+   writing in the EFD table, unless locks are used.
+
 EFD Delete
 ~~~~~~~~~~
 
@@ -295,6 +305,11 @@ use to lookup the existing value, which is ideally the caller's socket id.
 The previous value associated with this key will be returned
 in the prev_value argument.
 
+.. Note::
+
+   This function is not multi-thread safe and should only be called
+   from one thread.
+
 .. _Efd_internals:
 
 Library Internals
diff --git a/lib/librte_efd/rte_efd.h b/lib/librte_efd/rte_efd.h
index 1a1cb5b..6d31e18 100644
--- a/lib/librte_efd/rte_efd.h
+++ b/lib/librte_efd/rte_efd.h
@@ -198,6 +198,8 @@ rte_efd_find_existing(const char *name);
  * Computes an updated table entry for the supplied key/value pair.
  * The update is then immediately applied to the provided table and
  * all socket-local copies of the chunks are updated.
+ * This operation is not multi-thread safe
+ * and should only be called one from thread.
  *
  * @param table
  *   EFD table to reference
@@ -227,6 +229,8 @@ rte_efd_update(struct rte_efd_table *table, unsigned int socket_id,
 
 /**
  * Removes any value currently associated with the specified key from the table
+ * This operation is not multi-thread safe
+ * and should only be called from one thread.
  *
  * @param table
  *   EFD table to reference
@@ -247,6 +251,7 @@ rte_efd_delete(struct rte_efd_table *table, unsigned int socket_id,
 
 /**
  * Looks up the value associated with a key
+ * This operation is multi-thread safe.
  *
  * NOTE: Lookups will *always* succeed - this is a property of
  * using a perfect hash table.
@@ -270,6 +275,7 @@ rte_efd_lookup(const struct rte_efd_table *table, unsigned int socket_id,
 
 /**
  * Looks up the value associated with several keys.
+ * This operation is multi-thread safe.
  *
  * NOTE: Lookups will *always* succeed - this is a property of
  * using a perfect hash table.
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: add thread-safety information about EFD library
  2017-02-14 15:02 [dpdk-dev] [PATCH] doc: add thread-safety information about EFD library Pablo de Lara
@ 2017-02-14 15:36 ` Mcnamara, John
  2017-02-14 20:47   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Mcnamara, John @ 2017-02-14 15:36 UTC (permalink / raw)
  To: De Lara Guarch, Pablo; +Cc: dev



> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, February 14, 2017 3:03 PM
> To: Mcnamara, John <john.mcnamara@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH] doc: add thread-safety information about EFD library
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>


Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: add thread-safety information about EFD library
  2017-02-14 15:36 ` Mcnamara, John
@ 2017-02-14 20:47   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-02-14 20:47 UTC (permalink / raw)
  To: De Lara Guarch, Pablo; +Cc: dev, Mcnamara, John

> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-14 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 15:02 [dpdk-dev] [PATCH] doc: add thread-safety information about EFD library Pablo de Lara
2017-02-14 15:36 ` Mcnamara, John
2017-02-14 20:47   ` Thomas Monjalon

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).