All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Harman Kalra" <hkalra@marvell.com>,
	"Anatoly Burakov" <anatoly.burakov@intel.com>,
	"David Hunt" <david.hunt@intel.com>
Cc: <dev@dpdk.org>
Subject: How to rte_epoll_wait for IPC?
Date: Fri, 6 Oct 2023 12:03:46 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9EF02@smartserver.smartshare.dk> (raw)

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?


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


             reply	other threads:[~2023-10-06 10:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 10:03 Morten Brørup [this message]
2023-10-06 15:27 ` How to rte_epoll_wait for IPC? 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
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=98CBD80474FA8B44BF855DF32C47DC35E9EF02@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 \
    /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.