From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Honnappa Nagarahalli" <Honnappa.Nagarahalli@arm.com>,
"Harman Kalra" <hkalra@marvell.com>,
"Anatoly Burakov" <anatoly.burakov@intel.com>,
"David Hunt" <david.hunt@intel.com>
Cc: <dev@dpdk.org>, "nd" <nd@arm.com>, "nd" <nd@arm.com>
Subject: RE: How to rte_epoll_wait for IPC?
Date: Fri, 6 Oct 2023 17:53:15 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9EF08@smartserver.smartshare.dk> (raw)
In-Reply-To: <DBAPR08MB5814BBD6F7B86CD8CC9E091C98C9A@DBAPR08MB5814.eurprd08.prod.outlook.com>
> From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com]
> Sent: Friday, 6 October 2023 17.27
>
> > From: Morten Brørup <mb@smartsharesystems.com>
> > Sent: Friday, October 6, 2023 5:04 AM
> >
> > Dear Harman, Anatoly and David,
> >
> > I have been looking somewhat into power management, and have a
> question
> > about rte_epoll:
> >
> > Can I use rte_epoll to wait for an event (or interrupt/signal) in one
> EAL thread,
> > generated by another EAL thread?
> >
> > Here's a simple use case with two EAL threads:
> >
> > 1. The "ingress" thread receives its packets from the NICs, filters
> the packets
> > and puts them into a an rte_ring for the "processing" thread. The
> "ingress"
> > thread can sleep and use RX interrupts to wake up, as shown in the
> l3fwd-
> > power example. All good.
> >
> > 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?
> This feature is supported by using rte_wait_until_equal_xx APIs in
> rte_ring.
Thank you for the suggestion, Honnappa.
rte_wait_until_equal_xx would be an excellent solution for physical appliances.
However, I am looking for O/S level sleeping, like epoll(), so the hypervisor can detect that the thread is idle. (I should have mentioned this!)
>
> >
> >
> > In a generic scenario, an EAL thread could be rte_epoll_wait'ing for a
> variety of
> > event sources. This may require a different, more advanced, solution.
> >
> > A solution to the simple use case suffices.
> >
> >
> > PS: I'm using the standard acronym IPC in the subject, although I'm
> asking
> > about Inter Thread Communication, not Inter Process Communication. I'm
> not
> > looking for a multi process solution.
> >
> >
> > Med venlig hilsen / Kind regards,
> > -Morten Brørup
next prev parent reply other threads:[~2023-10-06 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 10:03 How to rte_epoll_wait for IPC? Morten Brørup
2023-10-06 15:27 ` Honnappa Nagarahalli
2023-10-06 15:53 ` Morten Brørup [this message]
2023-10-30 13:07 ` Honnappa Nagarahalli
2023-10-06 16:03 ` Stephen Hemminger
2023-10-06 16:28 ` Morten Brørup
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=98CBD80474FA8B44BF855DF32C47DC35E9EF08@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=anatoly.burakov@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=nd@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.