[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/rte_eth_af_xdp.c

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

2025-02-01 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, --- v7 * no change * resent because CI didn't take patch-2 into the series v6(https://inbox.dpdk.org/dev/20250131231018.2163893-1-ariel.otilib...@6wind.com/) * added missing

[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 --- .mailmap