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 17B6542CD2; Fri, 16 Jun 2023 09:47:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 961704021E; Fri, 16 Jun 2023 09:47:07 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2043.outbound.protection.outlook.com [40.107.20.43]) by mails.dpdk.org (Postfix) with ESMTP id A84B24003C for ; Fri, 16 Jun 2023 09:47:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ESFUyGCNsQhNDDbkkqgRprOP6B038r3NKNam7ORw/YXZyvtsg/94tutfpO+qUsbbC0enbnVjJq0PFw1wBqzDJ04521Mfa70p0/GAnYDAHwCfbgbRAwa3KhDTowix4D4fk4c12UC1odGSxcd+J/Wxl8YrNtqTxUD0U26Sp12bNO+oZ11igAjkdDT4Or3XmA9J2pg72WS2EoipUafSpZav4v0DiCKb2BAm0QwZ6IL78/1ripornhAsKDQ58bclnqI9FvvJPYQ2WpTiyzQ/b4oRRgt0odt3wtp+Cg0fdPlEwlO6uruoEyW5j2zwUnvtfww0vCGs8Q4881jlQNcoOTrQpA== 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=lZZ0sHFuYeN5LrEBM22CtasoD5OUoRKxLZ0QD7IEclk=; b=OVdAClGo8DNvNaUPW/xXpiPcx24aU5dBolJ7dG3JkgrMbtHiCSVkhSBncSg1KIRnYtmQBxTSEtmRVYxIdInOjBfO/0xGwdSz89kllHeGONFkRko3B7Duu2bLgoNsJ8/gtLaX3bjsVWEb+tfjvWqhCL7th4dulU8SjkVGHsF/bxwqkzKKknEJC1y2RmNMCmTGJtxFyBzhgamNYfZVGVzzvgceM5pSMqPcdyzE9608Q8P9W5i59H50NFa6rt59sKoDwavWY+dGYkkGqto9gpz6ZqLYPkcYDOPmyDDYO9BN3pcQ2aUdllnkwXP5t/DCygOAhmp4CGdX5xQZ6u4COFj8gQ== 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=lZZ0sHFuYeN5LrEBM22CtasoD5OUoRKxLZ0QD7IEclk=; b=RZL3BLmdcL2Pl//tNctBHo4CKF6hb1zfdyBNl+1+vkOI0pclMF6telqy/OUXRiM7V2wvRSo2UsVASj+0S/9PcnGqHNx8Vlb+EVR1EICPjxtpcJbKa1Wt1ZnLPHMbATCnbpMtJxY5aukPNlP92WYFn4tia/RJChp6/MxCVEKk5/o= Received: from AS4PR10CA0028.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5d8::13) by GV2PR07MB9154.eurprd07.prod.outlook.com (2603:10a6:150:bc::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.29; Fri, 16 Jun 2023 07:47:05 +0000 Received: from VI1EUR02FT023.eop-EUR02.prod.protection.outlook.com (2603:10a6:20b:5d8:cafe::f9) by AS4PR10CA0028.outlook.office365.com (2603:10a6:20b:5d8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.29 via Frontend Transport; Fri, 16 Jun 2023 07:47:04 +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 VI1EUR02FT023.mail.protection.outlook.com (10.13.60.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.6500.25 via Frontend Transport; Fri, 16 Jun 2023 07:47:04 +0000 Received: from ESESSMB505.ericsson.se (153.88.183.166) 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.23; Fri, 16 Jun 2023 09:47:03 +0200 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.193) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Fri, 16 Jun 2023 09:47:03 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id C311B1C006A; Fri, 16 Jun 2023 09:47:03 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: Jerin Jacob , , , , , Stephen Hemminger , Heng Wang , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [PATCH v2 0/3] Add event dispatcher Date: Fri, 16 Jun 2023 09:40:38 +0200 Message-ID: <20230616074041.159675-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230614172527.157664-2-mattias.ronnblom@ericsson.com> References: <20230614172527.157664-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: VI1EUR02FT023:EE_|GV2PR07MB9154:EE_ X-MS-Office365-Filtering-Correlation-Id: 3410c985-ec7b-451d-3a59-08db6e3de0cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GuSTc19cXjJvlFqLXFwnS9it5n3XArGCrzWX8ADSMCHlSCGAHi5kuMDJWEziwc7rwViWMDyt6WRvvdpuao4vZaGYr8cnHqmqCNjZD/yGO086PjK6XX3Qj4sg1Toe57BpUsnZjv5hI0hpgks/9xS4isebd4IwLQ3MvEXm+6CwrlzFm2DZ/9NgzccfVtyaH6wOM8FFKUzTYevcyuvfoZwXnuHV2Lx26tarXtd4ZRVZGyYN04FI2Q0qWo9fk4JONBshvcWnzzxscuDzjzRpKP8frj2GHYDNfmsQpA8+qyqKHR3lkYdSSA5bGUv0wOkxf22NuUJpfP8nvwOrzXVmDH35Q48TlIZUg0l72C0OUsjMhWl13DidoQPGqVVYXLK1JDy7vwtB2WKUaN+vgxIWfJ1NAkL1/4tNRApXj/e6NgOvsh/qDNcckZY9xb1qYfTZYoQlHH2xeZdNJN2h2G26OvtzdHJEqR0xUGp68tPcrrd6eyKer1zeSVgwSaqFv0Slpe771LK/6sax4Nyv/Wyxk5s0Hoj4p+FoTb/lZ9ZVgD97nper7iurTMpzuiKHYs4m/6CyCwE+OHIDu5Pb610cLAUhUKFLu8tBFPPRK4OzPhDzxMmCIR89e/0ngG4BawKyIVgyS08c4DQ70oieO0DQuUiocCgV3LCGqvVpIKFL2S/VIWZDkYDcgiq5XgsZWORGw8fq+ull21qnw1zcdVISD0dUZgVA8UrpsgJmJ5+9FU9k8A6dELz7TIganr+XAwuFcAP553IB50CGrpPzwQ/gYOB8mqnCB/0HzcisBw0uGr76GNQ= 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:(13230028)(4636009)(39860400002)(376002)(136003)(346002)(396003)(451199021)(36840700001)(40470700004)(46966006)(47076005)(66574015)(336012)(40460700003)(2616005)(2906002)(7636003)(356005)(82960400001)(82740400003)(36860700001)(36756003)(40480700001)(8936002)(8676002)(86362001)(107886003)(54906003)(82310400005)(5660300002)(41300700001)(4326008)(70586007)(70206006)(6916009)(6666004)(316002)(6266002)(186003)(478600001)(26005)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 07:47:04.5751 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3410c985-ec7b-451d-3a59-08db6e3de0cb 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: VI1EUR02FT023.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR07MB9154 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 event dispatcher is to decouple different parts of an application (e.g., processing pipeline stages), sharing the same underlying event device. The event 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 event dispatcher relies on application-supplied matching callback functions to decide where to deliver events. An event 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 event 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 event 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 event dispatcher does not support run-time reconfiguration. Mattias Rönnblom (3): eventdev: introduce event dispatcher test: add event dispatcher test suite doc: add event dispatcher programming guide app/test/meson.build | 1 + app/test/test_event_dispatcher.c | 1058 ++++++++++++++++++++ doc/api/doxy-api-index.md | 1 + doc/guides/prog_guide/event_dispatcher.rst | 443 ++++++++ doc/guides/prog_guide/index.rst | 1 + lib/eventdev/meson.build | 2 + lib/eventdev/rte_event_dispatcher.c | 793 +++++++++++++++ lib/eventdev/rte_event_dispatcher.h | 481 +++++++++ lib/eventdev/version.map | 14 + 9 files changed, 2794 insertions(+) create mode 100644 app/test/test_event_dispatcher.c create mode 100644 doc/guides/prog_guide/event_dispatcher.rst create mode 100644 lib/eventdev/rte_event_dispatcher.c create mode 100644 lib/eventdev/rte_event_dispatcher.h -- 2.34.1