DPDK usage discussions
 help / color / mirror / Atom feed
From: "Kompella V, Purnima" <Kompella.Purnima@commscope.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Lombardo, Ed" <Ed.Lombardo@netscout.com>,
	"users@dpdk.org" <users@dpdk.org>
Subject: RE: tailqs issue
Date: Wed, 26 Mar 2025 14:33:58 +0000	[thread overview]
Message-ID: <DM6PR14MB35970367E4F03CEBA482D8719CA62@DM6PR14MB3597.namprd14.prod.outlook.com> (raw)
In-Reply-To: <20250326071416.4f7a2394@hermes.local>

OK.

Is it possible to declare an enum or a lookup table like "ops_name"(string) and "ops_index" (integer) pair in some common file.
Whether or not an OP is registered in the current build, the OP will always be associated with a fixed ops_index and this way ops_index really becomes shareable (like a database key) across different DPDK processes. 
Anyone contributing a new OP to DPDK must add it to the LOOKUP table. 

Both our Pri and Sec were built on the same code base, listed all the DPDK libs, just that the Makefiles had different order of listing the DPDK libs because Pri and Sec are built by
different teams in our org. 

OPs is not 'user-visible' when creating mempool, create-mempool DPDK API doesn't take OP name as input. 
This makes it very hard to troubleshoot, to find a starting point of where things may have gone wrong.

Just a thought.

Regards,
Purnima
 



-----Original Message-----
From: Stephen Hemminger <stephen@networkplumber.org> 
Sent: Wednesday, March 26, 2025 7:44 PM
To: Kompella V, Purnima <Kompella.Purnima@commscope.com>
Cc: Lombardo, Ed <Ed.Lombardo@netscout.com>; users@dpdk.org
Subject: Re: tailqs issue

CAUTION: This message originated from an External Source outside of CommScope.com. This may be a phishing email that can result in unauthorized access to CommScope. Please use caution when opening attachments, clicking links, scanning QR codes, or responding. You can report suspicious emails directly in Microsoft Outlook.




On Wed, 26 Mar 2025 10:27:40 +0000
"Kompella V, Purnima" <Kompella.Purnima@commscope.com> wrote:

> Hi Stephen
>
> Isn't it possible to gather all the MEMPOOL_REGISTER_OPS (xxx) calls 
> to a separate .c file in the dpdk source code Like say 
> drivers/mempool/common/rte_mempool_ops_reg.c containing below lines
>
> MEMPOOL_REGISTER_OPS(ops_stack);
> MEMPOOL_REGISTER_OPS(ops_lf_stack);
> MEMPOOL_REGISTER_OPS(ops_bucket);
> MEMPOOL_REGISTER_OPS(ops_bucket);
> MEMPOOL_REGISTER_OPS(octeontx_fpavf_ops);

That would be inflexible. Not every build needs all the ops.
If you want to fix, a better approach would be to harden the registration process.

Initializers and destructors are a problematic construct to debug.

      reply	other threads:[~2025-03-26 14:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 17:50 Lombardo, Ed
2025-03-19 20:23 ` Stephen Hemminger
2025-03-19 21:52   ` Lombardo, Ed
2025-03-19 23:16     ` Stephen Hemminger
2025-03-21 18:18       ` Lombardo, Ed
2025-03-24  5:01         ` Lombardo, Ed
2025-03-24 14:59           ` Kompella V, Purnima
2025-03-24 16:39             ` Lombardo, Ed
2025-03-25 10:25               ` Kompella V, Purnima
2025-03-25 14:39                 ` Lombardo, Ed
2025-03-25 22:20                   ` Stephen Hemminger
2025-03-25 22:24                     ` Lombardo, Ed
2025-03-25 22:41                       ` Stephen Hemminger
2025-03-25 22:56                         ` Lombardo, Ed
2025-03-26 10:27                           ` Kompella V, Purnima
2025-03-26 14:14                             ` Stephen Hemminger
2025-03-26 14:33                               ` Kompella V, Purnima [this message]

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=DM6PR14MB35970367E4F03CEBA482D8719CA62@DM6PR14MB3597.namprd14.prod.outlook.com \
    --to=kompella.purnima@commscope.com \
    --cc=Ed.Lombardo@netscout.com \
    --cc=stephen@networkplumber.org \
    --cc=users@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;
as well as URLs for NNTP newsgroup(s).