DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: Gregory Etelson <getelson@nvidia.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"mkashani@nvidia.com" <mkashani@nvidia.com>
Subject: Re: [PATCH] rust: support DPDK API
Date: Fri, 7 Mar 2025 16:20:28 +0000	[thread overview]
Message-ID: <Z8sczC2L6zRKvGk4@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <PH8PR11MB6803599C6A152CD6B70465A7D7D52@PH8PR11MB6803.namprd11.prod.outlook.com>

On Fri, Mar 07, 2025 at 03:54:33PM +0000, Van Haaren, Harry wrote:
> > From: Gregory Etelson <getelson@nvidia.com>
> > Sent: Thursday, March 6, 2025 1:37 PM
> > To: dev@dpdk.org <dev@dpdk.org>
> > Cc: getelson@nvidia.com <getelson@nvidia.com>; thomas@monjalon.net <thomas@monjalon.net>; mkashani@nvidia.com <mkashani@nvidia.com>; Richardson, Bruce <bruce.richardson@intel.com>
> > Subject: [PATCH] rust: support DPDK API
> 
<snip>

> +
> > +use dpdklib::rte_ethdev::{
> 
> As per first reply, I'd like to see the end-result safe-Rust namespacing be shortened.
> 
> This can be easily done by renaming the name= in Cargo.toml, and
> removing the "rte_" prefix at bindgen output stage for each file.
> dpdk::ethdev:: { RTE_ETH_NAME_MAX_LEN, ... };
> 
> Perhaps its a good method to put the generated (unsafe, raw-C-bindings) in this
> namespace, and build a safe crate (with the dpdk::ethdev::* namespacing) over it.
> Thoughts?
> 

I love naming discussions :-)

+1 to separate namespaces for low-level DPDK wraps, and more rustic
higher-level APIs. However, that doesn't mean that the names get to be
ugly! Let's definitely remove the "lib" in dpdklib (or libdpdk), and the
"rte_" prefix from libs.

How about having "dpdk::raw::*" e.g. "dpdk::raw::ethdev" for low-level
wraps and "dpdk::*" e.g. "dpdk::ethdev" for higher level apis?

/Bruce

  reply	other threads:[~2025-03-07 16:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 13:37 Gregory Etelson
2025-03-06 19:26 ` Van Haaren, Harry
2025-03-07 16:56   ` Etelson, Gregory
2025-03-07 15:54 ` Van Haaren, Harry
2025-03-07 16:20   ` Bruce Richardson [this message]
2025-03-07 18:15     ` Etelson, Gregory
2025-03-07 18:00   ` Etelson, Gregory
2025-03-08 14:28 ` Igor Gutorov
2025-03-08 19:14   ` Etelson, Gregory
2025-03-08 18:50 ` [PATCH v2] rust: support raw " Gregory Etelson

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=Z8sczC2L6zRKvGk4@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=getelson@nvidia.com \
    --cc=harry.van.haaren@intel.com \
    --cc=mkashani@nvidia.com \
    --cc=thomas@monjalon.net \
    /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).