From: Gregory Etelson <getelson@nvidia.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Richardson, Bruce" <bruce.richardson@intel.com>,
"owen.hilyard@unh.edu" <owen.hilyard@unh.edu>
Subject: Re: [PATCH] rust: RFC/demo of safe API for Dpdk Eal, Eth and Rxq
Date: Wed, 30 Apr 2025 18:28:49 +0000 [thread overview]
Message-ID: <IA1PR12MB6330872DB96BB9D83EF7EFF2A5832@IA1PR12MB6330.namprd12.prod.outlook.com> (raw)
In-Reply-To: <c5387a8c-b560-3fde-3453-c2478d8e6969@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 2345 bytes --]
Hello Harry,
I've been experimenting with lcore workers.
Please check out the new helloworld example: https://github.com/getelson-at-mellanox/rdpdk/blob/safe-q/examples/helloworld.rs
There are 2 options for the example configuration:
1 Start RDPDK workers on the same cores as EAL:
cargo run --example helloworld -- -a <PCI address> -l 0,1,3,5
2 Start RDPDK workers on dedicated cores:
cargo run --example helloworld -- -a 0000:43:00.0 -l 0,1,3,5 -- -l 2-8
Regards,
Gregory
________________________________
From: Gregory Etelson <getelson@nvidia.com>
Sent: Sunday, April 27, 2025 21:50
To: Van Haaren, Harry <harry.van.haaren@intel.com>
Cc: Gregory Etelson <getelson@nvidia.com>; dev@dpdk.org <dev@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>; owen.hilyard@unh.edu <owen.hilyard@unh.edu>
Subject: Re: [PATCH] rust: RFC/demo of safe API for Dpdk Eal, Eth and Rxq
Hello Harry,
> > I implemented a working echo server with your API.
> > The code is here: https://github.com/getelson-at-mellanox/rdpdk/tree/safe-q
>
> Ah cool! Great to see the API working.
>
> Reviewing the "echo.rs" code, the MbuffMempoolHandle ergonomics can perhaps be improved,
> I'll try work on that and have some API suggestions to the mailing list soon.
>
> I see the echo.rs code uses a normal "std::thread::spawn" (not DPDK lcores), there is
> some design to do here to ensuring that best practices are used;
> - any dataplane threads are registered as lcores (for best performance, mempool caches etc)
> - registered lcores are also unregistered when a thread ends (potentially allowing lcore-id reuse??)
> I haven't thought about this much, but had a brief discussion with Bruce (who is on holidays now).
>
> Suggesting that mempools & lcores are the two next up API sets to "Rustify" :)
>
I see 2 issues with the DPDK lcore API:
Unsafe "extern" lcore callback is not considered as new thread and compiler
will not run arguments Send verifications.
Also lcore arguments use generic 'void *' pointer.
Maybe Rust DPDK library needs native lcore implementation.
Differnet thread agrument types can we wrapped with a macro call.
Example is here:
https://github.com/getelson-at-mellanox/rdpdk/blob/37494bcae1fcf06bb4338519f931c2130105e576/examples/echo.rs#L88
Regards,
Gregory
[-- Attachment #2: Type: text/html, Size: 5890 bytes --]
next prev parent reply other threads:[~2025-04-30 18:28 UTC|newest]
Thread overview: 10+ 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 [this message]
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=IA1PR12MB6330872DB96BB9D83EF7EFF2A5832@IA1PR12MB6330.namprd12.prod.outlook.com \
--to=getelson@nvidia.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--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).