DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Shivaji Kant <shivajikant@google.com>
Cc: dev@dpdk.org, Ciara Loftus <ciara.loftus@intel.com>,
	Maryam Tahhan <mtahhan@redhat.com>
Subject: Re: [PATCH v4] net/af_xdp: enable AF_XDP program attachment mode
Date: Tue, 29 Jul 2025 15:10:03 -0700	[thread overview]
Message-ID: <20250729151003.0d046d67@hermes.local> (raw)
In-Reply-To: <20250729161747.894377-1-shivajikant@google.com>

On Tue, 29 Jul 2025 16:17:47 +0000
Shivaji Kant <shivajikant@google.com> wrote:

> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
> index 5f65850a27..9858ac24b2 100644
> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
> @@ -169,6 +169,7 @@ struct pmd_internals {
>  	int queue_cnt;
>  	int max_queue_cnt;
>  	int configured_queue_cnt;
> +	uint mode_flag;
>  	bool shared_umem;
>  	char prog_path[PATH_MAX];
>  	bool custom_prog_configured;

Don't use the typedef uint, it is not what DPDK usually uses.
In types.h these are under "Old compatibility names for C types."

Better to use uint32_t which matches the __u32 arg for bpf_xdp_attach prototype.

I would also prefer that drivers avoid using int for things like
queue count because it can lead to overflow bugs. But that is a different problem.

The pmd_internals could also use some reordering to eliminate padding
and put hot elements in same cache.

  reply	other threads:[~2025-07-29 22:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23  7:42 [PATCH] " Shivaji Kant
2025-07-23 12:30 ` Ivan Malov
2025-07-29  8:24 ` [PATCH v2] " Shivaji Kant
2025-07-29 10:08   ` [PATCH v3] " Shivaji Kant
2025-07-29 14:48     ` Stephen Hemminger
2025-07-29 14:50     ` Stephen Hemminger
2025-07-29 16:17     ` [PATCH v4] " Shivaji Kant
2025-07-29 22:10       ` Stephen Hemminger [this message]
2025-07-30 11:41       ` [PATCH v5] " Shivaji Kant

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=20250729151003.0d046d67@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=mtahhan@redhat.com \
    --cc=shivajikant@google.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).