DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rma Ma <rma.ma@jaguarmicro.com>
To: dpdk-dev <dev@dpdk.org>
Cc: Olivier Matz <olivier.matz@6wind.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH v1] mempool: fix some errors in html api
Date: Wed, 2 Aug 2023 02:20:27 +0000	[thread overview]
Message-ID: <SI2PR06MB4752B6F16A78702C95552E14990BA@SI2PR06MB4752.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <20230703061743.10576-1-rma.ma@jaguarmicro.com>

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

Hi,

I know, it's a simple, no-impact patch for dpdk functionality.
However, this can be misleading for app programs.
When the return value of the interface is judged against -ENOENT, this will cause the program to error out.
It also affects the presentation of the api documentation:
https://doc.dpdk.org/api/rte__mempool_8h.html#a0d326354d53ef5068d86a8b7d9ec2d61

I'm not sure if this needs to be fixed or not.



> Subject: [PATCH v1] mempool: fix some errors in html api

>

> This patch fix some error descriptions of return value in mempool api which

> affect in html api.

>

> Signed-off-by: Rma Ma <rma.ma@jaguarmicro.com<mailto:rma.ma@jaguarmicro.com>>

> ---

>  lib/mempool/rte_mempool.h | 12 ++++++------

>  1 file changed, 6 insertions(+), 6 deletions(-)

>




Best wishes,

Rma

________________________________
From: Rma Ma
Sent: Monday, July 3, 2023 14:18
To: dpdk-dev <dev@dpdk.org>
Cc: Olivier Matz <olivier.matz@6wind.com>; Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Rma Ma <rma.ma@jaguarmicro.com>
Subject: [PATCH v1] mempool: fix some errors in html api

This patch fix some error descriptions of
return value in mempool api which affect in html api.

Signed-off-by: Rma Ma <rma.ma@jaguarmicro.com>
---
 lib/mempool/rte_mempool.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index 160975a7e7..d4d707533a 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -1610,7 +1610,7 @@ rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,
  * Get several objects from the mempool.
  *
  * If cache is enabled, objects will be retrieved first from cache,
- * subsequently from the common pool. Note that it can return -ENOENT when
+ * subsequently from the common pool. Note that it can return -ENOBUFS when
  * the local cache and common pool are empty, even if cache from other
  * lcores are full.
  *
@@ -1624,7 +1624,7 @@ rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,
  *   A pointer to a mempool cache structure. May be NULL if not needed.
  * @return
  *   - 0: Success; objects taken.
- *   - -ENOENT: Not enough entries in the mempool; no object is retrieved.
+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.
  */
 static __rte_always_inline int
 rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,
@@ -1646,7 +1646,7 @@ rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,
  * mempool creation time (see flags).
  *
  * If cache is enabled, objects will be retrieved first from cache,
- * subsequently from the common pool. Note that it can return -ENOENT when
+ * subsequently from the common pool. Note that it can return -ENOBUFS when
  * the local cache and common pool are empty, even if cache from other
  * lcores are full.
  *
@@ -1658,7 +1658,7 @@ rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,
  *   The number of objects to get from the mempool to obj_table.
  * @return
  *   - 0: Success; objects taken
- *   - -ENOENT: Not enough entries in the mempool; no object is retrieved.
+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.
  */
 static __rte_always_inline int
 rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)
@@ -1677,7 +1677,7 @@ rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)
  * mempool creation (see flags).
  *
  * If cache is enabled, objects will be retrieved first from cache,
- * subsequently from the common pool. Note that it can return -ENOENT when
+ * subsequently from the common pool. Note that it can return -ENOBUFS when
  * the local cache and common pool are empty, even if cache from other
  * lcores are full.
  *
@@ -1687,7 +1687,7 @@ rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)
  *   A pointer to a void * pointer (object) that will be filled.
  * @return
  *   - 0: Success; objects taken.
- *   - -ENOENT: Not enough entries in the mempool; no object is retrieved.
+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.
  */
 static __rte_always_inline int
 rte_mempool_get(struct rte_mempool *mp, void **obj_p)
--
2.17.1


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

  reply	other threads:[~2023-08-02  2:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  6:17 Rma Ma
2023-08-02  2:20 ` Rma Ma [this message]
2023-08-02  8:58 ` Morten Brørup
2023-08-02  9:46   ` Rma Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SI2PR06MB4752B6F16A78702C95552E14990BA@SI2PR06MB4752.apcprd06.prod.outlook.com \
    --to=rma.ma@jaguarmicro.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).