[PATCH] net/af_xdp: fix external mbuf transmit
David Marchand
david.marchand at redhat.com
Mon Jan 12 08:58:42 CET 2026
Hello,
On Mon, 12 Jan 2026 at 02:04, Stephen Hemminger
<stephen at networkplumber.org> wrote:
> #### Warning (Minor)
>
> **Implicit boolean comparison:** The `RTE_MBUF_DIRECT(mbuf)` macro returns an integer-like value (0 or non-zero). Per DPDK guidelines, explicit comparison with zero is preferred for integers:
>
> ```c
> // Suggested (strict interpretation):
> if (RTE_MBUF_DIRECT(mbuf) != 0 && mbuf->pool == umem->mb_pool) {
> ```
>
> However, this macro is semantically boolean and is commonly used in direct form throughout DPDK. This is a stylistic preference, not a blocking issue.
All callers in DPDK are using this macro as a boolean, and I found no
opensource project doing differently.
I would either fix the macro or change nothing at all.
--
David Marchand
More information about the stable
mailing list