[PATCH v12 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-02-26 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

[PATCH v12 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-02-26 Thread Ariel Otilibili
ddressed feedback from Stephen Hemminger v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/) Ariel Otilibili (2): net/af_xdp: Fix use after free in af_xdp_tx_zc net/af_xdp: Refactor af_xdp_tx_zc .mailmap| 2 +- drivers/ne

Re: [PATCH v6 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-26 Thread Ariel Otilibili
Hello Stephen, On Mon, Feb 24, 2025 at 8:25 PM Stephen Hemminger < step...@networkplumber.org> wrote: > > Please avoid doing assignment in a conditional statement, can be error > prone. > Surprised checkpatch doesn't complain about it. > Thanks for the feedback. checkpatch did catch them. Here

[PATCH v12 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-26 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili Acked-by: Maryam Tahhan --- drivers

[PATCH v11 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-02-26 Thread Ariel Otilibili
l.otilib...@6wind.com/) Ariel Otilibili (2): net/af_xdp: Fix use after free in af_xdp_tx_zc net/af_xdp: Refactor af_xdp_tx_zc .mailmap| 2 +- drivers/net/af_xdp/rte_eth_af_xdp.c | 77 - 2 files changed, 44 insertions(+), 35 d

[PATCH v11 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-26 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili Acked-by: Maryam Tahhan --- drivers

[PATCH v11 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-02-26 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

Re: [PATCH v2 1/1] pcapng: warn if NULL is passed to rte_pcapng_close

2025-02-26 Thread Ariel Otilibili
Hello Patrick, On Tue, Feb 25, 2025 at 9:42 PM Patrick Robb wrote: > Recheck-request: iol-marvell-Functional > > Putting in a recheck as I believe the fail CI reported is false. > >> >> Thanks for the heads up. This patch did supersede version 2, https://patches.dpdk.org/project/dpdk/patch/20250

Re: [PATCH v2 1/1] pcapng: warn if NULL is passed to rte_pcapng_close

2025-02-24 Thread Ariel Otilibili
Hello Dmitry, hello Stephen; On Mon, Feb 24, 2025 at 4:42 PM Stephen Hemminger < step...@networkplumber.org> wrote: > The convention (back from Unix) is that errno is only set on failure. > Simpler fix would just to silently ignore NULL case. > Thanks for your feedback. Here they are addressed,

[PATCH v3 1/1] pcapng: fix null dereference in rte_pcapng_close

2025-02-24 Thread Ariel Otilibili
/e5176f23ae8b31437c3e5eb875c81f95bf3a9942/app/test/test_pcapng.c#L438 Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Suggested-by: Stephen Hemminger Signed-off-by: Ariel Otilibili --- .mailmap| 2 +- lib/pcapng/rte_pcapng.c | 6 -- 2 files changed, 5 insert

[PATCH v3 0/1] pcapng: fix null dereference in rte_pcapng_close

2025-02-24 Thread Ariel Otilibili
documentation than work around the bug (Stephen Hemminger) * changed cover letter and commit message v1 (https://inbox.dpdk.org/dev/20250216160833.3216001-1-ariel.otilib...@6wind.com/) Ariel Otilibili (1): pcapng: fix null dereference in rte_pcapng_close .mailmap| 2 +- lib/pcapng

[PATCH v10 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-02-23 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

[PATCH v10 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-02-23 Thread Ariel Otilibili
l.otilib...@6wind.com/) * reworded commit messages * addressed feedback from Stephen Hemminger v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/) Ariel Otilibili (2): net/af_xdp: Fix use after free in af_xdp_tx_zc net/af_xdp: Refactor af_xdp_tx_zc

[PATCH v10 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-23 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili Acked-by: Maryam Tahhan --- drivers

[PATCH v2 0/1] warn if NULL is passed to rte_pcapng_close

2025-02-23 Thread Ariel Otilibili
-ariel.otilib...@6wind.com/) Ariel Otilibili (1): pcapng: warn if NULL is passed to rte_pcapng_close .mailmap| 2 +- lib/pcapng/rte_pcapng.c | 3 +++ lib/pcapng/rte_pcapng.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) -- 2.30.2

[PATCH v2 1/1] pcapng: warn if NULL is passed to rte_pcapng_close

2025-02-23 Thread Ariel Otilibili
/warnings/v522/ Link: https://github.com/DPDK/dpdk/blob/e5176f23ae8b31437c3e5eb875c81f95bf3a9942/app/test/test_pcapng.c#L438 Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Signed-off-by: Ariel Otilibili --- .mailmap| 2 +- lib/pcapng/rte_pcapng.c |

[PATCH 0/1] pcapng: fix null dereference in rte_pcapng_close

2025-02-16 Thread Ariel Otilibili
Hello, This patch fixes a null dereference warning; it was found by static analysis, courtesy of Stephen Hemminger. Thank you, Ariel Otilibili (1): pcapng: fix null dereference in rte_pcapng_close .mailmap| 2 +- lib/pcapng/rte_pcapng.c | 3 +++ 2 files changed, 4

[PATCH 1/1] pcapng: fix null dereference in rte_pcapng_close

2025-02-16 Thread Ariel Otilibili
/e5176f23ae8b31437c3e5eb875c81f95bf3a9942/app/test/test_pcapng.c#L438 Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Signed-off-by: Ariel Otilibili --- .mailmap| 2 +- lib/pcapng/rte_pcapng.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/

Re: [PATCH v9 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-13 Thread Ariel Otilibili
Hello Maryam, hello Stephen; On Fri, Feb 7, 2025 at 1:33 PM Ariel Otilibili wrote: > > > On Fri, Feb 7, 2025 at 12:13 PM Maryam Tahhan wrote: > >> >> On 07/02/2025 10:45, Ariel Otilibili wrote: >> >> Both legs of the loop share the same logic: the com

Re: [PATCH 1/1] eal/linux: Remove unused values

2025-02-13 Thread Ariel Otilibili
Hi Thomas, On Wed, Feb 12, 2025 at 3:00 PM Thomas Monjalon wrote: > Applied, thanks. > Thanks for the feedback. Have a good day. Ariel

Re: [PATCH v2 2/2] mempool: make rte_mempool_create_empty a single-exit

2025-02-13 Thread Ariel Otilibili
Hi Konstantin, On Fri, Feb 7, 2025 at 3:31 PM Konstantin Ananyev < konstantin.anan...@huawei.com> wrote: > Personally, I don't see much profit in such refactoring. > Then, please drop this patch. I gave room for other people to react, none came up. Thanks for your feedback, Ariel > > > 2.30.2

Re: [PATCH v9 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-07 Thread Ariel Otilibili
On Fri, Feb 7, 2025 at 12:13 PM Maryam Tahhan wrote: > > On 07/02/2025 10:45, Ariel Otilibili wrote: > > Both legs of the loop share the same logic: the common parts are about > reserving and filling both address and length into the description. > > This is moved

[PATCH v9 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-02-07 Thread Ariel Otilibili
v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/) Ariel Otilibili (2): net/af_xdp: Fix use after free in af_xdp_tx_zc net/af_xdp: Refactor af_xdp_tx_zc .mailmap| 2 +- drivers/net/af_xdp/rte_eth_af_xdp.c | 75

Re: [PATCH v8 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-07 Thread Ariel Otilibili
Hi Maryam, hi Stephen; On Fri, Feb 7, 2025 at 10:14 AM Maryam Tahhan wrote: > Sorry if my remarks were confusing, it was just missing from the previous > patch and it needs to be: > desc->len = mbuf->pkt_len; > > We need to keep this the same as the original code. This is a scenario > where we n

[PATCH v9 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-02-07 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

[PATCH v9 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-07 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp

Re: [PATCH] vhost: fix VDUSE devices registration

2025-02-06 Thread Ariel Otilibili-Anieli
Hi Maxime, On Wednesday, February 05, 2025 22:18 CET, Maxime Coquelin wrote: > Hi Ariel, > > > Not really :) > Without your patch, ret was assigned by the pthread_mutex_init() return, > so always 0. With your patch, this assignment is removed so ret will > always be -1 for VDUSE devices. > >

[PATCH v8 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-06 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp

[PATCH v8 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-02-06 Thread Ariel Otilibili
n v2 (https://inbox.dpdk.org/dev/20250116225151.188214-1-ariel.otilib...@6wind.com/) * reworded commit messages * addressed feedback from Stephen Hemminger v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/) Ariel Otilibili (2): net/af_xdp: Fix use after free in af_xdp_

[PATCH v8 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-02-06 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

Re: [PATCH v7 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-06 Thread Ariel Otilibili
Hi Maryam, On Thu, Feb 6, 2025 at 3:09 AM Maryam Tahhan wrote: > > > On Sat 1 Feb 2025, 10:03 Ariel Otilibili, > wrote: > >> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c >> b/drivers/net/af_xdp/rte_eth_af_xdp.c >> index 092bcb73aa0a..840a12dbf508 1

Re: [PATCH v7 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-06 Thread Ariel Otilibili
Hi Maryam, On Thu, Feb 6, 2025 at 2:09 AM Maryam Tahhan wrote: > > > On Sat 1 Feb 2025, 10:03 Ariel Otilibili, > wrote: > >> Both legs of the loop share the same logic: the common parts are about >> reserving and filling both address and length into the descriptio

[PATCH v7 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-01 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp

[PATCH v7 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-02-01 Thread Ariel Otilibili
ssage of patch-1 * addressed feedback of Maryam Tahhan v2 (https://inbox.dpdk.org/dev/20250116225151.188214-1-ariel.otilib...@6wind.com/) * reworded commit messages * addressed feedback from Stephen Hemminger v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/)

[PATCH v7 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-02-01 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

[PATCH v6 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-01-31 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp

[PATCH v6 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-01-31 Thread Ariel Otilibili
messages * addressed feedback from Stephen Hemminger v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/) Ariel Otilibili (2): net/af_xdp: Fix use after free in af_xdp_tx_zc net/af_xdp: Refactor af_xdp_tx_zc .mailmap| 2 +- drivers/net

[PATCH v6 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-01-31 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

Re: [PATCH v4 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-01-31 Thread Ariel Otilibili
On Fri, Jan 31, 2025 at 12:55 AM Stephen Hemminger < step...@networkplumber.org> wrote: > Need space after xdp_desc to follow style used elsewhere in DPDK. > There you are, Stephen: https://inbox.dpdk.org/dev/20250131183439.909831-3-ariel.otilib...@6wind.com/

[PATCH v5 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-01-31 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp/rte_eth_af_xdp.c | 62

[PATCH v5 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-01-31 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

[PATCH v5 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-01-31 Thread Ariel Otilibili
/) Ariel Otilibili (2): net/af_xdp: Fix use after free in af_xdp_tx_zc net/af_xdp: Refactor af_xdp_tx_zc .mailmap| 2 +- drivers/net/af_xdp/rte_eth_af_xdp.c | 64 - 2 files changed, 36 insertions(+), 30 deletions(-) -- 2.30.2

Re: [PATCH] vhost: fix VDUSE devices registration

2025-01-31 Thread Ariel Otilibili-Anieli
Hello Maxime, On Friday, January 31, 2025 14:09 CET, Maxime Coquelin wrote: > This patch fixes a regression in vhost_driver_register() > causing VDUSE devices registration to fail systematically > because the return value was initialized to -1 and not > changed later on for this type of devices

Re: [PATCH v3 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

2025-01-30 Thread Ariel Otilibili
Hello Maryam, On Wed, Jan 29, 2025 at 6:58 PM Maryam Tahhan wrote: > > +static struct rte_mbuf * > > +maybe_kick_tx(struct pkt_tx_queue *txq, uint32_t *idx_tx, struct > rte_mbuf *mbuf) > > +{ > > + struct rte_mbuf *ret = mbuf; > > + > > + if (!xsk_ring_prod__reserve(&txq->tx, 1, idx_tx))

[PATCH v4 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-01-30 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger ---

Re: [PATCH 1/2] net/af_xdp: fix use after free in af_xdp_tx_zc()

2025-01-30 Thread Ariel Otilibili
Hello Stephen, On Thu, Jan 30, 2025 at 7:24 PM Stephen Hemminger < step...@networkplumber.org> wrote: > Acked-by: Stephen Hemminger > Thanks for having looked into the patch; I have ACKed the fourth version by your name, https://inbox.dpdk.org/dev/20250130221853.789366-2-ariel.otilib...@6wind.co

[PATCH v4 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-01-30 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp

[PATCH v4 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-01-30 Thread Ariel Otilibili
messages * addressed feedback from Stephen Hemminger v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/) Ariel Otilibili (2): net/af_xdp: Fix use after free in af_xdp_tx_zc net/af_xdp: Refactor af_xdp_tx_zc .mailmap| 2 +- drivers/net

Re: [PATCH 1/1] net/{octeon_ep,enetfec}: remove unused value

2025-01-30 Thread Ariel Otilibili-Anieli
Hello Stephen, On Thursday, January 30, 2025 19:39 CET, Stephen Hemminger wrote: > Fixed that and applied to next-net Thanks for having wrapped up the series; much appreciated. I now have the proper length in my git config. Have a good one, Ariel

[PATCH v3 1/2] net/af_xdp: fix use after free in af_xdp_tx_zc()

2025-01-28 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp/rte_et

[PATCH v3 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

2025-01-28 Thread Ariel Otilibili
Both legs of the loop share the same logic: either to go out of the function, or to fall through to the next instructions. For that, maybe_cpy_pkt() is introduced. Bugzilla ID: 1440 Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp/rte_eth_af_xdp.c | 131 ++-- 1

[PATCH v3 0/2] Fix use after free, and refactor af_xdp_tx_zc()

2025-01-28 Thread Ariel Otilibili
/) * reworded commit messages * addressed feedback from Stephen Hemminger v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/) Ariel Otilibili (2): net/af_xdp: fix use after free in af_xdp_tx_zc() net/af_xdp: Refactor af_xdp_tx_zc() drivers/net/af_xdp/rte_eth_af_xdp.c | 131

Re: [PATCH v2 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

2025-01-21 Thread Ariel Otilibili
Hi Maryam, On Mon, Jan 20, 2025 at 4:28 PM Maryam Tahhan wrote: > > On 16/01/2025 17:51, Ariel Otilibili wrote: > This ends up duplicating the if condition `if (mbuf->pool == > umem->mb_pool) {` twice in `af_xdp_tx_zc`. Which is messy to read tbh... > > I think it woul

Re: [PATCH v2 1/2] net/af_xdp: fix use after free in af_xdp_tx_zc()

2025-01-21 Thread Ariel Otilibili
Hi Maryam, On Mon, Jan 20, 2025 at 3:54 PM Maryam Tahhan wrote: > I think that you could've just set tx_bytes to the desc->len as this is > being set in all scenarios... > > tx_bytes += desc->len; > Thanks for your feedback. I'll change that.

[PATCH v2 2/2] mempool: make rte_mempool_create_empty a single-exit

2025-01-20 Thread Ariel Otilibili
For properly setting rte_errno, and exiting rte_mempool_create_empty() from a single place. Bugzilla ID: 1559 Signed-off-by: Ariel Otilibili --- lib/mempool/rte_mempool.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/mempool/rte_mempool.c

[PATCH v2 1/2] mempool: fix rte_errno in rte_mempool_create_empty

2025-01-20 Thread Ariel Otilibili
ol_8h.html#a82e301ee33ed7a263ceb4582655dc3ea Signed-off-by: Ariel Otilibili --- 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/l

[PATCH v2 0/2] add rte_errno to rte_mempool_create_empty, and refactor

2025-01-20 Thread Ariel Otilibili
From: Ariel Otilibili https://inbox.dpdk.org/dev/20250119174643.2162110-1-ariel.otilib...@6wind.com/) Ariel Otilibili (2): mempool: fix rte_errno in rte_mempool_create_empty mempool: make rte_mempool_create_empty a single-exit lib/mempool/rte_mempool.c | 31

Re: [PATCH 2/2] mempool: turn functions into single-exit ones

2025-01-20 Thread Ariel Otilibili
Hi Konstantin, On Mon, Jan 20, 2025 at 12:44 AM Konstantin Ananyev < konstantin.anan...@huawei.com> wrote: > > > > Some functions did not set rte_errno; for avoiding that, they are turned > > into single-exit ones. > > > > Bugzilla ID: 1559 > > Signe

[PATCH 2/2] mempool: turn functions into single-exit ones

2025-01-19 Thread Ariel Otilibili
Some functions did not set rte_errno; for avoiding that, they are turned into single-exit ones. Bugzilla ID: 1559 Signed-off-by: Ariel Otilibili --- lib/mempool/rte_mempool_ops.c | 38 ++- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/lib

[PATCH 1/2] mempool: add rte_errno in rte_mempool_set_ops_byname

2025-01-19 Thread Ariel Otilibili
function. Bugzilla ID: 1559 Signed-off-by: Ariel Otilibili --- lib/mempool/rte_mempool_ops.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c index 1b33380259b3..b5c68ac61b67 100644 --- a/lib/mempool

[PATCH 0/2] mempool: add rte_errno, and turn functions into single-exit ones

2025-01-19 Thread Ariel Otilibili
Hello, This series is for BugZilla ID 1559. rte_mempool_set_ops_byname() did not set rte_errno for error exit. As well, other functions did not consistently set the variable. For avoiding that, they are turned into single-exit functions. Thank you, Ariel Otilibili (2): mempool: add

[PATCH v2 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

2025-01-16 Thread Ariel Otilibili
Both legs of the loop share the same logic: either to go out of the function, or to fall through to the next instructions. Depends-on: patch-1 ("net/af_xdp: fix use after free in af_xdp_tx_zc()") Bugzilla ID: 1440 Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp/rte_eth_af_

[PATCH v2 1/2] net/af_xdp: fix use after free in af_xdp_tx_zc()

2025-01-16 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp/rte_et

[PATCH v2 0/2] Fix use after free, and refactor af_xdp_tx_zc()

2025-01-16 Thread Ariel Otilibili
Hello, The series addresses Bugzilla ID 1440 in two steps; 1. Fix use after free. 2. Refactor af_xdp_tx_zc(). Thank you, --- v2 * reworded commit messages * addressed feedback from Stephen Hemminger v1 (http://inbox.dpdk.org/dev/20250116195640.68885-1-ariel.otilib...@6wind.com/) Ariel

Re: [PATCH 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

2025-01-16 Thread Ariel Otilibili
On Thu, Jan 16, 2025 at 11:26 PM Stephen Hemminger < step...@networkplumber.org> wrote: > On Thu, 16 Jan 2025 23:20:06 +0100 > Ariel Otilibili wrote: > > > Hi Stephen, > > > > On Thu, Jan 16, 2025 at 10:47 PM Stephen Hemminger < > > step...@networkpl

Re: [PATCH 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

2025-01-16 Thread Ariel Otilibili
Hi Stephen, On Thu, Jan 16, 2025 at 10:47 PM Stephen Hemminger < step...@networkplumber.org> wrote: > On Thu, 16 Jan 2025 20:56:39 +0100 > Ariel Otilibili wrote: > > > Both branches of the loop share the same logic. Now each one is a > > goto dispatcher; either to o

[PATCH 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

2025-01-16 Thread Ariel Otilibili
Both branches of the loop share the same logic. Now each one is a goto dispatcher; either to out (end of function), or to stats (continuation of the loop). Bugzilla ID: 1440 Depends-on: patch-1 ("net/af_xdp: fix use after free in af_xdp_tx_zc()") Signed-off-by: Ariel Otilibili --- d

[PATCH 1/2] net/af_xdp: fix use after free in af_xdp_tx_zc()

2025-01-16 Thread Ariel Otilibili
tx_bytes is computed after both branches are tested. This might produce a use after memory free. The computation is now moved into both branches. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili --- drivers/

[PATCH 0/2] Fix use after free, and refactor af_xdp_tx_zc()

2025-01-16 Thread Ariel Otilibili
Hello, The series addresses Bugzilla ID 1440 in two steps; 1. Fix use after free. 2. Refactor af_xdp_tx_zc(). Thank you, Ariel Otilibili (2): net/af_xdp: fix use after free in af_xdp_tx_zc() net/af_xdp: Refactor af_xdp_tx_zc() drivers/net/af_xdp/rte_eth_af_xdp.c | 53

[PATCH v2 3/3] Update .mailmap

2025-01-15 Thread Ariel Otilibili
For fixing a warning from devtools/check-git-log.sh Link: https://inbox.dpdk.org/dev/20250114153419.0a2753ab@hermes.local/ Signed-off-by: Ariel Otilibili --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 818798273fe1..735a635fc7f9 100644 --- a/.mailmap

[PATCH v2 2/3] drivers/net/sfc: remove unused value

2025-01-15 Thread Ariel Otilibili
Coverity issue: 38 Fixes: a62ec90522a6 ("net/sfc: add port representors infrastructure") Signed-off-by: Ariel Otilibili --- drivers/net/sfc/sfc_repr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c index c2e5d4eb9e28..a0

[PATCH v2 1/3] examples/flow_filtering: remove unused variable

2025-01-15 Thread Ariel Otilibili
Coverity issue: 451221 Fixes: 16158f349000 ("examples/flow_filtering: introduce use cases snippets") Signed-off-by: Ariel Otilibili --- examples/flow_filtering/snippets/snippet_match_ipv4.c | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/flow_filtering/snippets/snippet_ma

[PATCH v2 0/3] clear out Coverity issues 384444 & 451221

2025-01-15 Thread Ariel Otilibili
lmap * reworded the cover letter v1 (https://inbox.dpdk.org/dev/20241213214951.61974-1-otili...@eurecom.fr/) Ariel Otilibili (3): examples/flow_filtering: remove unused variable drivers/net/sfc: remove unused value Update .mailmap .mailmap

Re: [PATCH 2/2] drivers/net/sfc: remove unused value

2025-01-14 Thread Ariel Otilibili-Anieli
Hello Stephen, On Tuesday, January 14, 2025 19:47 CET, Stephen Hemminger wrote: > On Fri, 13 Dec 2024 22:41:55 +0100 > Ariel Otilibili wrote: > > > Coverity issue: 38 > > Fixes: a62ec90522a ("net/sfc: add port representors infrastructure") > &

Re: [PATCH v4 6/6] lib/vhost: remove check around pthread_mutex_init()

2025-01-14 Thread Ariel Otilibili-Anieli
Hello Maxime, On Tuesday, January 14, 2025 09:48 CET, Maxime Coquelin wrote: > > > On 1/14/25 8:50 AM, Ariel Otilibili wrote: > > Reviewed-by: Maxime Coquelin > Thanks! Have a good day, Ariel > Thanks, > Maxime >

Re: [PATCH v3 0/6] remove check around pthread_mutex_init()

2025-01-14 Thread Ariel Otilibili-Anieli
Hi Stephen, On Monday, January 13, 2025 20:11 CET, Stephen Hemminger wrote: > On Sun, 12 Jan 2025 21:20:15 +0100 > Ariel Otilibili wrote: > > > > LGTM > Series-Acked-by: Stephen Hemminger Thanks for having looked into the series. Herewith a new version, I addressed

[PATCH v4 6/6] lib/vhost: remove check around pthread_mutex_init()

2025-01-13 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Cc: Maxime Coquelin Cc: Chenbo Xia Signed-off-by: Ariel Otilibili Acked-by: S

[PATCH v4 5/6] net/hinic: remove check around pthread_mutex_init()

2025-01-13 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Cc: Ziyang Xuan Cc: Xiaoyun Wang Signed-off-by: Ariel Otilibili Acked-by: S

[PATCH v4 4/6] net/failsafe: remove check around pthread_mutex_init()

2025-01-13 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Cc: Gaetan Rivet Signed-off-by: Ariel Otilibili Acked-by: Stephen Hem

[PATCH v4 3/6] common/cnxk: remove check around pthread_mutex_init()

2025-01-13 Thread Ariel Otilibili
ao Cc: Harman Kalra Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger --- drivers/common/cnxk/roc_bphy_cgx.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c index 4f43605e1031..882cf654743b

[PATCH v4 2/6] net/bnxt: remove check around pthread_mutex_init()

2025-01-13 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Cc: Ajit Khaparde Cc: Somnath Kotur Signed-off-by: Ariel Otilibili Ac

[PATCH v4 1/6] raw/ifpga: remove check around pthread_mutex_init()

2025-01-13 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Cc: Rosen Xu Signed-off-by: Ariel Otilibili Acked-by: Stephen Hem

[PATCH v4 0/6] remove check around pthread_mutex_init()

2025-01-13 Thread Ariel Otilibili
returns into tail calls * reworded the cover letter v3 (https://inbox.dpdk.org/dev/20250112202021.179634-1-otili...@eurecom.fr/) * fix style issues v2 (https://inbox.dpdk.org/dev/20250112193043.67372-1-otili...@eurecom.fr/) * fix build issues v1 (https://inbox.dpdk.org/dev/20250112185842.9752-1

[PATCH 1/1] eal/linux: Remove unused values

2025-01-13 Thread Ariel Otilibili
rse and process") Signed-off-by: Ariel Otilibili --- lib/eal/linux/eal_dev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c index e63f24d108c7..be97f56424de 100644 --- a/lib/eal/linux/eal_dev.c +++ b/lib/eal/linux/eal_de

[PATCH 0/1] eal/linux: Remove unused values

2025-01-13 Thread Ariel Otilibili
Hello, This patch clears out a static analysis warning. Your feedback is much appreciated, Ariel Otilibili (1): eal/linux: Remove unused values lib/eal/linux/eal_dev.c | 3 --- 1 file changed, 3 deletions(-) -- 2.30.2

[PATCH v3 1/6] raw/ifpga: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/raw/ifpga/base/opae_intel_max10.c

[PATCH v3 4/6] net/failsafe: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/net/failsafe/failsafe.c | 6 +--

[PATCH v3 5/6] net/hinic: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/net/hinic/base/hinic_compat

[PATCH v3 6/6] lib/vhost: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- lib/vhost/socket.c | 14 ++

[PATCH v3 3/6] common/cnxk: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/common/cnxk/roc_bphy_cgx.c | 5 +-

[PATCH v3 2/6] net/bnxt: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/net/bnxt/bnxt_ethdev.c

[PATCH v3 0/6] remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
ux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 --- v3 * fix style issues v2 (https://inbox.dpdk.org/dev/20250112193043.67372-1-otili...@eurecom.fr/) * fix build issues v1 (https://inbox.dpdk.org/dev/20250112185842.9752-1-otili...@eurecom.fr/#t) Ariel Otilibili (6): raw/ifpga:

[PATCH v2 6/6] lib/vhost: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- lib/vhost/socket.c | 14 ++

[PATCH v2 5/6] net/hinic: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/net/hinic/base/hinic_compat

[PATCH v2 4/6] net/failsafe: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/net/failsafe/failsafe.c | 6 +--

[PATCH v2 3/6] common/cnxk: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/common/cnxk/roc_bphy_cgx.c | 5 +-

[PATCH v2 2/6] net/bnxt: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/net/bnxt/bnxt_ethdev.c

[PATCH v2 1/6] raw/ifpga: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/raw/ifpga/base/opae_intel_m

[PATCH v2 0/6] remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
ux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 --- v2 * fix build issues v1 (https://inbox.dpdk.org/dev/20250112185842.9752-1-otili...@eurecom.fr/#t) Ariel Otilibili (6): raw/ifpga: remove check around pthread_mutex_init() net/bnxt: remove check around pthread_mutex_init()

[PATCH 4/6] net/failsafe: remove check around pthread_mutex_init()

2025-01-12 Thread Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Signed-off-by: Ariel Otilibili --- drivers/net/failsafe/failsafe.c | 6 +--

  1   2   >