patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>,
	"Morten Brørup" <mb@smartsharesystems.com>
Cc: dev@dpdk.org, stable@dpdk.org,
	Ciara Loftus <ciara.loftus@intel.com>,
	 Maryam Tahhan <mtahhan@redhat.com>,
	Xiaolong Ye <xiaolong.ye@intel.com>,
	 Kevin Laatz <kevin.laatz@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [PATCH] net/af_xdp: fix external mbuf transmit
Date: Mon, 12 Jan 2026 08:58:42 +0100	[thread overview]
Message-ID: <CAJFAV8yvx_eLo9_wBDrzW-G+qiUYftGC1xUdAT6bLeCTVaxcoA@mail.gmail.com> (raw)
In-Reply-To: <20260111170350.6fa88e03@phoenix.local>

Hello,

On Mon, 12 Jan 2026 at 02:04, Stephen Hemminger
<stephen@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


  reply	other threads:[~2026-01-12  7:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 12:54 David Marchand
2026-01-12  1:03 ` Stephen Hemminger
2026-01-12  7:58   ` David Marchand [this message]
2026-01-12 13:59     ` Morten Brørup

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=CAJFAV8yvx_eLo9_wBDrzW-G+qiUYftGC1xUdAT6bLeCTVaxcoA@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    --cc=mb@smartsharesystems.com \
    --cc=mtahhan@redhat.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=xiaolong.ye@intel.com \
    /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).