From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: Ariel Otilibili <ariel.otilibili@6wind.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
"Thomas Monjalon" <thomas@monjalon.net>,
"David Marchand" <david.marchand@redhat.com>,
"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
"Morten Brørup" <mb@smartsharesystems.com>
Subject: RE: [PATCH v2 1/2] mempool: fix rte_errno in rte_mempool_create_empty
Date: Fri, 7 Feb 2025 14:30:01 +0000 [thread overview]
Message-ID: <05499f1b84b6459caa413b6f17fc5e8c@huawei.com> (raw)
In-Reply-To: <20250120122156.2480524-2-ariel.otilibili@6wind.com>
>
> When returning from rte_mempool_set_ops_byname(), rte_errno is not set
> for error exits.
>
> The API requires rte_errno to be set in that case.
>
> Bugzilla ID: 1559
> Fixes: c2c6b2f41305 ("mempool: fix default ops for an empty mempool")
> Link: https://doc.dpdk.org/api/rte__mempool_8h.html#a82e301ee33ed7a263ceb4582655dc3ea
> Signed-off-by: Ariel Otilibili <ariel.otilibili@6wind.com>
> ---
> lib/mempool/rte_mempool.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
> index d8e39e5c2072..1e4f24783c0b 100644
> --- a/lib/mempool/rte_mempool.c
> +++ b/lib/mempool/rte_mempool.c
> @@ -928,8 +928,10 @@ rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size,
> else
> ret = rte_mempool_set_ops_byname(mp, "ring_mp_mc", NULL);
>
> - if (ret)
> + if (ret) {
> + rte_errno = -ret;
> goto exit_unlock;
> + }
>
> /*
> * local_cache pointer is set even if cache_size is zero.
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
> 2.30.2
next prev parent reply other threads:[~2025-02-07 14:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-19 17:46 [PATCH 0/2] mempool: add rte_errno, and turn functions into single-exit ones Ariel Otilibili
2025-01-19 17:46 ` [PATCH 1/2] mempool: add rte_errno in rte_mempool_set_ops_byname Ariel Otilibili
2025-01-19 17:46 ` [PATCH 2/2] mempool: turn functions into single-exit ones Ariel Otilibili
2025-01-19 23:44 ` Konstantin Ananyev
2025-01-20 10:05 ` Ariel Otilibili
2025-01-20 12:21 ` [PATCH v2 0/2] add rte_errno to rte_mempool_create_empty, and refactor Ariel Otilibili
2025-01-20 12:21 ` [PATCH v2 1/2] mempool: fix rte_errno in rte_mempool_create_empty Ariel Otilibili
2025-01-24 6:47 ` fengchengwen
2025-02-07 14:30 ` Konstantin Ananyev [this message]
2025-02-12 14:13 ` Thomas Monjalon
2025-01-20 12:21 ` [PATCH v2 2/2] mempool: make rte_mempool_create_empty a single-exit Ariel Otilibili
2025-02-07 14:31 ` Konstantin Ananyev
2025-02-13 11:10 ` Ariel Otilibili
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=05499f1b84b6459caa413b6f17fc5e8c@huawei.com \
--to=konstantin.ananyev@huawei.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=ariel.otilibili@6wind.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.