From: Bruce Richardson <bruce.richardson@intel.com>
To: Gregory Etelson <getelson@nvidia.com>
Cc: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"owen.hilyard@unh.edu" <owen.hilyard@unh.edu>
Subject: Re: [PATCH] rust: RFC/demo of safe API for Dpdk Eal, Eth and Rxq
Date: Fri, 2 May 2025 16:57:49 +0100 [thread overview]
Message-ID: <aBTrfeHginZgVGwS@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <IA1PR12MB6330B75B3A6E4781EB147F78A58D2@IA1PR12MB6330.namprd12.prod.outlook.com>
On Fri, May 02, 2025 at 03:41:33PM +0000, Gregory Etelson wrote:
> Hello Bruce & Harry,
>
> There is an aspect we've not discussed yet.
>
> DPDK is a framework. It's integrated into a network application.
>
> From the application perspective what is a ratio between "pure"
> application code and DPDK API ?
> The exact numbers differ, but it's clear that most of application code
> is not about DPDK.
>
> Another question to consider - what is more complicated
>
> rewrite entire application from C to Rust or, while having Rust
> application, upgrade or even replace DPDK API ?
>
> DPDK provides a solid framework for both stability and performance.
>
> In my opinion, binding DPDK as it is today with Rust can significantly
> improve application design.
>
I would have initially agreed with that assertion. However, "binding DPDK
as it is today with Rust" has already been done many times and never got
any real traction that I have seen. Just look at the number of crates
coming up when you search crates.io for DPDK[1] - and from a quick scan,
many of these are not crates using DPDK, but wrappers around DPDK as it is
now (or was a couple of years ago!).
Given that it's been attempted so many times before, I really don't see the
value in doing it "one more time". If we want to offer support for DPDK
through rust, we need to offer something different and better. Any rust
developer can already use bindgen to wrap DPDK themselves.
That's why I'm trying to see how we can offer something that will be longer
term maintainable and usable from rust - rather than just exposing the C
APIs. For maintainability we don't want to expose anything that's not
absolutely necessary, and for usability we don't want to expose anything
that may conflict with what is already there is rust, and for both
maintainablity and usability we only should expose that which can't already
be done in rust itself or in an existing crate. So I'd view (almost) all
thread-management, and most of what EAL provides as not to be exposed to
Rust, because Rust already has other ways of doing all that. Similarly for
the non-device management libs (i.e. those not like ethdev), functionality
for rib/fib/packet rordering/etc. are all better handled by separate crates
than by wrapping DPDK.
Furthermore, I also tend to be skeptical of the longer-term maintenance of
anything that is outside the DPDK repo itself. That's why in my initial
RFC, I looked to add to the DPDK repo the minimum hooks needed to make the
repo itself a rust crate, rather than having a rust crate that pulls in and
wraps DPDK. (Again, there are already a handful of those for users to
choose from!)
Just my 2c., and where I am coming from.
/Bruce
[1] https://crates.io/search?q=dpdk
next prev parent reply other threads:[~2025-05-02 15:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 15:10 Harry van Haaren
2025-04-17 18:58 ` Etelson, Gregory
2025-04-18 11:40 ` Van Haaren, Harry
2025-04-20 8:57 ` Gregory Etelson
2025-04-24 16:06 ` Van Haaren, Harry
2025-04-27 18:50 ` Etelson, Gregory
2025-04-30 18:28 ` Gregory Etelson
2025-05-01 7:44 ` Bruce Richardson
2025-05-02 12:46 ` Etelson, Gregory
2025-05-02 13:58 ` Van Haaren, Harry
2025-05-02 15:41 ` Gregory Etelson
2025-05-02 15:57 ` Bruce Richardson [this message]
2025-05-03 17:13 ` Owen Hilyard
2025-04-18 13:23 ` [PATCH 1/3] " Harry van Haaren
2025-04-18 13:23 ` [PATCH 2/3] rust: split main into example, refactor to lib.rs Harry van Haaren
2025-04-18 13:23 ` [PATCH 3/3] rust: showcase port Rxq return for stop() and reconfigure Harry van Haaren
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=aBTrfeHginZgVGwS@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=owen.hilyard@unh.edu \
/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).