DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
Cc: dev@dpdk.org, kishore.padmanabha@broadcom.com, stable@dpdk.org,
	Ajit Khaparde <ajit.khaparde@broadcom.com>
Subject: Re: [PATCH 2/5] net/bnxt: use buf address for external mbuf
Date: Wed, 3 Jun 2026 14:43:07 -0700	[thread overview]
Message-ID: <20260603144307.0b9346a3@phoenix.local> (raw)
In-Reply-To: <20260603211341.2112344-3-Mohammad-Shuab.Siddique@broadcom.com>

On Wed,  3 Jun 2026 15:13:38 -0600
Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com> wrote:

> +static inline uint64_t
> +bnxt_mbuf_buf_addr(const struct rte_mbuf *mb)
> +{
> +	return (uint64_t)mb->buf_addr + mb->data_off;
> +}

Why are you reinventing this?

/**
 * A macro that points to an offset into the data in the mbuf.
 *
 * The returned pointer is cast to type t. Before using this
 * function, the user must ensure that the first segment is large
 * enough to accommodate its data.
 *
 * @param m
 *   The packet mbuf.
 * @param o
 *   The offset into the mbuf data.
 * @param t
 *   The type to cast the result into.
 */
#define rte_pktmbuf_mtod_offset(m, t, o)	\
	((t)(void *)((char *)(m)->buf_addr + (m)->data_off + (o)))

  reply	other threads:[~2026-06-03 21:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 21:13 [PATCH 0/5] net/bnxt: interrupt handling, external mbuf and stability fixes Mohammad Shuab Siddique
2026-06-03 21:13 ` [PATCH 1/5] net/bnxt: fix NQ/CQ processing for interrupt handling Mohammad Shuab Siddique
2026-06-03 21:43   ` Stephen Hemminger
2026-06-03 21:13 ` [PATCH 2/5] net/bnxt: use buf address for external mbuf Mohammad Shuab Siddique
2026-06-03 21:43   ` Stephen Hemminger [this message]
2026-06-03 21:13 ` [PATCH 3/5] net/bnxt: fix IOVA range check for external mbuf head node Mohammad Shuab Siddique
2026-06-03 21:13 ` [PATCH 4/5] net/bnxt: prevent a potential segfault Mohammad Shuab Siddique
2026-06-03 21:13 ` [PATCH 5/5] net/bnxt: fix for segmentation fault that would occur on exit Mohammad Shuab Siddique

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=20260603144307.0b9346a3@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kishore.padmanabha@broadcom.com \
    --cc=mohammad-shuab.siddique@broadcom.com \
    --cc=stable@dpdk.org \
    /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