From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9BB34426D3; Fri, 6 Oct 2023 17:53:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D82E402C8; Fri, 6 Oct 2023 17:53:21 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 8EF06402B9 for ; Fri, 6 Oct 2023 17:53:19 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 701A320424; Fri, 6 Oct 2023 17:53:18 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: How to rte_epoll_wait for IPC? Date: Fri, 6 Oct 2023 17:53:15 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9EF08@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to rte_epoll_wait for IPC? Thread-Index: Adn4PGUtGWTIu5zhQqCKF/jptdJoNQALNZPgAACuUcA= References: <98CBD80474FA8B44BF855DF32C47DC35E9EF02@smartserver.smartshare.dk> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Honnappa Nagarahalli" , "Harman Kalra" , "Anatoly Burakov" , "David Hunt" Cc: , "nd" , "nd" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com] > Sent: Friday, 6 October 2023 17.27 >=20 > > From: Morten Br=F8rup > > 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!) >=20 > > > > > > 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=F8rup