DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "Morten Brørup" <mb@smartsharesystems.com>,
	"Thomas Monjalon" <thomas@monjalon.net>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>
Cc: dev@dpdk.org, stable@dpdk.org, Mahesh Adulla <mahesh.adulla@amd.com>
Subject: Re: [PATCH] mempool: fix internal function documentation
Date: Mon, 23 Oct 2023 10:07:54 +0100	[thread overview]
Message-ID: <efa8bc56-419e-40d4-b72a-a56dff8e14ca@amd.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9EF64@smartserver.smartshare.dk>

On 10/20/2023 5:08 PM, Morten Brørup wrote:
>> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com]
>> Sent: Friday, 20 October 2023 16.47
>>
>> static function `rte_mempool_do_generic_get()` returns zero on success,
>> not >=0 as its function comment documents.
>>
>> Since this function called by public API, the comment causes confusion
>> on the public API return value.
>>
>> Fixing the internal function documentation for return value.
>>
>> Fixes: af75078fece3 ("first public release")
>> Cc: stable@dpdk.org
>>
>> Reported-by: Mahesh Adulla <mahesh.adulla@amd.com>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
>> ---
> 
> I agree that this is the current situation, and is relied upon elsewhere in DPDK.
> 
> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
> 
> However, the documentation for the mempool driver dequeue function type, rte_mempool_dequeue_t [1], does not specify allowed return values, so some future mempool driver might return a positive value. Please consider updating this too. (Also, the mempool driver enqueue/dequeue functions work on a bulk of objects, not "an object", as their documentation says.)
> 

Hi Morten,

Yes, mempool_ops are missing API parameter documentation, although this
is not directly related with this patch, I can update
'rte_mempool_dequeue_t' while I am around.


> [1]: https://elixir.bootlin.com/dpdk/latest/source/lib/mempool/rte_mempool.h#L476
> 


  reply	other threads:[~2023-10-23  9:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 14:46 Ferruh Yigit
2023-10-20 16:08 ` Morten Brørup
2023-10-23  9:07   ` Ferruh Yigit [this message]
2023-10-21  3:09 ` lihuisong (C)
2023-10-23  9:38 ` [PATCH v2 1/2] " Ferruh Yigit
2023-10-23  9:38   ` [PATCH v2 2/2] mempool: clarify enqueue and dequeue ops return type Ferruh Yigit
2023-10-23  9:43     ` Morten Brørup
2023-11-27 15:27       ` Thomas Monjalon
2023-11-06 12:24   ` [PATCH v2 1/2] mempool: fix internal function documentation Andrew Rybchenko
2023-11-27 14:41     ` Thomas Monjalon

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=efa8bc56-419e-40d4-b72a-a56dff8e14ca@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=mahesh.adulla@amd.com \
    --cc=mb@smartsharesystems.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).