DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nitin Saxena <nsaxena16@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>,
	Nitin Saxena <nsaxena@marvell.com>,
	 Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Robin Jarry <rjarry@redhat.com>,
	 Christophe Fontaine <cfontain@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>
Subject: Re: [EXTERNAL] Re: [PATCH 1/2] node: add global node mbuf dynfield
Date: Mon, 7 Apr 2025 11:31:53 +0530	[thread overview]
Message-ID: <CAG6-93xN69Lzehnq3q=DpMxU11+qn-1a+q_ohhArQa+E=X8aow@mail.gmail.com> (raw)
In-Reply-To: <20250404082138.11549962@hermes.local>

Hi Stephen,

Thanks,
Nitin

On Fri, Apr 4, 2025 at 8:51 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Fri, 4 Apr 2025 08:11:07 +0000
> Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com> wrote:
>
> > > Hi Stephen,
> > >
> > > Thanks for commenting. See response inline.
> > >
> > > Regards,
> > > Nitin
> > >
> > > On Tue, Apr 1, 2025 at 7:45 PM Stephen Hemminger
> > > <stephen@networkplumber.org> wrote:
> > > >
> > > > On Tue, 1 Apr 2025 09:50:46 +0530
> > > > Nitin Saxena <nsaxena@marvell.com> wrote:
> > > >
> > > > > +int rte_node_mbuf_dynfield_register(void)
> > > > > +{
> > > > > +     struct node_mbuf_dynfield_mz *f = NULL;
> > > > > +     const struct rte_memzone *mz = NULL;
> > > > > +     int dyn_offset;
> > > > > +
> > > > > +     RTE_BUILD_BUG_ON(sizeof(rte_node_mbuf_dynfield_t) <
> > > RTE_NODE_MBUF_DYNFIELD_SIZE);
> > > > > +     RTE_BUILD_BUG_ON(sizeof(rte_node_mbuf_overload_fields_t) <
> > > > > +                      RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE);
> > > > > +
> > > > > +     mz =
> > > rte_memzone_lookup(NODE_MBUF_DYNFIELD_MEMZONE_NAME);
> > > >
> > > > Seems wasteful to have a whole memzone for this, the data is small.
> > > > Is there a reason it could not just be a global variable like timestamp.
> > > >
> > > Replaced usage of memzone with global variable in v2
> >
> > We need to use memzone to share the offset between primary and secondary
> > processes I don’t see any other way.
>
>
> Normally secondary just uses dynamic field lookup to find the offset.

rte_node_mbuf_dynfield_register() is doing both: register_offset() +
lookup_offset()
Very first call to rte_node_mbuf_dynfield_register() actually
registers dynamic offset for the buffer. All subsequent calls returns
offset based on what was registered earlier

Since secondary process support is required, should I bring back
memzone based implementation? since global variable would not work

  reply	other threads:[~2025-04-07  6:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  4:20 [PATCH 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-01  4:20 ` [PATCH 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-01 14:15   ` Stephen Hemminger
2025-04-03 10:27     ` Nitin Saxena
2025-04-04  8:11       ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2025-04-04 15:21         ` Stephen Hemminger
2025-04-07  6:01           ` Nitin Saxena [this message]
2025-04-01  4:20 ` [PATCH 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-04-03 10:17 ` [PATCH v2 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-03 10:17   ` [PATCH v2 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-03 10:17   ` [PATCH v2 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-04-04  7:12 ` [PATCH v3 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-04  7:12   ` [PATCH v3 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-04 21:35     ` Stephen Hemminger
2025-04-04  7:12   ` [PATCH v3 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-04-07  7:47 ` [PATCH v4 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-07  7:47   ` [PATCH v4 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-07  7:47   ` [PATCH v4 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena

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='CAG6-93xN69Lzehnq3q=DpMxU11+qn-1a+q_ohhArQa+E=X8aow@mail.gmail.com' \
    --to=nsaxena16@gmail.com \
    --cc=cfontain@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=nsaxena@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=rjarry@redhat.com \
    --cc=stephen@networkplumber.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;
as well as URLs for NNTP newsgroup(s).