DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Etelson, Gregory" <getelson@nvidia.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
	 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 20:15:23 +0200 (IST)	[thread overview]
Message-ID: <170e1f75-782e-4717-c5ed-8aecea25132d@nvidia.com> (raw)
In-Reply-To: <Z8sczC2L6zRKvGk4@bricha3-mobl1.ger.corp.intel.com>



On Fri, 7 Mar 2025, Bruce Richardson wrote:

> External email: Use caution opening links or attachments
>
>
> 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?
>

I think that is good idea.
Application can use ether dpdk::raw::* or dpdk::* API depending on internal 
logic.

> /Bruce
>

  reply	other threads:[~2025-03-07 18:15 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
2025-03-07 18:15     ` Etelson, Gregory [this message]
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=170e1f75-782e-4717-c5ed-8aecea25132d@nvidia.com \
    --to=getelson@nvidia.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --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).