<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted2">
I know, it's a simple, no-impact patch for dpdk functionality.
<div class="ContentPasted2">However, this can be misleading for app programs.</div>
<div class="ContentPasted2">When the return value of the interface is judged against -ENOENT, this will cause the program to error out.</div>
<div class="ContentPasted2">It also affects the presentation of the api documentation:</div>
<div class="ContentPasted2 ContentPasted3"><a href="https://doc.dpdk.org/api/rte__mempool_8h.html#a0d326354d53ef5068d86a8b7d9ec2d61" id="LPlnk338605">https://doc.dpdk.org/api/rte__mempool_8h.html#a0d326354d53ef5068d86a8b7d9ec2d61</a><br>
</div>
<div class="ContentPasted2"><br>
</div>
I'm not sure if this needs to be fixed or not.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> Subject: [PATCH v1] mempool: fix some errors in html api<o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> <o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> This patch fix some error descriptions of return value in mempool api which<o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> affect in html api.<o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> <o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> Signed-off-by: Rma Ma <<a href="mailto:rma.ma@jaguarmicro.com" class="ContentPasted1" data-loopstyle="linkonly"><span style="text-decoration:none;text-underline:none">rma.ma@jaguarmicro.com</span></a>><o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> ---<o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> <span style="mso-spacerun:yes" class="ContentPasted1"> </span>lib/mempool/rte_mempool.h | 12 ++++++------<o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> <span style="mso-spacerun:yes" class="ContentPasted1"> </span>1 file changed, 6 insertions(+), 6 deletions(-)<o:p class="ContentPasted1"> </o:p></p>
<p class="MsoPlainText ContentPasted1" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri, sans-serif">
> <o:p class="ContentPasted1"> </o:p></p>
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div class="elementToProof">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="font-size: 10.5pt; font-family: 等线; text-align: justify; margin: 0px; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">
<span lang="en-US" style="margin:0px" class="ContentPasted0">Best wishes,</span></p>
<p style="font-size: 10.5pt; font-family: 等线; text-align: justify; margin: 0px; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">
Rma</p>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Rma Ma<br>
<b>Sent:</b> Monday, July 3, 2023 14:18<br>
<b>To:</b> dpdk-dev <dev@dpdk.org><br>
<b>Cc:</b> Olivier Matz <olivier.matz@6wind.com>; Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Rma Ma <rma.ma@jaguarmicro.com><br>
<b>Subject:</b> [PATCH v1] mempool: fix some errors in html api</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This patch fix some error descriptions of<br>
return value in mempool api which affect in html api.<br>
<br>
Signed-off-by: Rma Ma <rma.ma@jaguarmicro.com><br>
---<br>
lib/mempool/rte_mempool.h | 12 ++++++------<br>
1 file changed, 6 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h<br>
index 160975a7e7..d4d707533a 100644<br>
--- a/lib/mempool/rte_mempool.h<br>
+++ b/lib/mempool/rte_mempool.h<br>
@@ -1610,7 +1610,7 @@ rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,<br>
* Get several objects from the mempool.<br>
*<br>
* If cache is enabled, objects will be retrieved first from cache,<br>
- * subsequently from the common pool. Note that it can return -ENOENT when<br>
+ * subsequently from the common pool. Note that it can return -ENOBUFS when<br>
* the local cache and common pool are empty, even if cache from other<br>
* lcores are full.<br>
*<br>
@@ -1624,7 +1624,7 @@ rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,<br>
* A pointer to a mempool cache structure. May be NULL if not needed.<br>
* @return<br>
* - 0: Success; objects taken.<br>
- * - -ENOENT: Not enough entries in the mempool; no object is retrieved.<br>
+ * - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.<br>
*/<br>
static __rte_always_inline int<br>
rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,<br>
@@ -1646,7 +1646,7 @@ rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,<br>
* mempool creation time (see flags).<br>
*<br>
* If cache is enabled, objects will be retrieved first from cache,<br>
- * subsequently from the common pool. Note that it can return -ENOENT when<br>
+ * subsequently from the common pool. Note that it can return -ENOBUFS when<br>
* the local cache and common pool are empty, even if cache from other<br>
* lcores are full.<br>
*<br>
@@ -1658,7 +1658,7 @@ rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,<br>
* The number of objects to get from the mempool to obj_table.<br>
* @return<br>
* - 0: Success; objects taken<br>
- * - -ENOENT: Not enough entries in the mempool; no object is retrieved.<br>
+ * - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.<br>
*/<br>
static __rte_always_inline int<br>
rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)<br>
@@ -1677,7 +1677,7 @@ rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)<br>
* mempool creation (see flags).<br>
*<br>
* If cache is enabled, objects will be retrieved first from cache,<br>
- * subsequently from the common pool. Note that it can return -ENOENT when<br>
+ * subsequently from the common pool. Note that it can return -ENOBUFS when<br>
* the local cache and common pool are empty, even if cache from other<br>
* lcores are full.<br>
*<br>
@@ -1687,7 +1687,7 @@ rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)<br>
* A pointer to a void * pointer (object) that will be filled.<br>
* @return<br>
* - 0: Success; objects taken.<br>
- * - -ENOENT: Not enough entries in the mempool; no object is retrieved.<br>
+ * - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.<br>
*/<br>
static __rte_always_inline int<br>
rte_mempool_get(struct rte_mempool *mp, void **obj_p)<br>
-- <br>
2.17.1<br>
<br>
</div>
</span></font></div>
</body>
</html>