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 1CB6942DD3; Tue, 4 Jul 2023 13:59:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A1CC40E03; Tue, 4 Jul 2023 13:59:16 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2055.outbound.protection.outlook.com [40.107.21.55]) by mails.dpdk.org (Postfix) with ESMTP id 067F440042 for ; Tue, 4 Jul 2023 13:59:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AZuyA4WKs9OB19aY5qkACD6AJ7iVzvTX3rnpdm3bdoq9bz4FhMMc/8KVIh7qwhmsb9ZwyXrhovExpWccvjwX7Cf32WoqfZleNH8de2LtTwIrZQYlFX+O5e1r/2jEwFvVVGY+YXLwd9H9rjKyJemOD3oM1bdzHvAuF6EqGJGsXvUrMIiER3VEkNptp0MrsK1x2zN/MFqLrw9hzOJMQAxfGQ8ye8lBsm79h7oClFzketj/aN1S3ROvzKm0VxlOSr7vV3JuikAO+O3NC55kXX+lAM5mHmctXiquRjOFXbk0pcbABvx5VAIj1yhYe04kX9AU9e06dlodFiJB7sLlnVaV+g== 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=kuDFzag1qHZQ6ci0wZOQkvhYTBALYH3KOAbT5as4Nco=; b=arVhIX4kWtiK40LhXpuTYwJNLVfXZQEHnqaIqDhzcsXY/VWFZw7EoBty5bhDOOoEt9aQNxTWTRdiznsEEN0CVvnjMd+TokMacUbB2UOTyXYk1ORrUxmYd0eM3xPZLRWv6E5ptgLm9a/HR2ZSsy3AjQ0hLKkiQ7yDDYe4ClBgkKyXam9HEdM7+wQl+jet+nUmPrDTy3jNi0b0i/CRx8udNfa+jKQJdca28jFfGK7amG0ZAC7/te8aA2gDDfmP06h/jkZBUpuG0LhInwhtDnX04HGerbgEeWOIqPYv0ZdoJSiU7KB5P0+S5c7R2Nw3tOtnyd81mHHq4juuVX9bBm8AlQ== 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=kuDFzag1qHZQ6ci0wZOQkvhYTBALYH3KOAbT5as4Nco=; b=myuYYiU7BQPcv4PbISCTZ4IAx0pitrkgI3iAU0zbumR5fT2sJw+Z03OF7wYrGTj8UUxisDQ7pWDc/MMjPCt5x7n7leYikDiQIwnn6EGwQpXI9Jzi6d0kqsTBZJT/uTv+pLp7W/K4+dVIzPmmE6wzHfvpsGkm6/NlBE9aUiifBlY= Received: from DU2PR04CA0326.eurprd04.prod.outlook.com (2603:10a6:10:2b5::31) by PAXPR07MB8424.eurprd07.prod.outlook.com (2603:10a6:102:2b9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Tue, 4 Jul 2023 11:59:13 +0000 Received: from DB5EUR02FT033.eop-EUR02.prod.protection.outlook.com (2603:10a6:10:2b5:cafe::50) by DU2PR04CA0326.outlook.office365.com (2603:10a6:10:2b5::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.31 via Frontend Transport; Tue, 4 Jul 2023 11:59:13 +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 DB5EUR02FT033.mail.protection.outlook.com (10.13.58.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.6565.18 via Frontend Transport; Tue, 4 Jul 2023 11:59:12 +0000 Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESSMB502.ericsson.se (153.88.183.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.27; Tue, 4 Jul 2023 13:59:11 +0200 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.186) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Tue, 4 Jul 2023 13:59:11 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id AEEA81C006A; Tue, 4 Jul 2023 13:59:11 +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: [PATCH] eventdev: remove single-event enqueue operation Date: Tue, 4 Jul 2023 13:53:07 +0200 Message-ID: <20230704115307.243031-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609174205.150027-1-mattias.ronnblom@ericsson.com> References: <20230609174205.150027-1-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: DB5EUR02FT033:EE_|PAXPR07MB8424:EE_ X-MS-Office365-Filtering-Correlation-Id: 325d0eea-7b4f-46ad-46dd-08db7c86151b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pU04SoeL4kli4krmRbH8D5qvtZCTYgrabdp9OJgD/Xp0SiV57B5Kw0R1Q/kYDi4Gzb7E2yj5QJif4NOoBIPwz6Qg0PS/m9mxZO6ueeQQ7I2Tx8NZR4ohEPcXu8gWfij9Z4AJ4N2y7kTQjNzhcUJkae74KhQzhUc9ejSgT9bX1ZWH5haU91WJdc0dvFM7HsESuFu2CFZyQ8VH2Kiia2yldPZWqwkJOfAEBHQlM1Lc1jjsdell1HzCsI1dJTIVEM0UTLwcNBtj7R+vK+swJ7ZiSkbqyX+XH6afO6QFrTB8B/xcrFDDHWnfCPAL+4LchOhWQByOlMg9jy3/SGm+X4HwggH78mj/VtDTZSaLekrLXBTtBn84KtxezVP+6dqI2Pf0Y/XE0gsotQ38KshG5LpqT2yyPAIhA9XmOaNJLMKmS+UmdKcZUO0jBWd9GvuV+ORGcfcBY09l2z7EQh4qH6lCYu4xUmHt88rdsRRVTt9d6QjDAqFvGY+AoYPwiCNqa3C/L/ihloNdkOXpyyboUyLdOY4Y3B7G9QfqiKGsCI274G6+8nehN8ujSvegVj7drB1qgXq9hvzPQgyyFPxLWMBHXk/RNGVrrN70+5BjEPAeulSlKcDuo5iF2tfoslCXLchkEIWGmOmB9DZTOy0jkeXjsgfO2IErGYS6Pka8Y76p/C8zohSYL1Upe/9o2LuzN3Bcja78raxImw3TBb5F4YwhXr0TBA5p1Gno45Xtz/FlqLg3B6bvO/SXmODkNcbKnsiL2PmxigrlPYzIUZKfbrlppaBX58GhiY3QwJtogf+Nn4g= 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)(396003)(136003)(376002)(346002)(451199021)(36840700001)(46966006)(40470700004)(36860700001)(107886003)(316002)(41300700001)(47076005)(336012)(83380400001)(66574015)(26005)(2616005)(6266002)(1076003)(186003)(40460700003)(6666004)(54906003)(82740400003)(82960400001)(7636003)(356005)(478600001)(70206006)(6916009)(70586007)(4326008)(40480700001)(5660300002)(7416002)(30864003)(82310400005)(8676002)(86362001)(8936002)(2906002)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2023 11:59:12.3690 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 325d0eea-7b4f-46ad-46dd-08db7c86151b 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: DB5EUR02FT033.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR07MB8424 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 -- PATCH: Add ABI deprecation notice. --- doc/guides/rel_notes/deprecation.rst | 4 ++ 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 +--- 24 files changed, 42 insertions(+), 158 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 66431789b0..badf011ab2 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -153,3 +153,7 @@ Deprecation Notices The new port library API (functions rte_swx_port_*) will gradually transition from experimental to stable status starting with DPDK 23.07 release. + +* eventdev: The single-event enqueue operation, used by static inline + burst-enqueue functions in , has been removed, + breaking the ABI. The API remains unaffected. diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c index 499a3aace7..51b2345269 100644 --- a/drivers/event/cnxk/cn10k_eventdev.c +++ b/drivers/event/cnxk/cn10k_eventdev.c @@ -412,7 +412,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 b4ee023723..c0db92f3a8 100644 --- a/drivers/event/cnxk/cn10k_worker.h +++ b/drivers/event/cnxk/cn10k_worker.h @@ -306,7 +306,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 6cce5477f0..fb967635af 100644 --- a/drivers/event/cnxk/cn9k_eventdev.c +++ b/drivers/event/cnxk/cn9k_eventdev.c @@ -434,7 +434,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; @@ -469,7 +468,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 9ddab095ac..12426d58bc 100644 --- a/drivers/event/cnxk/cn9k_worker.h +++ b/drivers/event/cnxk/cn9k_worker.h @@ -365,7 +365,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 c68c3a2262..fab0bf501b 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 b6a4fa1495..2461d002da 100644 --- a/lib/eventdev/rte_eventdev.h +++ b/lib/eventdev/rte_eventdev.h @@ -1929,14 +1929,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