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 C19C943241; Mon, 30 Oct 2023 14:07:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 569B540285; Mon, 30 Oct 2023 14:07:05 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2051.outbound.protection.outlook.com [40.107.14.51]) by mails.dpdk.org (Postfix) with ESMTP id D591A4026F for ; Mon, 30 Oct 2023 14:07:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fa7/CGjOCdpNfsEZdD0+R677aAwpVJbOVDHfpnbpRQMnPObT+4TYTWNhoHoqgByBaXqrW1Z7yj0fiNaMMu0e1hZwiLjDipAL9LNls0+ryKIUaRFkrizpJQklH2unsayVJyqIcuKEo2Y2g0d0KLEGXF128KHISzVUsdxU/RvISbl8TJOByswH87sBLcPVsCZ4fMirZtViKLl99Kq+R8V/F9UoCh0/4ATmjFaQYup2BaAfX4xgx5FdujrS9JExiDsEYM3X+UhMLkLGfMJN9pdSBz5rk3ZcvGySJL1VbC1G01wMTEkguOYmXv6z40M3awv1CY5mu+RaKA7iOzYv/Xw1Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fgHSXnIJqGxwFBipS9E+WJbwV2FcNmkblPhM/ODY3l4=; b=Cx8p16f3KgPvm1tmpDzfrNzHoZardKPEYFEnxLsyhvUIgOSkW895QD0RdJKyFpDSgwEYB+3Dte4BsAHmrAquQYib+ebzMXRQ6QxhAqLp6L2LQeHPYkw22ixCt5KoCbOumyhUcfGPpj5LK7jE/WtrVNT12R7p+B2gBhaT0aLXGibD8nQz6pik8h9yq6xpVMZbvuZcOxUnzZf3dW/qr7VYa5KZAgrgbN8rb5/tKBqiKz8IsdMb8AnICUGg66skRnpllgr3ho4YxHylX92dMIz92uA/dhztXyd21CRGTdhdX8zRWCMJZkQrfZFarAwdzOzXf0dQDvuZY7Fth8o3SmPpQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fgHSXnIJqGxwFBipS9E+WJbwV2FcNmkblPhM/ODY3l4=; b=FObCuMqhHYmApZYRlu9b26sk14uysEII/c6yzAk0YJ8qZrQIcbQex8sL5m9FyErgDx0Gdj45dcgbfUO7fyryehZlMsVMMHaYDJH6NpfTAFJg7GKlEDCHSOChuhM0QL499/J0l+QEyoV5c4uCd5nCzPFtcbNgYcCXf1qz5bkjGgM= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by AM8PR08MB5746.eurprd08.prod.outlook.com (2603:10a6:20b:1d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.24; Mon, 30 Oct 2023 13:07:02 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::ddec:2015:47d0:4877]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::ddec:2015:47d0:4877%3]) with mapi id 15.20.6933.019; Mon, 30 Oct 2023 13:07:02 +0000 From: Honnappa Nagarahalli To: =?iso-8859-1?Q?Morten_Br=F8rup?= , Harman Kalra , Anatoly Burakov , David Hunt CC: "dev@dpdk.org" , nd , nd , nd Subject: RE: How to rte_epoll_wait for IPC? Thread-Topic: How to rte_epoll_wait for IPC? Thread-Index: Adn4PGUtGWTIu5zhQqCKF/jptdJoNQALNZPgAACuUcAEsWWzAA== Date: Mon, 30 Oct 2023 13:07:01 +0000 Message-ID: References: <98CBD80474FA8B44BF855DF32C47DC35E9EF02@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35E9EF08@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9EF08@smartserver.smartshare.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: C7FC11C957676D4AB0629F9E8EF973F3.0 x-checkrecipientchecked: true authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DBAPR08MB5814:EE_|AM8PR08MB5746:EE_ x-ms-office365-filtering-correlation-id: e46d5e69-89ac-4cd2-685d-08dbd9491b78 nodisclaimer: true x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bRJFu5PVzGHRKc/cRETiG738IUIGKmNqJ1SL3G/XjpfnB3+GTKxKAPPIai9cTl6m6yUsvSwChdmLz4xvTTrcUAUqPHoBG9jqLIxmqp0DwX6jo520OrRJfD8KBVZ+0+8EGDBgq7abDPOyEomUobXBQWrc4FDVq7CK9O4rYlLaS2LcJffJlScRGK4pLwF8aNDs3XKVjKyFu1VMxLuwn1X7AUjGungfxr3QP43IGKLcYxgdLRx7FAAHAOgt+ArhEqSarG/4xylrTn7VI/6iUNDo5dxzfgCTYVS9eoukqNImoBwkr9qzl5kpFA40vEgLZSD7XbuA3cIl8KZj/yI3LtP/LXW3PuW+VQ78Wub7pskf+Us7C2xtlLN5YanqA/byZCnrevsxqDykVEIDH+NSEMmY1ZNCLPJD8UVozVNzkqUwnnlCT6D+392+Gz4Tm9/Y6ItIScFdoKcWBN9zBOltKaXpHus+vck9UiH30i2e1G5gIG8vgf2ZIutkrpNAU5R1W1XiFAkNoFdLDDk9ojSPNlpdYZzte5sUPEfFEC2tgCF3UiF91mI9+ePRSixgJGlqYd5yTIktrcrtbcJZ8rFINivm0h6aNTb87PUrFm++Fnt+hf7m+oVMqKphKmygxByPU4eG x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(396003)(136003)(39860400002)(366004)(346002)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(55016003)(71200400001)(9686003)(53546011)(6506007)(7696005)(66574015)(83380400001)(38070700009)(316002)(5660300002)(64756008)(110136005)(54906003)(41300700001)(66476007)(66556008)(66946007)(76116006)(66446008)(8676002)(122000001)(86362001)(52536014)(8936002)(4326008)(38100700002)(33656002)(478600001)(26005)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?k5OmgKLFXwwe+FZd6Fpyfp818kTU6iPcZd4K/4Jyw4uw6BvfUuxynpCF0G?= =?iso-8859-1?Q?Y4uymfxNfE6PDAlAg8YyjundrrKHgNavaTe9Zi88k6xiOExC1fYFaVp/44?= =?iso-8859-1?Q?x+vzhLd9MYsy8+rorRW1ZkMhqukPEfJe5MJEK6fQQiMl7OfCjP82wPD3L0?= =?iso-8859-1?Q?XWykPZCZjkemgSUyx7ZPUzeTB86VIL4TfZRRsYqw77Y5EL+0DZMC/3ehFX?= =?iso-8859-1?Q?N2PjVbGHUzISExjaxj/2D4z8XA5wXwYnJERzHT7iK9rJAuoVZZCwPD+wcU?= =?iso-8859-1?Q?gAwi9bVv0Jz8k2njWNFED0ZJSkSQL8n9bT320LNzK69Fli9HQowAmjVF+S?= =?iso-8859-1?Q?+MHlHB8My3nruX7veKFC1JYHj9b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MrSdjo84qzMwyKxllt9OmUW/sfZJ7FfWp88F0jdQ8B2cfTh/?= =?iso-8859-1?Q?vn/XchA+9y3426bhSwLApXqCcy18iyJ03be2HBXezWYgmxJ5ttoT+D24Yc?= =?iso-8859-1?Q?4FPQX/kYQ7qJpdHQuO4cTtwCTj/ykNMj3tMH/JTzWhWIgJPyyE0wNVXCpy?= =?iso-8859-1?Q?xEHiGqRCc1pG08f0GlIHWCM7dxBB2eguQ3LuEAxKWIySSFoodC/8MpCiE9?= =?iso-8859-1?Q?XdL3SfGzmYJRKFwFDpe3sW9/keKOxQ1+jWzOKjzbpYO36Pk0Xe9zgEL+Hn?= =?iso-8859-1?Q?1zlIIQEuCNlwhU7ixjTWpdZpNiOwSwlSdcguL1MLdCG8QVgEHI95AFhcBR?= =?iso-8859-1?Q?7Pjw9mjVMf5P67tcBexPM+z+eYrRuNSRYiif6Y/fA5vqVRB2QzUZadjA?= =?iso-8859-1?Q?=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DBAPR08MB5814.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e46d5e69-89ac-4cd2-685d-08dbd9491b78 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2023 13:07:01.9228 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: B1HCF5m5Jwcmb7WTqQuAWZm0n+Br3oIdrElbr0pWslmuLE/i+TY0dBMwfrZEQ31wDGJcUDpiHVQV6ey9INUZv6YHSPGD/e0zQ9DBRi7yP80= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5746 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 > -----Original Message----- > From: Morten Br=F8rup > Sent: Friday, October 6, 2023 10:53 AM > To: Honnappa Nagarahalli ; Harman Kalra > ; Anatoly Burakov ; David > Hunt > Cc: dev@dpdk.org; nd ; nd > Subject: RE: How to rte_epoll_wait for IPC? >=20 > > From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com] > > Sent: Friday, 6 October 2023 17.27 > > > > > 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. >=20 > Thank you for the suggestion, Honnappa. >=20 > rte_wait_until_equal_xx would be an excellent solution for physical appli= ances. >=20 > However, I am looking for O/S level sleeping, like epoll(), so the hyperv= isor can > detect that the thread is idle. (I should have mentioned this!) WFE is trapped by the hypervisor if there are multiple vCPUs mapped to the = same physical core and another vCPU is allowed to run. If there is only one vCPU mapped, then hypervisor does not trap it. This al= lows the CPU to go to low power state. >=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