DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] lib/hash: fix the return value description of rte_hash
@ 2022-06-27 13:11 Chenming C
  2023-07-06 22:58 ` Stephen Hemminger
  2024-06-14 13:49 ` David Marchand
  0 siblings, 2 replies; 4+ messages in thread
From: Chenming C @ 2022-06-27 13:11 UTC (permalink / raw)
  To: dev; +Cc: yipeng1.wang, sameh.gobriel, bruce.richardson, vladimir.medvedkin

The rte_hash lookup can return ZERO which is not a positive value.

Signed-off-by: Chenming C <ccm@ccm.ink>
---
 lib/hash/rte_hash.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/hash/rte_hash.h b/lib/hash/rte_hash.h
index 7fa9702..1bf1aac 100644
--- a/lib/hash/rte_hash.h
+++ b/lib/hash/rte_hash.h
@@ -288,7 +288,7 @@ struct rte_hash *
  * @return
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOSPC if there is no space in the hash for this key.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key. This
  *     unique key id may be larger than the user specified entry count
  *     when RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD flag is set.
@@ -312,7 +312,7 @@ struct rte_hash *
  * @return
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOSPC if there is no space in the hash for this key.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key. This
  *     unique key ID may be larger than the user specified entry count
  *     when RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD flag is set.
@@ -343,7 +343,7 @@ struct rte_hash *
  * @return
  *   - -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
+ *   - A non-negative 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.
  */
@@ -375,7 +375,7 @@ struct rte_hash *
  * @return
  *   - -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
+ *   - A non-negative 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.
  */
@@ -442,7 +442,7 @@ struct rte_hash *
  * @param data
  *   Output with pointer to data returned from the hash table.
  * @return
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative 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.
@@ -467,7 +467,7 @@ struct rte_hash *
  * @param data
  *   Output with pointer to data returned from the hash table.
  * @return
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative 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.
@@ -490,7 +490,7 @@ struct rte_hash *
  * @return
  *   - -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
+ *   - A non-negative 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.
  */
@@ -512,7 +512,7 @@ struct rte_hash *
  * @return
  *   - -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
+ *   - A non-negative 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.
  */
-- 
1.8.3.1



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

* Re: [PATCH] lib/hash: fix the return value description of rte_hash
  2022-06-27 13:11 [PATCH] lib/hash: fix the return value description of rte_hash Chenming C
@ 2023-07-06 22:58 ` Stephen Hemminger
  2024-03-01 17:10   ` Vladimir Medvedkin
  2024-06-14 13:49 ` David Marchand
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2023-07-06 22:58 UTC (permalink / raw)
  To: Chenming C
  Cc: dev, yipeng1.wang, sameh.gobriel, bruce.richardson, vladimir.medvedkin

On Mon, 27 Jun 2022 21:11:21 +0800
Chenming C <ccm@ccm.ink> wrote:

> The rte_hash lookup can return ZERO which is not a positive value.
> 
> Signed-off-by: Chenming C <ccm@ccm.ink>

Right, zero is neither positive or negative.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* Re: [PATCH] lib/hash: fix the return value description of rte_hash
  2023-07-06 22:58 ` Stephen Hemminger
@ 2024-03-01 17:10   ` Vladimir Medvedkin
  0 siblings, 0 replies; 4+ messages in thread
From: Vladimir Medvedkin @ 2024-03-01 17:10 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Chenming C, dev, yipeng1.wang, sameh.gobriel, bruce.richardson,
	vladimir.medvedkin, stable

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

I believe this patch requires fixline and cc stable@

Fixes: af75078fece3 ("first public release")

Apart from it
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>


чт, 6 июл. 2023 г. в 23:58, Stephen Hemminger <stephen@networkplumber.org>:

> On Mon, 27 Jun 2022 21:11:21 +0800
> Chenming C <ccm@ccm.ink> wrote:
>
> > The rte_hash lookup can return ZERO which is not a positive value.
> >
> > Signed-off-by: Chenming C <ccm@ccm.ink>
>
> Right, zero is neither positive or negative.
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>


-- 
Regards,
Vladimir

[-- Attachment #2: Type: text/html, Size: 1356 bytes --]

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

* Re: [PATCH] lib/hash: fix the return value description of rte_hash
  2022-06-27 13:11 [PATCH] lib/hash: fix the return value description of rte_hash Chenming C
  2023-07-06 22:58 ` Stephen Hemminger
@ 2024-06-14 13:49 ` David Marchand
  1 sibling, 0 replies; 4+ messages in thread
From: David Marchand @ 2024-06-14 13:49 UTC (permalink / raw)
  To: Chenming C
  Cc: dev, yipeng1.wang, sameh.gobriel, bruce.richardson, vladimir.medvedkin

Hello,

On Mon, Jun 27, 2022 at 3:13 PM Chenming C <ccm@ccm.ink> wrote:
>
> The rte_hash lookup can return ZERO which is not a positive value.
>

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

> Signed-off-by: Chenming C <ccm@ccm.ink>

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

Sorry, I had forgotten about this patch.
Applied, thanks.


-- 
David Marchand


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

end of thread, other threads:[~2024-06-14 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 13:11 [PATCH] lib/hash: fix the return value description of rte_hash Chenming C
2023-07-06 22:58 ` Stephen Hemminger
2024-03-01 17:10   ` Vladimir Medvedkin
2024-06-14 13:49 ` David Marchand

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