patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'hash: fix doxygen of return values' has been queued to LTS release 17.11.4
@ 2018-08-13 20:42 Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/qede: fix ntuple filter configuration' " Yongseok Koh
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Petr Houska, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 235464fa81fb61d23a052deecfb15e3bb89710cb Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 7 Aug 2018 03:00:04 +0100
Subject: [PATCH] hash: fix doxygen of return values

[ upstream commit f9975d333a8d51e4c15961f56a554914288768aa ]

rte_hash_lookup_data() and rte_hash_lookup_with_hash_data()
functions return the index of the table where the key is stored
when this is found, and not 0 as the Doxygen currently states.

Also, these functions, and rte_hash_get_key_with_position()
return negative values when keys are not found (-EINVAL and -ENOENT),
where the minus sign was missing.

Bugzilla ID: 78
Fixes: 473d1bebce43 ("hash: allow to store data in hash table")
Fixes: 6dc34e0afe7a ("hash: retrieve a key given its position")

Reported-by: Petr Houska <t-pehous@microsoft.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_hash/rte_hash.h | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
index 622c18009..5539e3389 100644
--- a/lib/librte_hash/rte_hash.h
+++ b/lib/librte_hash/rte_hash.h
@@ -283,8 +283,8 @@ rte_hash_del_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t
  *   Output containing a pointer to the key
  * @return
  *   - 0 if retrieved successfully
- *   - EINVAL if the parameters are invalid.
- *   - ENOENT if no valid key is found in the given position.
+ *   - -EINVAL if the parameters are invalid.
+ *   - -ENOENT if no valid key is found in the given position.
  */
 int
 rte_hash_get_key_with_position(const struct rte_hash *h, const int32_t position,
@@ -301,9 +301,11 @@ rte_hash_get_key_with_position(const struct rte_hash *h, const int32_t position,
  * @param data
  *   Output with pointer to data returned from the hash table.
  * @return
- *   0 if successful lookup
- *   - EINVAL if the parameters are invalid.
- *   - ENOENT if the key is not found.
+ *   - A positive value that can be used by the caller as an offset into an
+ *     array of user data. This value is unique for this key, and is the same
+ *     value that was returned when the key was added.
+ *   - -EINVAL if the parameters are invalid.
+ *   - -ENOENT if the key is not found.
  */
 int
 rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data);
@@ -322,9 +324,11 @@ rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data);
  * @param data
  *   Output with pointer to data returned from the hash table.
  * @return
- *   0 if successful lookup
- *   - EINVAL if the parameters are invalid.
- *   - ENOENT if the key is not found.
+ *   - A positive value that can be used by the caller as an offset into an
+ *     array of user data. This value is unique for this key, and is the same
+ *     value that was returned when the key was added.
+ *   - -EINVAL if the parameters are invalid.
+ *   - -ENOENT if the key is not found.
  */
 int
 rte_hash_lookup_with_hash_data(const struct rte_hash *h, const void *key,
-- 
2.11.0

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

end of thread, other threads:[~2018-08-13 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 20:42 [dpdk-stable] patch 'hash: fix doxygen of return values' has been queued to LTS release 17.11.4 Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/qede: fix ntuple filter configuration' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'kni: fix crash with null name' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'kni: fix build on RHEL 7.5' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/mlx5: preserve promiscuous flag for flow isolation mode' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/mlx5: preserve allmulticast " Yongseok Koh
2018-08-13 20:43 ` [dpdk-stable] patch 'ethdev: fix a doxygen comment for port allocation' " Yongseok Koh

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