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 F2C574235C; Wed, 11 Oct 2023 09:22:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF6134067B; Wed, 11 Oct 2023 09:22:22 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2054.outbound.protection.outlook.com [40.107.8.54]) by mails.dpdk.org (Postfix) with ESMTP id 6066740647; Wed, 11 Oct 2023 09:22:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AT/q1AqioKTj1wRC78HsAwkawbpF+71BlQT7aOn5nWRhfY3NT9I5GP70YG3tys0/fpLuXpxSrswST4h+6r5XBk9vrXC5W4aa0YV2C3w0dZNrPqX8daZcW5zCBu8tHeKAVr/M9JOTL/SFx7e+E4mBWVIWoeTsZPSaJ5VfusPHSj/LzoWiz5fnXGDxXo7ODgeITuweRWuWqoedLmWbn6BgJzQicitd9mXHGKmHy9/5tqgd80na/WMhH9iF/6M5+tzid9fkK0ndj5P5s7aYsBbBGrpwrUYor0iUG1ZKyOMtcmG9OFj4jrt8Xte/rCPfaAuzrxa3O2DJNsNA5ljPQSlqAQ== 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=d0hs2zNUgoxMLL6nADbrPH0Q3s2d2W6IoAcKR//a41s=; b=RMg8uE7RNLEPjzSHZdCvQ72Ba0TmcPKtucMiZbaFaJ0ogAWoMzDaB1d0VF/8uqlgT3hD5V47O2Bv3t4jGfFIXS+uG1Md7zk0QVxT77tRkjueeLWRLlizNo42LXUkVjZ/qnbffGZ6YADINZEpdPvTLtQ1mW92jARtLrwN5wHJ3RfQC5WzRO8SFfmNyi8kktJhlDDb8qvr0GeijdlDxmTU3lgSh1TKlPREIP1gJN0woOmvdGqW3/sTN+jqfELczJ/4goZZXLipsGd53Ldo6pMUUj6emZVAQzWq8mkqwdaDTErSZCLID7WTP2Re3btrASttCMDuF0nsz8mz64M9OAxl5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d0hs2zNUgoxMLL6nADbrPH0Q3s2d2W6IoAcKR//a41s=; b=FvazW8sGBMpPrEEIq5lU+4xYpbXGTbHXivftXciV8o6tKgos0/EMDAnLAtuL6f+fjTALGvZslhl0TB9uRX+fpmh2aWsVzLJdf80X0GZ2Qd+3RsPGbdnzutRbuQOMST4VF33vRKfgthuT0RCTmTI6afdlj9RFT5g1cZsOPSEptl8= Received: from AM0PR01CA0123.eurprd01.prod.exchangelabs.com (2603:10a6:208:168::28) by PR3PR07MB6891.eurprd07.prod.outlook.com (2603:10a6:102:75::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.41; Wed, 11 Oct 2023 07:22:20 +0000 Received: from AM3PEPF0000A79B.eurprd04.prod.outlook.com (2603:10a6:208:168:cafe::92) by AM0PR01CA0123.outlook.office365.com (2603:10a6:208:168::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38 via Frontend Transport; Wed, 11 Oct 2023 07:22:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by AM3PEPF0000A79B.mail.protection.outlook.com (10.167.16.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.6838.22 via Frontend Transport; Wed, 11 Oct 2023 07:22:19 +0000 Received: from ESESBMB502.ericsson.se (153.88.183.169) by ESESSMB503.ericsson.se (153.88.183.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.32; Wed, 11 Oct 2023 09:22:19 +0200 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.185) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Wed, 11 Oct 2023 09:22:19 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 3A4761C006A; Wed, 11 Oct 2023 09:22:19 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: , CC: Jerin Jacob , , , , Peter Nilsson , Heng Wang , "Naga Harish K S V" , Pavan Nikhilesh , Gujjar Abhinandan S , Erik Gabriel Carrillo , Shijith Thotton , "Hemant Agrawal" , Sachin Saxena , Liang Ma , Peter Mccarthy , Zhirun Yan , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [PATCH v7 0/3] Add dispatcher library Date: Wed, 11 Oct 2023 09:16:57 +0200 Message-ID: <20231011071700.442795-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231009181711.440865-2-mattias.ronnblom@ericsson.com> References: <20231009181711.440865-2-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM3PEPF0000A79B:EE_|PR3PR07MB6891:EE_ X-MS-Office365-Filtering-Correlation-Id: 46894f35-4d39-4836-062f-08dbca2ace21 X-LD-Processed: 92e84ceb-fbfd-47ab-be52-080c6b87953f,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4G6pA1XazjO70wzZ5BnMPWngUFZmVztdajf8czmGJShkxTwWgyuqKMyooW3ygfUQjj8Uhk1RI5RkrnJkTakWrMPD/C8DCMuJd6nGVT0HTLUANlQa0tx1ZWJpIZyFK1zmUGl9xi3ETl+IDWxx1+rGw+rjWklH+NTv2iY1PuJodtvKjUp4ScMucQsbRRCY+r+GWioB+6ojbvELdfMuZd7kjinzrQw956QdIhS/YsmNM00YswiTKl32NGvx5QF1PZdErdS0Z+LadfuPvpjipjROzhqkYU/Ej72XCYCOwskpeVXcwAaEkneL6j0956HbZNIR0JpV3bQSxBXLYdL/wa+j4W9MYxFdijnHq6R7cCxh4Lh0FPCgdfUZfHqZjqPlKJRJUAnYiNrm4ttHtR3Du7gXFQnynhKm6HoRp4ACgtMfbWtmpqRbaPTFJ9y9Tl5hmlrGQVeACy9Udk6X8HxL4guQ/fpFyKc8qWYBcce9zZcjOjf6umpi1X0cvhGQZhJJg+uLbvy/WDh50usB8BZmsc+v07At+3jjw1FQrErgjSo22MN2V7+U3jkLt0/jg7YaloLxftLJHbd8sHr49nCAOSVXDMJgrkxnX4alzPpiF3p+UIHwMStDDoCUqyd1/Sy0z0GpR3uETMabtDPOUz4h1Vq/vTWIK3K8Pr7Cn65FCvwwWWp6o1svwxqgrKD3BRq4qmIrB+OlBEpJ3B8MJo27Tz+iaEfg49YFnRoSbNo0UeRVmi0bKP1sTzKpfh+CaSJQASzpgtZwc95IHaq02xIQSb74GpTLfn4bxbcS8vJpDjVZ7kKM0ToS/oGRSyoifvgs+CKKC8JPl2iId2RWyca+kM/5QvtanOmSGDhoReJCA723yuA= X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230031)(4636009)(346002)(136003)(396003)(376002)(39860400002)(230922051799003)(451199024)(82310400011)(1800799009)(64100799003)(186009)(46966006)(36840700001)(40470700004)(66574015)(83380400001)(6266002)(40480700001)(8936002)(40460700003)(316002)(82960400001)(356005)(2616005)(36756003)(1076003)(82740400003)(7636003)(2906002)(107886003)(41300700001)(110136005)(86362001)(70586007)(70206006)(5660300002)(54906003)(7416002)(4326008)(8676002)(6666004)(478600001)(336012)(26005)(47076005)(36860700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 07:22:19.8296 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46894f35-4d39-4836-062f-08dbca2ace21 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF0000A79B.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR07MB6891 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 The purpose of the dispatcher library is to decouple different parts of an eventdev-based application (e.g., processing pipeline stages), sharing the same underlying event device. The dispatcher replaces the conditional logic (often, a switch statement) that typically follows an event device dequeue operation, where events are dispatched to different parts of the application based on event meta data, such as the queue id or scheduling type. The concept is similar to a UNIX file descriptor event loop library. Instead of tying callback functions to fds as for example libevent does, the dispatcher relies on application-supplied matching callback functions to decide where to deliver events. A dispatcher is configured to dequeue events from a specific event device, and ties into the service core framework, to do its (and the application's) work. The dispatcher provides a convenient way for an eventdev-based application to use service cores for application-level processing, and thus for sharing those cores with other DPDK services. Although the dispatcher adds some overhead, experience suggests that the net effect on the application (both synthetic benchmarks and more real-world applications) may well be positive. This is primarily due to clustering (see programming guide) reducing cache misses. Benchmarking indicates that the overhead is ~10 cc/event (on a large core), with a handful of often-used handlers. The dispatcher does not support run-time reconfiguration. The use of the dispatcher library is optional, and an eventdev-based application may still opt to access the event device using direct eventdev API calls, or by some other means. Mattias Rönnblom (3): lib: introduce dispatcher library test: add dispatcher test suite doc: add dispatcher programming guide MAINTAINERS | 6 + app/test/meson.build | 1 + app/test/test_dispatcher.c | 1074 ++++++++++++++++++++++ doc/api/doxy-api-index.md | 1 + doc/api/doxy-api.conf.in | 1 + doc/guides/prog_guide/dispatcher_lib.rst | 433 +++++++++ doc/guides/prog_guide/index.rst | 1 + doc/guides/rel_notes/release_23_11.rst | 5 + lib/dispatcher/meson.build | 13 + lib/dispatcher/rte_dispatcher.c | 691 ++++++++++++++ lib/dispatcher/rte_dispatcher.h | 466 ++++++++++ lib/dispatcher/version.map | 20 + lib/meson.build | 2 + 13 files changed, 2714 insertions(+) create mode 100644 app/test/test_dispatcher.c create mode 100644 doc/guides/prog_guide/dispatcher_lib.rst create mode 100644 lib/dispatcher/meson.build create mode 100644 lib/dispatcher/rte_dispatcher.c create mode 100644 lib/dispatcher/rte_dispatcher.h create mode 100644 lib/dispatcher/version.map -- 2.34.1