From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: "Harman Kalra" <hkalra@marvell.com>,
"Anatoly Burakov" <anatoly.burakov@intel.com>,
"David Hunt" <david.hunt@intel.com>, <dev@dpdk.org>,
<honnappa.nagarahalli@arm.com>, <nd@arm.com>
Subject: RE: How to rte_epoll_wait for IPC?
Date: Fri, 6 Oct 2023 18:28:10 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9EF09@smartserver.smartshare.dk> (raw)
In-Reply-To: <20231006090306.0ba9d5e6@hermes.local>
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Friday, 6 October 2023 18.03
>
> On Fri, 6 Oct 2023 12:03:46 +0200
> Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > 2. The "processing" thread receives its packets from the rte_ring.
> This thread should sleep until packets are ready for it in the rte_ring.
> >
> > The "ingress" thread knows when it puts packets into the rte_ring, so
> it can signal that event to the "processing" thread, to wake it up;
> either as an interrupt/signal, or through a file descriptor. Is this
> supported by rte_epoll (or other DPDK APIs), and how?
>
> When having to do this in applications, I used a eventfd() as well as
> the rte ring.
> The ingress write's to eventfd and the other thread used epoll on the
> fd.
>
> Optimized this by having the ingress thread only signal via write if
> ring was in empty state.
> And the reader thread only needs to do (epoll/read) if ring became empty
> during last cycle;
> i.e num packets from rte_ring_burst() was 0.
>
> Basically, when using epoll and other SW event models, you need to turn
> all data sources
> into file descriptors.
This sounds exactly like what I am looking for.
Are there DPDK APIs for eventfd(), so I can use them with rte_epoll_wait?
next prev parent reply other threads:[~2023-10-06 16:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 10:03 Morten Brørup
2023-10-06 15:27 ` Honnappa Nagarahalli
2023-10-06 15:53 ` Morten Brørup
2023-10-30 13:07 ` Honnappa Nagarahalli
2023-10-06 16:03 ` Stephen Hemminger
2023-10-06 16:28 ` Morten Brørup [this message]
2023-10-06 17:04 ` Stephen Hemminger
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=98CBD80474FA8B44BF855DF32C47DC35E9EF09@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=anatoly.burakov@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=nd@arm.com \
--cc=stephen@networkplumber.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).