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 9C7DD42C70; Fri, 9 Jun 2023 19:48:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7774840EDB; Fri, 9 Jun 2023 19:48:26 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2040.outbound.protection.outlook.com [40.107.105.40]) by mails.dpdk.org (Postfix) with ESMTP id 1ACD940A84 for ; Fri, 9 Jun 2023 19:48:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HYHEPcR822o5cAuyDFf/KTuHG/OmlDVSiU6PSzKIiDGnZ5lY48RpRQyFs2mNHn+mreUhj/taS1t0jvVDm9z2bbpsbKlkoxYrtQdLlNyOC9Xy9apVsWoCcYpqTWgIKD754i1nRlTX186ttgN90xgO++APhMr9vCPm/hxGsyQ7Jl3D0fmWqH83GxpBJV3XQiToHAv47KoeCLqT5XIk/Ejbmdn9Edzyj1TCSDIBeRqyG6BuxnzMxzuj0Sz8cUblDNYvBTGRViQaGdCSvrpraB00RXgZw8tRUW6sie8dcJwO28cuBabuzkQWMAjHTnm2708I2SVwKGXULnY59vQqgngUug== 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=+V7/ZJHng6ppsWe/5n+ccVJX4YDXOLO9X5F3gx2GgVs=; b=L9oUM7XFumzlzZOKcX1YCKWtZf9PSMMW2WuT9FhNUq1tiyl0lSGu6r23VxmVDdYPVcS5zCw2+Q1jW+VLHP0KMzw4gt9oBuWqH3myG0gDtvelXveBpj8q1UnYHYjcXqXTLdz2VC/Nvu2JCehau/eOkywU2CITgd0twuWVjZiG1OU4ZyLzdhLGStAsp61bwC3jYEoHe2sOz+GPoyEwCUZ/WoomMy08LKK0FvgYsMohSBstwwCXBG7JxS4ZVAi862ytBu/jUVrLIjJOUNYN9n1WWhpZXAjchdrNFqhQYkYpeej53Cf9twOGtp8G3jV7Wpw6HvHcMim5HrJ6SjVrHwybPQ== 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=+V7/ZJHng6ppsWe/5n+ccVJX4YDXOLO9X5F3gx2GgVs=; b=pHEEWRjjjo98w4SelKA3NbH7G6g5KAy9jAZyt3bm2QEnuc9KGt71aIUj7Yns3ZYrGn9QCkDE/Oq4TrpfUQt5WAJjaKiDzm8FxtK5jolmlBK7cxhnw7wU5AOIP8CzBZP9b+9d7hdt6b4XEpHtfK0heSsjjizvaSq33qazWwBDzlQ= Received: from AM5PR1001CA0032.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:2::45) by DU0PR07MB8547.eurprd07.prod.outlook.com (2603:10a6:10:321::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Fri, 9 Jun 2023 17:48:21 +0000 Received: from VI1EUR02FT003.eop-EUR02.prod.protection.outlook.com (2603:10a6:206:2:cafe::1a) by AM5PR1001CA0032.outlook.office365.com (2603:10a6:206:2::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.27 via Frontend Transport; Fri, 9 Jun 2023 17:48:22 +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 VI1EUR02FT003.mail.protection.outlook.com (10.13.60.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.6477.29 via Frontend Transport; Fri, 9 Jun 2023 17:48:22 +0000 Received: from ESESBMB504.ericsson.se (153.88.183.171) by ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 9 Jun 2023 19:48:18 +0200 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.187) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Fri, 9 Jun 2023 19:48:18 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id 54927380061; Fri, 9 Jun 2023 19:48:18 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: Jerin Jacob , , , Pavan Nikhilesh , Timothy McDaniel , Hemant Agrawal , "Sachin Saxena" , Harry van Haaren , Liang Ma , Peter Mccarthy , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [RFC] eventdev: remove single-event enqueue operation Date: Fri, 9 Jun 2023 19:42:05 +0200 Message-ID: <20230609174205.150027-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 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: VI1EUR02FT003:EE_|DU0PR07MB8547:EE_ X-MS-Office365-Filtering-Correlation-Id: e0d15354-79f7-4396-e341-08db6911b7fe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3RIzdYRHqJ6qxXXTI2QFrCbWyFLEzaDuXwScJE39/ItUTN/KXlmVFEfNkBMY3NAfARK5CVKw7+5hhfCPYMIOLQJjduyxRGutDCwOpx9TEL3PUdNDWxLkMkynLqaMbmBlgFFzjOWZ5v75GjKsSfI9U8mqghqMRIiXdhpNVF/ZWJVo8LETuTYK4FCp2+JxlTm3XlEmaaOEuFsjITutSGT5w8Dpqw7EpXYnEmzzppz70NWC7pRsciymeKExWuKh5oftGyVfZWwd34LCfluWNy39rMzzTk7IrgFunNtndEkQl5BL9M7LwLDfexzs0wXHExyNGMAT2stX/rfnVqJdJ+KHT7BnBf4H1XvMSFGxDJ8wP9MgBMPzEmC4W+X6U3AEruQzXqh0LhzK4+EA5wohNMmLtc1qcCLdVugccaRe789EcRPJYgN3WFFbNJwaGwbSxA13ua6wfRBGD/pd9v/uSh/TJOtX25l4nD0YvwGUS642BBATmeJjTB5oXJPknJJLho0rae6k9djs6b7JXhesBw01BGVmrlOltigmhkOaocIjT7G99i2gbkB2XW9619k2uV9V2C1b8O4Gb0Kl6PoemO16fh/5nNV9QYyASriilXCjv3PLPW/oAXj/cpufvJEh953a6V+bS15UYJQokU6fg6enbY+BBEakUzbdy2JLHZZIIc2CwqnU9OUztgb2QRP4jZNSWA9yrLS4eq3xdq3w3SvtyZKv64oXHhupsfr+xTqA4EV+v1nNAPioU45wCOlrXffZHstXjRmTJEloH9Xvh/l+mN6vAJHEu4zjKN6KANECXI8= 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)(396003)(39860400002)(346002)(136003)(376002)(451199021)(36840700001)(46966006)(40470700004)(70586007)(70206006)(8676002)(36756003)(8936002)(5660300002)(6666004)(4326008)(6916009)(478600001)(54906003)(41300700001)(40460700003)(316002)(40480700001)(82960400001)(7636003)(356005)(82740400003)(186003)(1076003)(7416002)(107886003)(26005)(86362001)(6266002)(47076005)(2616005)(336012)(83380400001)(36860700001)(82310400005)(30864003)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2023 17:48:22.4571 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0d15354-79f7-4396-e341-08db6911b7fe 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: VI1EUR02FT003.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR07MB8547 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 Eliminate non-burst enqueue operation from Eventdev. The effect of this change is to reduce Eventdev code complexity somewhat and slightly improve performance. The single-event enqueue shortcut provided a very minor performance advantage in some situations (e.g., with a compile time-constant burst size of '1'), but would in other situations cause a noticeable performance penalty (e.g., rte_event_enqueue_forward_burst() with run time-variable burst sizes varying between '1' and larger burst sizes). Signed-off-by: Mattias Rönnblom --- drivers/event/cnxk/cn10k_eventdev.c | 1 - drivers/event/cnxk/cn10k_worker.c | 49 ++++++++++------------ drivers/event/cnxk/cn10k_worker.h | 1 - drivers/event/cnxk/cn9k_eventdev.c | 2 - drivers/event/cnxk/cn9k_worker.c | 27 ++++-------- drivers/event/cnxk/cn9k_worker.h | 1 - drivers/event/dlb2/dlb2.c | 13 ------ drivers/event/dpaa/dpaa_eventdev.c | 7 ---- drivers/event/dpaa2/dpaa2_eventdev.c | 7 ---- drivers/event/dsw/dsw_evdev.c | 1 - drivers/event/dsw/dsw_evdev.h | 1 - drivers/event/dsw/dsw_event.c | 6 --- drivers/event/octeontx/ssovf_worker.c | 14 ++----- drivers/event/opdl/opdl_evdev.c | 13 ------ drivers/event/opdl/opdl_evdev.h | 1 - drivers/event/skeleton/skeleton_eventdev.c | 14 ------- drivers/event/sw/sw_evdev.c | 1 - drivers/event/sw/sw_evdev.h | 1 - drivers/event/sw/sw_evdev_worker.c | 6 --- lib/eventdev/eventdev_pmd.h | 2 - lib/eventdev/eventdev_private.c | 11 ----- lib/eventdev/rte_eventdev.h | 10 +---- lib/eventdev/rte_eventdev_core.h | 7 +--- 23 files changed, 38 insertions(+), 158 deletions(-) diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c index 1b50bbb53f..c8008b0b05 100644 --- a/drivers/event/cnxk/cn10k_eventdev.c +++ b/drivers/event/cnxk/cn10k_eventdev.c @@ -410,7 +410,6 @@ cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev) #undef T }; - event_dev->enqueue = cn10k_sso_hws_enq; event_dev->enqueue_burst = cn10k_sso_hws_enq_burst; event_dev->enqueue_new_burst = cn10k_sso_hws_enq_new_burst; event_dev->enqueue_forward_burst = cn10k_sso_hws_enq_fwd_burst; diff --git a/drivers/event/cnxk/cn10k_worker.c b/drivers/event/cnxk/cn10k_worker.c index 9b5bf90159..62dd8e5c5d 100644 --- a/drivers/event/cnxk/cn10k_worker.c +++ b/drivers/event/cnxk/cn10k_worker.c @@ -107,32 +107,6 @@ sso_lmt_aw_wait_fc(struct cn10k_sso_hws *ws, int64_t req) } } -uint16_t __rte_hot -cn10k_sso_hws_enq(void *port, const struct rte_event *ev) -{ - struct cn10k_sso_hws *ws = port; - - switch (ev->op) { - case RTE_EVENT_OP_NEW: - return cn10k_sso_hws_new_event(ws, ev); - case RTE_EVENT_OP_FORWARD: - cn10k_sso_hws_forward_event(ws, ev); - break; - case RTE_EVENT_OP_RELEASE: - if (ws->swtag_req) { - cnxk_sso_hws_desched(ev->u64, ws->base); - ws->swtag_req = 0; - break; - } - cnxk_sso_hws_swtag_flush(ws->base); - break; - default: - return 0; - } - - return 1; -} - #define VECTOR_SIZE_BITS 0xFFFFFFFFFFF80000ULL #define VECTOR_GET_LINE_OFFSET(line) (19 + (3 * line)) @@ -384,8 +358,29 @@ uint16_t __rte_hot cn10k_sso_hws_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events) { + struct cn10k_sso_hws *ws = port; + RTE_SET_USED(nb_events); - return cn10k_sso_hws_enq(port, ev); + + switch (ev->op) { + case RTE_EVENT_OP_NEW: + return cn10k_sso_hws_new_event(ws, ev); + case RTE_EVENT_OP_FORWARD: + cn10k_sso_hws_forward_event(ws, ev); + break; + case RTE_EVENT_OP_RELEASE: + if (ws->swtag_req) { + cnxk_sso_hws_desched(ev->u64, ws->base); + ws->swtag_req = 0; + break; + } + cnxk_sso_hws_swtag_flush(ws->base); + break; + default: + return 0; + } + + return 1; } uint16_t __rte_hot diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h index 071b216d33..4baa877482 100644 --- a/drivers/event/cnxk/cn10k_worker.h +++ b/drivers/event/cnxk/cn10k_worker.h @@ -291,7 +291,6 @@ cn10k_sso_hws_get_work_empty(struct cn10k_sso_hws *ws, struct rte_event *ev, } /* CN10K Fastpath functions. */ -uint16_t __rte_hot cn10k_sso_hws_enq(void *port, const struct rte_event *ev); uint16_t __rte_hot cn10k_sso_hws_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events); diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c index 38dc6ffddf..8c6f5365eb 100644 --- a/drivers/event/cnxk/cn9k_eventdev.c +++ b/drivers/event/cnxk/cn9k_eventdev.c @@ -449,7 +449,6 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev) #undef T }; - event_dev->enqueue = cn9k_sso_hws_enq; event_dev->enqueue_burst = cn9k_sso_hws_enq_burst; event_dev->enqueue_new_burst = cn9k_sso_hws_enq_new_burst; event_dev->enqueue_forward_burst = cn9k_sso_hws_enq_fwd_burst; @@ -484,7 +483,6 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev) sso_hws_tx_adptr_enq); if (dev->dual_ws) { - event_dev->enqueue = cn9k_sso_hws_dual_enq; event_dev->enqueue_burst = cn9k_sso_hws_dual_enq_burst; event_dev->enqueue_new_burst = cn9k_sso_hws_dual_enq_new_burst; event_dev->enqueue_forward_burst = diff --git a/drivers/event/cnxk/cn9k_worker.c b/drivers/event/cnxk/cn9k_worker.c index abbbfffd85..fa5924e113 100644 --- a/drivers/event/cnxk/cn9k_worker.c +++ b/drivers/event/cnxk/cn9k_worker.c @@ -8,10 +8,13 @@ #include "cn9k_cryptodev_ops.h" uint16_t __rte_hot -cn9k_sso_hws_enq(void *port, const struct rte_event *ev) +cn9k_sso_hws_enq_burst(void *port, const struct rte_event ev[], + uint16_t nb_events) { struct cn9k_sso_hws *ws = port; + RTE_SET_USED(nb_events); + switch (ev->op) { case RTE_EVENT_OP_NEW: return cn9k_sso_hws_new_event(ws, ev); @@ -33,14 +36,6 @@ cn9k_sso_hws_enq(void *port, const struct rte_event *ev) return 1; } -uint16_t __rte_hot -cn9k_sso_hws_enq_burst(void *port, const struct rte_event ev[], - uint16_t nb_events) -{ - RTE_SET_USED(nb_events); - return cn9k_sso_hws_enq(port, ev); -} - uint16_t __rte_hot cn9k_sso_hws_enq_new_burst(void *port, const struct rte_event ev[], uint16_t nb_events) @@ -66,14 +61,18 @@ cn9k_sso_hws_enq_fwd_burst(void *port, const struct rte_event ev[], return 1; } + /* Dual ws ops. */ uint16_t __rte_hot -cn9k_sso_hws_dual_enq(void *port, const struct rte_event *ev) +cn9k_sso_hws_dual_enq_burst(void *port, const struct rte_event ev[], + uint16_t nb_events) { struct cn9k_sso_hws_dual *dws = port; uint64_t base; + RTE_SET_USED(nb_events); + base = dws->base[!dws->vws]; switch (ev->op) { case RTE_EVENT_OP_NEW: @@ -96,14 +95,6 @@ cn9k_sso_hws_dual_enq(void *port, const struct rte_event *ev) return 1; } -uint16_t __rte_hot -cn9k_sso_hws_dual_enq_burst(void *port, const struct rte_event ev[], - uint16_t nb_events) -{ - RTE_SET_USED(nb_events); - return cn9k_sso_hws_dual_enq(port, ev); -} - uint16_t __rte_hot cn9k_sso_hws_dual_enq_new_burst(void *port, const struct rte_event ev[], uint16_t nb_events) diff --git a/drivers/event/cnxk/cn9k_worker.h b/drivers/event/cnxk/cn9k_worker.h index 6577c5fe02..ec51ebfadf 100644 --- a/drivers/event/cnxk/cn9k_worker.h +++ b/drivers/event/cnxk/cn9k_worker.h @@ -364,7 +364,6 @@ cn9k_sso_hws_get_work_empty(uint64_t base, struct rte_event *ev, } /* CN9K Fastpath functions. */ -uint16_t __rte_hot cn9k_sso_hws_enq(void *port, const struct rte_event *ev); uint16_t __rte_hot cn9k_sso_hws_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events); diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 60c5cd4804..e7fe0ba576 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -1502,10 +1502,6 @@ dlb2_init_qe_mem(struct dlb2_port *qm_port, char *mz_name) return ret; } -static inline uint16_t -dlb2_event_enqueue_delayed(void *event_port, - const struct rte_event events[]); - static inline uint16_t dlb2_event_enqueue_burst_delayed(void *event_port, const struct rte_event events[], @@ -1697,7 +1693,6 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, * performance reasons. */ if (qm_port->token_pop_mode == DELAYED_POP) { - dlb2->event_dev->enqueue = dlb2_event_enqueue_delayed; dlb2->event_dev->enqueue_burst = dlb2_event_enqueue_burst_delayed; dlb2->event_dev->enqueue_new_burst = @@ -3141,13 +3136,6 @@ dlb2_event_enqueue_burst_delayed(void *event_port, return __dlb2_event_enqueue_burst(event_port, events, num, true); } -static inline uint16_t -dlb2_event_enqueue(void *event_port, - const struct rte_event events[]) -{ - return __dlb2_event_enqueue_burst(event_port, events, 1, false); -} - static inline uint16_t dlb2_event_enqueue_delayed(void *event_port, const struct rte_event events[]) @@ -4585,7 +4573,6 @@ dlb2_entry_points_init(struct rte_eventdev *dev) /* Expose PMD's eventdev interface */ dev->dev_ops = &dlb2_eventdev_entry_ops; - dev->enqueue = dlb2_event_enqueue; dev->enqueue_burst = dlb2_event_enqueue_burst; dev->enqueue_new_burst = dlb2_event_enqueue_new_burst; dev->enqueue_forward_burst = dlb2_event_enqueue_forward_burst; diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 4b3d16735b..8809f2ecd9 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -112,12 +112,6 @@ dpaa_event_enqueue_burst(void *port, const struct rte_event ev[], return nb_events; } -static uint16_t -dpaa_event_enqueue(void *port, const struct rte_event *ev) -{ - return dpaa_event_enqueue_burst(port, ev, 1); -} - static void drain_4_bytes(int fd, fd_set *fdset) { if (FD_ISSET(fd, fdset)) { @@ -1008,7 +1002,6 @@ dpaa_event_dev_create(const char *name, const char *params) priv = eventdev->data->dev_private; eventdev->dev_ops = &dpaa_eventdev_ops; - eventdev->enqueue = dpaa_event_enqueue; eventdev->enqueue_burst = dpaa_event_enqueue_burst; if (dpaa_event_check_flags(params)) { diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index fa1a1ade80..de08fa1b78 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -202,12 +202,6 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], } -static uint16_t -dpaa2_eventdev_enqueue(void *port, const struct rte_event *ev) -{ - return dpaa2_eventdev_enqueue_burst(port, ev, 1); -} - static void dpaa2_eventdev_dequeue_wait(uint64_t timeout_ticks) { struct epoll_event epoll_ev; @@ -1103,7 +1097,6 @@ dpaa2_eventdev_create(const char *name) } eventdev->dev_ops = &dpaa2_eventdev_ops; - eventdev->enqueue = dpaa2_eventdev_enqueue; eventdev->enqueue_burst = dpaa2_eventdev_enqueue_burst; eventdev->enqueue_new_burst = dpaa2_eventdev_enqueue_burst; eventdev->enqueue_forward_burst = dpaa2_eventdev_enqueue_burst; diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 6c5cde2468..f3bcacfaf8 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -439,7 +439,6 @@ dsw_probe(struct rte_vdev_device *vdev) return -EFAULT; dev->dev_ops = &dsw_evdev_ops; - dev->enqueue = dsw_event_enqueue; dev->enqueue_burst = dsw_event_enqueue_burst; dev->enqueue_new_burst = dsw_event_enqueue_new_burst; dev->enqueue_forward_burst = dsw_event_enqueue_forward_burst; diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h index 6416a8a898..ca5d4714b0 100644 --- a/drivers/event/dsw/dsw_evdev.h +++ b/drivers/event/dsw/dsw_evdev.h @@ -263,7 +263,6 @@ struct dsw_ctl_msg { struct dsw_queue_flow qfs[DSW_MAX_FLOWS_PER_MIGRATION]; } __rte_aligned(4); -uint16_t dsw_event_enqueue(void *port, const struct rte_event *event); uint16_t dsw_event_enqueue_burst(void *port, const struct rte_event events[], uint16_t events_len); diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c index 93bbeead2e..1a4ea6629c 100644 --- a/drivers/event/dsw/dsw_event.c +++ b/drivers/event/dsw/dsw_event.c @@ -1242,12 +1242,6 @@ dsw_port_flush_out_buffers(struct dsw_evdev *dsw, struct dsw_port *source_port) dsw_port_transmit_buffered(dsw, source_port, dest_port_id); } -uint16_t -dsw_event_enqueue(void *port, const struct rte_event *ev) -{ - return dsw_event_enqueue_burst(port, ev, unlikely(ev == NULL) ? 0 : 1); -} - static __rte_always_inline uint16_t dsw_event_enqueue_burst_generic(struct dsw_port *source_port, const struct rte_event events[], diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c index 36454939ea..2b0e255499 100644 --- a/drivers/event/octeontx/ssovf_worker.c +++ b/drivers/event/octeontx/ssovf_worker.c @@ -148,12 +148,14 @@ ssows_deq_timeout_burst_ ##name(void *port, struct rte_event ev[], \ SSO_RX_ADPTR_ENQ_FASTPATH_FUNC #undef R -__rte_always_inline uint16_t __rte_hot -ssows_enq(void *port, const struct rte_event *ev) +uint16_t __rte_hot +ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events) { struct ssows *ws = port; uint16_t ret = 1; + RTE_SET_USED(nb_events); + switch (ev->op) { case RTE_EVENT_OP_NEW: rte_smp_wmb(); @@ -171,13 +173,6 @@ ssows_enq(void *port, const struct rte_event *ev) return ret; } -uint16_t __rte_hot -ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events) -{ - RTE_SET_USED(nb_events); - return ssows_enq(port, ev); -} - uint16_t __rte_hot ssows_enq_new_burst(void *port, const struct rte_event ev[], uint16_t nb_events) { @@ -336,7 +331,6 @@ ssovf_fastpath_fns_set(struct rte_eventdev *dev) { struct ssovf_evdev *edev = ssovf_pmd_priv(dev); - dev->enqueue = ssows_enq; dev->enqueue_burst = ssows_enq_burst; dev->enqueue_new_burst = ssows_enq_new_burst; dev->enqueue_forward_burst = ssows_enq_fwd_burst; diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c index 9ce8b39b60..6bde153514 100644 --- a/drivers/event/opdl/opdl_evdev.c +++ b/drivers/event/opdl/opdl_evdev.c @@ -41,18 +41,6 @@ opdl_event_enqueue_burst(void *port, return p->enq(p, ev, num); } -uint16_t -opdl_event_enqueue(void *port, const struct rte_event *ev) -{ - struct opdl_port *p = port; - - if (unlikely(!p->opdl->data->dev_started)) - return 0; - - - return p->enq(p, ev, 1); -} - uint16_t opdl_event_dequeue_burst(void *port, struct rte_event *ev, @@ -714,7 +702,6 @@ opdl_probe(struct rte_vdev_device *vdev) dev->dev_ops = &evdev_opdl_ops; - dev->enqueue = opdl_event_enqueue; dev->enqueue_burst = opdl_event_enqueue_burst; dev->enqueue_new_burst = opdl_event_enqueue_burst; dev->enqueue_forward_burst = opdl_event_enqueue_burst; diff --git a/drivers/event/opdl/opdl_evdev.h b/drivers/event/opdl/opdl_evdev.h index 1ca166b37c..1bf862cfff 100644 --- a/drivers/event/opdl/opdl_evdev.h +++ b/drivers/event/opdl/opdl_evdev.h @@ -275,7 +275,6 @@ opdl_pmd_priv_const(const struct rte_eventdev *eventdev) return eventdev->data->dev_private; } -uint16_t opdl_event_enqueue(void *port, const struct rte_event *ev); uint16_t opdl_event_enqueue_burst(void *port, const struct rte_event ev[], uint16_t num); diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index 8513b9a013..b31c902d42 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -25,18 +25,6 @@ #define EVENTDEV_NAME_SKELETON_PMD event_skeleton /**< Skeleton event device PMD name */ -static uint16_t -skeleton_eventdev_enqueue(void *port, const struct rte_event *ev) -{ - struct skeleton_port *sp = port; - - RTE_SET_USED(sp); - RTE_SET_USED(ev); - RTE_SET_USED(port); - - return 0; -} - static uint16_t skeleton_eventdev_enqueue_burst(void *port, const struct rte_event ev[], uint16_t nb_events) @@ -349,7 +337,6 @@ skeleton_eventdev_init(struct rte_eventdev *eventdev) PMD_DRV_FUNC_TRACE(); eventdev->dev_ops = &skeleton_eventdev_ops; - eventdev->enqueue = skeleton_eventdev_enqueue; eventdev->enqueue_burst = skeleton_eventdev_enqueue_burst; eventdev->dequeue = skeleton_eventdev_dequeue; eventdev->dequeue_burst = skeleton_eventdev_dequeue_burst; @@ -439,7 +426,6 @@ skeleton_eventdev_create(const char *name, int socket_id) } eventdev->dev_ops = &skeleton_eventdev_ops; - eventdev->enqueue = skeleton_eventdev_enqueue; eventdev->enqueue_burst = skeleton_eventdev_enqueue_burst; eventdev->dequeue = skeleton_eventdev_dequeue; eventdev->dequeue_burst = skeleton_eventdev_dequeue_burst; diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index cfd659d774..7655505b7c 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -1080,7 +1080,6 @@ sw_probe(struct rte_vdev_device *vdev) return -EFAULT; } dev->dev_ops = &evdev_sw_ops; - dev->enqueue = sw_event_enqueue; dev->enqueue_burst = sw_event_enqueue_burst; dev->enqueue_new_burst = sw_event_enqueue_burst; dev->enqueue_forward_burst = sw_event_enqueue_burst; diff --git a/drivers/event/sw/sw_evdev.h b/drivers/event/sw/sw_evdev.h index c7b943a72b..110724d52d 100644 --- a/drivers/event/sw/sw_evdev.h +++ b/drivers/event/sw/sw_evdev.h @@ -288,7 +288,6 @@ sw_pmd_priv_const(const struct rte_eventdev *eventdev) return eventdev->data->dev_private; } -uint16_t sw_event_enqueue(void *port, const struct rte_event *ev); uint16_t sw_event_enqueue_burst(void *port, const struct rte_event ev[], uint16_t num); diff --git a/drivers/event/sw/sw_evdev_worker.c b/drivers/event/sw/sw_evdev_worker.c index 063b919c7e..f041bae2a0 100644 --- a/drivers/event/sw/sw_evdev_worker.c +++ b/drivers/event/sw/sw_evdev_worker.c @@ -131,12 +131,6 @@ sw_event_enqueue_burst(void *port, const struct rte_event ev[], uint16_t num) return enq; } -uint16_t -sw_event_enqueue(void *port, const struct rte_event *ev) -{ - return sw_event_enqueue_burst(port, ev, 1); -} - uint16_t sw_event_dequeue_burst(void *port, struct rte_event *ev, uint16_t num, uint64_t wait) diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h index aebab26852..2d3e475cf2 100644 --- a/lib/eventdev/eventdev_pmd.h +++ b/lib/eventdev/eventdev_pmd.h @@ -159,8 +159,6 @@ struct rte_eventdev { uint8_t attached : 1; /**< Flag indicating the device is attached */ - event_enqueue_t enqueue; - /**< Pointer to PMD enqueue function. */ event_enqueue_burst_t enqueue_burst; /**< Pointer to PMD enqueue burst function. */ event_enqueue_burst_t enqueue_new_burst; diff --git a/lib/eventdev/eventdev_private.c b/lib/eventdev/eventdev_private.c index 1d3d9d357e..4c998669c8 100644 --- a/lib/eventdev/eventdev_private.c +++ b/lib/eventdev/eventdev_private.c @@ -5,15 +5,6 @@ #include "eventdev_pmd.h" #include "rte_eventdev.h" -static uint16_t -dummy_event_enqueue(__rte_unused void *port, - __rte_unused const struct rte_event *ev) -{ - RTE_EDEV_LOG_ERR( - "event enqueue requested for unconfigured event device"); - return 0; -} - static uint16_t dummy_event_enqueue_burst(__rte_unused void *port, __rte_unused const struct rte_event ev[], @@ -86,7 +77,6 @@ event_dev_fp_ops_reset(struct rte_event_fp_ops *fp_op) { static void *dummy_data[RTE_MAX_QUEUES_PER_PORT]; static const struct rte_event_fp_ops dummy = { - .enqueue = dummy_event_enqueue, .enqueue_burst = dummy_event_enqueue_burst, .enqueue_new_burst = dummy_event_enqueue_burst, .enqueue_forward_burst = dummy_event_enqueue_burst, @@ -107,7 +97,6 @@ void event_dev_fp_ops_set(struct rte_event_fp_ops *fp_op, const struct rte_eventdev *dev) { - fp_op->enqueue = dev->enqueue; fp_op->enqueue_burst = dev->enqueue_burst; fp_op->enqueue_new_burst = dev->enqueue_new_burst; fp_op->enqueue_forward_burst = dev->enqueue_forward_burst; diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h index a90e23ac8b..9be27b7baf 100644 --- a/lib/eventdev/rte_eventdev.h +++ b/lib/eventdev/rte_eventdev.h @@ -1940,14 +1940,8 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, } #endif rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (void *)fn); - /* - * Allow zero cost non burst mode routine invocation if application - * requests nb_events as const one - */ - if (nb_events == 1) - return (fp_ops->enqueue)(port, ev); - else - return fn(port, ev, nb_events); + + return fn(port, ev, nb_events); } /** diff --git a/lib/eventdev/rte_eventdev_core.h b/lib/eventdev/rte_eventdev_core.h index c328bdbc82..5bc3e645b9 100644 --- a/lib/eventdev/rte_eventdev_core.h +++ b/lib/eventdev/rte_eventdev_core.h @@ -12,9 +12,6 @@ extern "C" { #endif -typedef uint16_t (*event_enqueue_t)(void *port, const struct rte_event *ev); -/**< @internal Enqueue event on port of a device */ - typedef uint16_t (*event_enqueue_burst_t)(void *port, const struct rte_event ev[], uint16_t nb_events); @@ -45,8 +42,6 @@ typedef uint16_t (*event_crypto_adapter_enqueue_t)(void *port, struct rte_event_fp_ops { void **data; /**< points to array of internal port data pointers */ - event_enqueue_t enqueue; - /**< PMD enqueue function. */ event_enqueue_burst_t enqueue_burst; /**< PMD enqueue burst function. */ event_enqueue_burst_t enqueue_new_burst; @@ -65,7 +60,7 @@ struct rte_event_fp_ops { /**< PMD Tx adapter enqueue same destination function. */ event_crypto_adapter_enqueue_t ca_enqueue; /**< PMD Crypto adapter enqueue function. */ - uintptr_t reserved[6]; + uintptr_t reserved[7]; } __rte_cache_aligned; extern struct rte_event_fp_ops rte_event_fp_ops[RTE_EVENT_MAX_DEVS]; -- 2.34.1