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 0082A45EBA; Mon, 16 Dec 2024 09:11:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D2DC40261; Mon, 16 Dec 2024 09:11:05 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id DEF714025A; Mon, 16 Dec 2024 09:11:03 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BG7CvVW019796; Mon, 16 Dec 2024 00:10:58 -0800 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 43hadjrhja-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Dec 2024 00:10:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mHMPRrqOGNiuPHRH5vy0y6+C9dqrBxz+xVfbopSfWbUnVz5/lkoa3Ib8SDjRuLHKN3n00M6Fjd8uqg6bBpLjdukmDbn5GJW9E6Ts3FM9QuSqJvkv1Tn95gdP8BZ6RBFxDmCShn1QwIuw3nLdx3mYjBM02zYD0aJ85wbaf15V+a76lqFD+BROWMNWLz+1OmtnktYDyOXPEfgogqZNN3pNRJ5dN1nl3LpJXnz+piGFLGcDEKuXboNW689W0jJwaP04vA3H6fHbyY66WJpCdhuAVbka59t57rBrVfw7EXKYbY5nF2JphQL/tsV7rotDwNnTDhZlurt6g+GnDRa4tEOCug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=C+ljm6lwacJuXGp4PHlpI7bqemmZ0NhWPUFKpOKyiAc=; b=TbC6LChS6xat+MfSb7b7J1GfMZCeJ2FkCtc/C7F/1/dI+HvRN4128Xlt6n2zjSyMRSxYZmNcgZaX3MuEBj58QoiWcPKDZSlLa51XIen0Lt2Ybu4K87HmhSv0W1n0mxzK/ii9yuVxsnVse4F+ofBDRHGlwPv4J3W5Wjv35/dzB8VecpdUBrjmovOTEtXI/7QcB/wuXgTYP1teEMjFjGFKwCGuiIS4XLDg5b1/UvwURbgHBBLF4XoKHP0zO+eYuem4SXCIKJgTOCfjlDMxRsHf6TtPwa17ahY2UascvkD+y83lfPDuw4VuaenY1/RG6SwZbNkcgLpbv5vqSW+9JJV5Wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C+ljm6lwacJuXGp4PHlpI7bqemmZ0NhWPUFKpOKyiAc=; b=lsl43DdnVazlDlUTRn0bseMg0u8m37UAdGs9V6TEm2cGAyLc/SOgyfUl3rNNK5tiRQ7jwHsmt/sVCI1fvLabmOQ35YhvAoji8W3C+4DE+8+OtGWyPy8997bgwEMXYBNfxr2jzMvfnayXic4DUeFcWU+P5eB/5ZOmv06RwxjA8VE= Received: from BY3PR18MB4785.namprd18.prod.outlook.com (2603:10b6:a03:3cc::18) by CH0PR18MB4195.namprd18.prod.outlook.com (2603:10b6:610:be::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 08:10:55 +0000 Received: from BY3PR18MB4785.namprd18.prod.outlook.com ([fe80::4f9f:e101:dad7:c576]) by BY3PR18MB4785.namprd18.prod.outlook.com ([fe80::4f9f:e101:dad7:c576%4]) with mapi id 15.20.8251.015; Mon, 16 Dec 2024 08:10:55 +0000 From: Jerin Jacob To: Robin Jarry , Nitin Saxena , "dev@dpdk.org" , "grout@dpdk.org" CC: David Marchand , Christophe Fontaine , Nitin Saxena , Zhirun Yan , Pavan Nikhilesh Bhagavatula Subject: RE: [EXTERNAL] graph: dispatch mode with libevent for control plane Thread-Topic: [EXTERNAL] graph: dispatch mode with libevent for control plane Thread-Index: AQHbShyek9QbQIxuzkK7qacWfxq1h7Lohj2Q Date: Mon, 16 Dec 2024 08:10:55 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY3PR18MB4785:EE_|CH0PR18MB4195:EE_ x-ms-office365-filtering-correlation-id: 1d65a7d4-b065-4d14-e78f-08dd1da92a5a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?dW5mTHBZNkpRMHlMbGRQdU1OZzgzOHk4aldocjdqbDRnUTNYeTVIVjNrUTVZ?= =?utf-8?B?cTlaeVhUU21oa1FSMVJnRmVwaGFybm10SStIeGcvTmFWa1BCekFqY0lNTHNj?= =?utf-8?B?ZDhWYkhGaGVHZXNaWks3MlNsbXNja1YwMTFQUWU2Nm5EOTl1NGdxaENlbWpt?= =?utf-8?B?YVNKV2pVVWRMOXY3NUpVcjFYTzBIdGRnNkxzOG96d1prV0FPOEFVZFpMWnRs?= =?utf-8?B?b3ovck1BZnVhS0laZjBIZHJEdkdRVnBFdTkyTG8zV3VaZzIrZWV6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NrNDNVWDRLU1lGNFdkNEp1Z3ZFb09q?= =?utf-8?B?SzB2Z2p2ZkdjRVhQUE9LQjVCczRZUWsrdm9qbURSaS9oamhIcWxBa3FOb3F2?= =?utf-8?B?akE1TFJCU1gwekE3ckJhZUMrS3NuQmFZTjlGWFhsL0N3ZThzbjU5a3IwMXha?= =?utf-8?B?WGZtUzFSNXNBSFFrbUFta3NCSWhYYkRaWFJKeGlGa1Q1Qm9FUU1SSHJ5L3M3?= =?utf-8?B?RC9BQ1FJQ1VIa1VrNERZaXZBUWxPZlQ0WW9JOGZOK00xSkhyenFKVExyM2lz?= =?utf-8?B?dVBsQmNLTGxjdmlkUC9tRFM0OUZ3OE1iQ2xOaFlKZE9VeE5JRjNyN1ZKOCs1?= =?utf-8?B?dWhiT3BrT1JKRmI5dUQ4a3pPamx4UW1HQU5wb0Nwc1Z2K1NOUHg5WFBsT3Bz?= =?utf-8?B?OElpclhsUU9NTDN0cTJXOUpqZ0p1eUpTd1ZLTjF0T0xOd2FTZEUybU1FR1BY?= =?utf-8?B?K05QSDd5T1gvRGNuaXgyTXpTQmowSldIdlM2VUcvSk9GUXh6em9TdTNkbW40?= =?utf-8?B?WlpBT2JzdklpVnVKOW5hWEFYRkhsSlhFQlVBS2ZMS2tWSVAxSDMxY3NOSmpU?= =?utf-8?B?M29uVHh3TnByVC9udW1QWVdjSlRvTFpkNkpzaElvWUhVb0FiNjZ0eVIzQXJj?= =?utf-8?B?OXpxN0VWRE5mSFFxUmZ2MWdlZkRNTURQNXlGMnBxVThPb3EyZXhnWFdJVlhC?= =?utf-8?B?cnRzMWFmVHZIN05ZLzFSMmJsa3h2WHRvVW9jMFpZRzMrSnc9PQ==?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY3PR18MB4785.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1102; x-ms-ex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utf-8?B?ejBnMTEyNXpROWF3VEVnNEtYcFJ1bHU1UnVUT3Y1eUZ0NWhkZ3VRSmlYTnAy?= =?utf-8?B?eTN3NzE1YWdSRm00MlVtNHBqdlpnSTRPZTFBTE9jRVlrR084KzJzQ0lFOXNW?= =?utf-8?B?cFJUWC9ycnRrSmxKZHpEd2dKY1ZVT1lGVTlWSm1tb2lMMFhpbFZ6cXl2ejJr?= =?utf-8?B?dUV6NGpBNXNud3ZoMGE5eUZ2WkU3NUFsWXVIdkUwSjV3b3NGRW9vVU1UaGU5?= =?utf-8?B?QW1yUHJVbUFhZlRGbWJ0SGhIRGVCc0pqemxtWjFhbktEQU5yNDEyU1pYRzlV?= =?utf-8?B?enlGSWxIN04vYVdYSWV3aFQvUVk0WHAwZklQcGlZOTAyL2U1QVBiME1ydjlu?= =?utf-8?Q?zzC0nArxxmXiXs2Mg3mad/1y3?= MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY3PR18MB4785.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d65a7d4-b065-4d14-e78f-08dd1da92a5a X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2024 08:10:55.3389 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5DXtahBhtVmRZya7s32M+an7CrB3Kt+T4kCIQLuP7qD40VjtrgORUYG0JGv+7zwJZK6JMD4Y1V9mXpvVwJIqNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR18MB4195 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: aRdO9fqtWk0O8nnAyrupUtpgkbEfdKTs X-Proofpoint-ORIG-GUID: aRdO9fqtWk0O8nnAyrupUtpgkbEfdKTs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 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: Robin Jarry > Sent: Monday, December 9, 2024 2:58 PM > To: Nitin Saxena ; dev@dpdk.org; grout@dpdk.org > Cc: Jerin Jacob ; David Marchand > ; Christophe Fontaine ; > Nitin Saxena > Subject: [EXTERNAL] graph: dispatch mode with libevent for control plane >=20 > Hi folks, I had a look at the graph dispatch mode and wondered if it coul= d be > adapted to be used with event loops for "slow path" processing. The use c= ase I > have in mind is having lcores dedicated for control plane operations whic= h are > not latency=20 > Hi folks, >=20 > I had a look at the graph dispatch mode and wondered if it could be adapt= ed to > be used with event loops for "slow path" processing. >=20 > The use case I have in mind is having lcores dedicated for control plane > operations which are not latency sensitive. It would be nice to allow dat= a plane > workers to send packets to these lcores while keeping the packets in the = graph. >=20 > The problem I have with this solution for now, is that all CPUs processin= g the > graph with rte_graph_walk_mcore_dispatch() are supposed to do busy pollin= g. > This is not compatible with select/epoll based event loops. >=20 > Would it be possible to have a way for busy-polling threads to signal non= -busy- > polling threads that there are packets waiting for them in the graph ring= ? In > grout, we implemented something outside of the graph using > pthread_cond_signal(). Sorry for delay, I was on business travel. Adding yanzhirun_163@163.com(mcore model maintainer). If I understand it correctly, we need three operations. a)wait object creation. b)wait object waiting instead of polling. c)signal wait object from fastpath to wake up (b) I see two options. Option A: In application (without graph change) 1)call (a) 2) while(1) { Call (b) rte_graph_walk_mcore_dispatch() } 3)Call (c) from fp nodes(Assuming it is out of tree nodes) Option B 1)Call (a) in model create or so 2)Add an option in rte_graph_walk_mcore_dispatch() to call (b) 3)Update rte_.._enqueue() to call (c) after ring enqueue Option B is need if we need inbuilt fp nodes. >=20 > https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > 3A__github.com_DPDK_grout_blob_main_modules_infra_datapath_control- > 5Foutput.c&d=3DDwIFaQ&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3D1DGob4H4rxz6H8uIT > ozGOCa0s5f4wCNtTa4UUKvcsvI&m=3DsctQnRalWyQEGrI4o2UpcCXD8n8qveibIe4C > clcMOUmS7Oi0S7MoVryikpo_ZDh1&s=3DZm- > i7a_D6MFxZO362gYHHe9PtKO_Kr6JeFNlmEHpMCg&e=3D > https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > 3A__github.com_DPDK_grout_blob_main_modules_infra_control_control- > 5Foutput.c&d=3DDwIFaQ&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3D1DGob4H4rxz6H8uIT > ozGOCa0s5f4wCNtTa4UUKvcsvI&m=3DsctQnRalWyQEGrI4o2UpcCXD8n8qveibIe4C > clcMOUmS7Oi0S7MoVryikpo_ZDh1&s=3D09ea7Sa47B5SPe7SjP5zBNMzqem0XzI3 > HnlU-k73N2w&e=3D >=20 > Unless I am mistaken, this does not perform any syscall and does not requ= ire > acquiring any lock. Only the "slow" thread needs to acquire locks and wai= t for > the data path threads to call pthread_cond_signal(). >=20 > This solution can only be used for busy-polling -> epoll-based communicat= ion, > for the other direction epoll-based -> busy-polling there would not need = any > specific signaling required. Only posting the packets to the graph ring w= ould be > enough. >=20 > What do you think? How would you integrate this into rte_graph? What would > the API look like in your opinion? >=20 > Thanks! >=20 > -- > Robin