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 9D07745B5A; Thu, 17 Oct 2024 08:48:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC80540A6E; Thu, 17 Oct 2024 08:48:11 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2059.outbound.protection.outlook.com [40.107.22.59]) by mails.dpdk.org (Postfix) with ESMTP id AD75C402D8 for ; Thu, 17 Oct 2024 08:47:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WY0iuT0JA1AgMHBelHe0R1LjgMIXQ5GpkV87X9r04EYUz9EkEz++rBzpzcXZs7DGhDUcvB0RrvY7VMtc4J8MSOYzcDwx5NEls4QMDFM8jwGawDcluAFjbljFgYB1+LVwuf/mW5gkYoV+IWaMTLxWz/VjN4r8/Nnw5Q+OgafNWmdxJWm9l0nTVC3SoWC5tk6A0rwwc1q7lIgE4GLPA82AjtSwm11RYvR3Rp+sdsoWQep/CqWn4cJPVOt+Rs2KSHKlA4SaiNxUnZ3X2jmy14e69BaXmQmY1RVN/sHufGKwbPLca9NEZdcFBXYYi7fKVuy/xLkcoDI7Dyko3D8Wrz8FwA== 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=9l86UBV5xsS255Fa8UxrFpHv0x++zuIu3xLXxiTKyD0=; b=W+ZD3deoQplhUHe/Iy498NEMTvVWa4f0c8SN785BZjan7ChLzBAgCFJwmr2lJPB1MCl1WOXMpjRM2Ad0k0ZM+tvEmfka2d8F//1GSIQrtGND/UaPz9fyip6P3ob44swHS/8YHP/elGfYGsLUKKybq4UpWl7ztf12ppzCnwIUh106S8YOwGwYFy23aJ6wuEx8mCZCsaHbUdL+dqLB5JFAj7yY0OzKG5l4eg1WbIyZ3RIINF17s6IPBqW/k8iKCCJ4cy7lY+qjln0Puf6y8EGAbSJ4jcprTroomrFGfg/XLO58Q6pVTidj42vbtw7xvcYVdTDw0zrAjPxedbzo/oF9Kg== 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 (0) 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=9l86UBV5xsS255Fa8UxrFpHv0x++zuIu3xLXxiTKyD0=; b=Hc+S8YeL54UxpqA6b1cPJ7HYa3CF/ZTAhOZ8FC0Cbs5rqefO97l33d9kZGU1u+/ndahbGod6eDqL7/+YvbpohO99p3sIHN0I5U9rEAG33iR7FBvOLvGRBVY7n38ehpX/x/Ldm8K8EjnMO6OvRaoa5HM0aHUk6L7jr4yTkideKGu1Ze8adalJ4b9ZnNuzzubw2DR1AM9L/f3OwAVy/V+UrjJOa5Dgd8jB+EUfbDowU3H7cWWroh1pMHmgfxMUyqttIPmH7LiD14vlmxDTBeEXf61bMl2E7mdQ5j/kDaBSrotnzwFslBV2enZ1hcwYN5TRJb0Kvc9/4WW7sY472qsCuA== Received: from DU6P191CA0007.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:540::22) by AS8PR07MB7718.eurprd07.prod.outlook.com (2603:10a6:20b:350::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.21; Thu, 17 Oct 2024 06:47:54 +0000 Received: from DU2PEPF00028CFC.eurprd03.prod.outlook.com (2603:10a6:10:540:cafe::4d) by DU6P191CA0007.outlook.office365.com (2603:10a6:10:540::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.20 via Frontend Transport; Thu, 17 Oct 2024 06:47:54 +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 DU2PEPF00028CFC.mail.protection.outlook.com (10.167.242.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Thu, 17 Oct 2024 06:47:54 +0000 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.65) with Microsoft SMTP Server id 15.2.1544.11; Thu, 17 Oct 2024 08:47:52 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 064BD1C006B; Thu, 17 Oct 2024 08:47:52 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: Jerin Jacob CC: , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , David Marchand , Stephen Hemminger , Anoob Joseph , Hemant Agrawal , Sachin Saxena , Abdullah Sevincer , Pavan Nikhilesh , Shijith Thotton , Harry van Haaren Subject: [RFC v3 08/10] event/cnxk: remove single event enqueue and dequeue Date: Thu, 17 Oct 2024 08:38:40 +0200 Message-ID: <20241017063842.848360-9-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241017063842.848360-1-mattias.ronnblom@ericsson.com> References: <20241015182535.825098-2-mattias.ronnblom@ericsson.com> <20241017063842.848360-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028CFC:EE_|AS8PR07MB7718:EE_ X-MS-Office365-Filtering-Correlation-Id: 28a48223-3377-467f-f322-08dcee77a0cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|7416014|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?MkpM58QqilqHDsF4gEALDDJl3oFEZFQSb/dDJeujDCZJqnFasPA5ciMP0dEg?= =?us-ascii?Q?cfEqyIWLec6KjIF+6zGY5RWmUyDImkvsM0SEuGStJo7qdN0eQylRS8KryL+z?= =?us-ascii?Q?v/OvI8BGlmWgprQs2I3w3TskbZrlhWGp33Yg6TvkWIeTO5+s3dOntM15yXnh?= =?us-ascii?Q?g0SBKl18kRPvYEFx4ykULoEulaa5j8Wl/+PBlz+2kMMoa+UCOqf6obwZk6vE?= =?us-ascii?Q?aW8DOabqn4wlZUKLf9X7QxOhOybpEimJUqr5QW8r3Aoi03SBWA93rC6l/7St?= =?us-ascii?Q?ccQPIe1LdA2asaImnxwJMoe9xOvfg8k8NScpz0fP/8I7k5luU0edQy6Ckccj?= =?us-ascii?Q?Ed/2Z3xN0qR11l8s2Wjrx+JipqtM7+DWWXJxHsLNeG9QZeQOyVlHor8FTqsh?= =?us-ascii?Q?LUJYJrXYoFQFH76ziy4kBCGCiT0mxo5ZcTsER0bfyadJhkoLEe/QS9ruw+xi?= =?us-ascii?Q?TXNc9wcbE95f0lLNEugEn+ivz5vjvdpTfgTquDp2oZvvfVOo9yEpE8PCt71u?= =?us-ascii?Q?vyvZRwoUtPYrdp1L09ZhY74mXgHgYBKD9KXVpTmrSSMaDKSVTDokWIymF9Or?= =?us-ascii?Q?cm5VBUalwMwl3o67gCRhNa69qw9rK+ZuSCUYHsk1vu+Tq81O6acndg4RDZfe?= =?us-ascii?Q?U+dVkS1FoouaR6b3rnpyQ5jt0+zPDn00iDcCZwivFa3sKRAGXRaE/bVCKMLp?= =?us-ascii?Q?64M7C3EU4iwfBq/Tt3cWtxlYz62ao01+Xf96jT1UPxPDsynicuGUyFw2Gh5t?= =?us-ascii?Q?uhLmST0ixgc429kdWy+2pRlIpVRn64owqbicRR11esthLg8DhhPXX65kLRwh?= =?us-ascii?Q?aD25njy6w0Et7htRJbhrwYjoobZ/eL2NcIDmK4G0c/Hu0hEaRwkNClbZCLDw?= =?us-ascii?Q?z1C9GPALnmYW5Is88Am9Srnb7eowSWtxhZzNZ8e5qOOe80mapY7ZTgP8NWSP?= =?us-ascii?Q?AWSumpWCuHkn8O1DjulJ++nM1rULFifC0vPskUOmci/i35K6rVyxd2gl3dCK?= =?us-ascii?Q?WtLz1bxsZ8MCo77DSmMH99FazSkI/yg9dqggTEo6Z0YS3dzYnfOdrTgMtaOB?= =?us-ascii?Q?KQIFOhsOJ4qsZ2TwvDq5+D5Ri80sNQE7YFe+nTXECd5RVfVFRcoLnzGzNrE6?= =?us-ascii?Q?iCThHXz9iuDm+JzGxx6thouDoRjkjFXUV4OiJZqJKoj31kalIrHg2ZoR1NFW?= =?us-ascii?Q?0+iLxzTMjvByDebSXGCu3n9VGokJAwq2VAY2BsKsBSIOUmDp2ew1xhje/r7r?= =?us-ascii?Q?1XqEZ+hPTksmrpbdhXwsBCPTE4z7NXZFHdPpNmdDsSg+j/V6x3dP5jbC5Hnx?= =?us-ascii?Q?/hm3vqdrGzVYedns45C6KjWToHoTgqtI6eg0dbaGNsg1i9qyBi7wkcPgvXXW?= =?us-ascii?Q?rFg2jz5cLc8/F2L85sRRr5IZ0NFwQjabQwXCwUHv+QO8tgMGww=3D=3D?= 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:(13230040)(36860700013)(7416014)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2024 06:47:54.5382 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 28a48223-3377-467f-f322-08dcee77a0cb 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: DU2PEPF00028CFC.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7718 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 From: Pavan Nikhilesh Provide only burst enqueue and dequeue. Signed-off-by: Pavan Nikhilesh -- RFC v3: * Rewrite. Pavan Nikhilesh is now the author. --- drivers/event/cnxk/cn10k_eventdev.c | 74 ++--------------------------- drivers/event/cnxk/cn10k_worker.c | 49 +++++++++---------- drivers/event/cnxk/cn10k_worker.h | 1 - drivers/event/cnxk/cn9k_eventdev.c | 73 +--------------------------- drivers/event/cnxk/cn9k_worker.c | 26 ++++------ drivers/event/cnxk/cn9k_worker.h | 3 -- 6 files changed, 36 insertions(+), 190 deletions(-) diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c index 531c489172..a099356562 100644 --- a/drivers/event/cnxk/cn10k_eventdev.c +++ b/drivers/event/cnxk/cn10k_eventdev.c @@ -311,11 +311,6 @@ cn10k_sso_fp_tmplt_fns_set(struct rte_eventdev *event_dev) { #if !defined(CNXK_DIS_TMPLT_FUNC) struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev); - const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn10k_sso_hws_deq_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; const event_dequeue_burst_t sso_hws_deq_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn10k_sso_hws_deq_burst_##name, @@ -323,86 +318,42 @@ cn10k_sso_fp_tmplt_fns_set(struct rte_eventdev *event_dev) #undef R }; - const event_dequeue_t sso_hws_deq_tmo[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn10k_sso_hws_deq_tmo_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_deq_tmo_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn10k_sso_hws_deq_tmo_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_deq_seg[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn10k_sso_hws_deq_seg_##name, - - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_deq_seg_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn10k_sso_hws_deq_seg_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_deq_tmo_seg[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn10k_sso_hws_deq_tmo_seg_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_deq_tmo_seg_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn10k_sso_hws_deq_tmo_seg_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_reas_deq[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn10k_sso_hws_reas_deq_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_reas_deq_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn10k_sso_hws_reas_deq_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_reas_deq_tmo[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn10k_sso_hws_reas_deq_tmo_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_reas_deq_tmo_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn10k_sso_hws_reas_deq_tmo_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_reas_deq_seg[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn10k_sso_hws_reas_deq_seg_##name, - - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_reas_deq_seg_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn10k_sso_hws_reas_deq_seg_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_reas_deq_tmo_seg[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn10k_sso_hws_reas_deq_tmo_seg_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_reas_deq_tmo_seg_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn10k_sso_hws_reas_deq_tmo_seg_burst_##name, NIX_RX_FASTPATH_MODES @@ -424,48 +375,33 @@ cn10k_sso_fp_tmplt_fns_set(struct rte_eventdev *event_dev) if (dev->rx_offloads & NIX_RX_MULTI_SEG_F) { if (dev->rx_offloads & NIX_RX_REAS_F) { - CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, sso_hws_reas_deq_seg); CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_reas_deq_seg_burst); - if (dev->is_timeout_deq) { - CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_reas_deq_tmo_seg); + if (dev->is_timeout_deq) CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_reas_deq_tmo_seg_burst); - } } else { - CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, sso_hws_deq_seg); CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_deq_seg_burst); - if (dev->is_timeout_deq) { - CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_deq_tmo_seg); + if (dev->is_timeout_deq) CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_deq_tmo_seg_burst); - } } } else { if (dev->rx_offloads & NIX_RX_REAS_F) { - CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, sso_hws_reas_deq); CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_reas_deq_burst); - if (dev->is_timeout_deq) { - CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_reas_deq_tmo); + if (dev->is_timeout_deq) CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_reas_deq_tmo_burst); - } } else { - CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, sso_hws_deq); CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_deq_burst); - if (dev->is_timeout_deq) { - CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, sso_hws_deq_tmo); + if (dev->is_timeout_deq) CN10K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_deq_tmo_burst); - } } } @@ -514,7 +450,6 @@ cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev) cn10k_sso_fp_blk_fns_set(event_dev); cn10k_sso_fp_tmplt_fns_set(event_dev); - 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; @@ -848,7 +783,6 @@ eventdev_fops_update(struct rte_eventdev *event_dev) struct rte_event_fp_ops *fp_op = rte_event_fp_ops + event_dev->data->dev_id; - fp_op->dequeue = event_dev->dequeue; fp_op->dequeue_burst = event_dev->dequeue_burst; } diff --git a/drivers/event/cnxk/cn10k_worker.c b/drivers/event/cnxk/cn10k_worker.c index a0e85face1..c49138316c 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 4785cc6575..f0bfa12640 100644 --- a/drivers/event/cnxk/cn10k_worker.h +++ b/drivers/event/cnxk/cn10k_worker.h @@ -366,7 +366,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 377e910837..431e1670d5 100644 --- a/drivers/event/cnxk/cn9k_eventdev.c +++ b/drivers/event/cnxk/cn9k_eventdev.c @@ -314,48 +314,24 @@ cn9k_sso_fp_tmplt_fns_set(struct rte_eventdev *event_dev) #if !defined(CNXK_DIS_TMPLT_FUNC) struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev); /* Single WS modes */ - const event_dequeue_t sso_hws_deq[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn9k_sso_hws_deq_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_deq_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn9k_sso_hws_deq_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_deq_tmo[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn9k_sso_hws_deq_tmo_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_deq_tmo_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn9k_sso_hws_deq_tmo_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_deq_seg[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn9k_sso_hws_deq_seg_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_deq_seg_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn9k_sso_hws_deq_seg_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_deq_tmo_seg[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn9k_sso_hws_deq_tmo_seg_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_deq_tmo_seg_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn9k_sso_hws_deq_tmo_seg_burst_##name, NIX_RX_FASTPATH_MODES @@ -363,48 +339,24 @@ cn9k_sso_fp_tmplt_fns_set(struct rte_eventdev *event_dev) }; /* Dual WS modes */ - const event_dequeue_t sso_hws_dual_deq[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn9k_sso_hws_dual_deq_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_dual_deq_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn9k_sso_hws_dual_deq_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_dual_deq_tmo[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn9k_sso_hws_dual_deq_tmo_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_dual_deq_tmo_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn9k_sso_hws_dual_deq_tmo_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_dual_deq_seg[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn9k_sso_hws_dual_deq_seg_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_dual_deq_seg_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn9k_sso_hws_dual_deq_seg_burst_##name, NIX_RX_FASTPATH_MODES #undef R }; - const event_dequeue_t sso_hws_dual_deq_tmo_seg[NIX_RX_OFFLOAD_MAX] = { -#define R(name, flags)[flags] = cn9k_sso_hws_dual_deq_tmo_seg_##name, - NIX_RX_FASTPATH_MODES -#undef R - }; - const event_dequeue_burst_t sso_hws_dual_deq_tmo_seg_burst[NIX_RX_OFFLOAD_MAX] = { #define R(name, flags)[flags] = cn9k_sso_hws_dual_deq_tmo_seg_burst_##name, NIX_RX_FASTPATH_MODES @@ -436,31 +388,22 @@ cn9k_sso_fp_tmplt_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; event_dev->profile_switch = cn9k_sso_hws_profile_switch; if (dev->rx_offloads & NIX_RX_MULTI_SEG_F) { - CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, sso_hws_deq_seg); CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_deq_seg_burst); - if (dev->is_timeout_deq) { - CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_deq_tmo_seg); + if (dev->is_timeout_deq) CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_deq_tmo_seg_burst); - } } else { - CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, sso_hws_deq); CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_deq_burst); - if (dev->is_timeout_deq) { - CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_deq_tmo); + if (dev->is_timeout_deq) CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_deq_tmo_burst); - } } event_dev->ca_enqueue = cn9k_sso_hws_ca_enq; event_dev->dma_enqueue = cn9k_dma_adapter_enqueue; @@ -473,7 +416,6 @@ cn9k_sso_fp_tmplt_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 = @@ -483,25 +425,17 @@ cn9k_sso_fp_tmplt_fns_set(struct rte_eventdev *event_dev) event_dev->profile_switch = cn9k_sso_hws_dual_profile_switch; if (dev->rx_offloads & NIX_RX_MULTI_SEG_F) { - CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_dual_deq_seg); CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_dual_deq_seg_burst); if (dev->is_timeout_deq) { - CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_dual_deq_tmo_seg); CN9K_SET_EVDEV_DEQ_OP( dev, event_dev->dequeue_burst, sso_hws_dual_deq_tmo_seg_burst); } } else { - CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_dual_deq); CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue_burst, sso_hws_dual_deq_burst); if (dev->is_timeout_deq) { - CN9K_SET_EVDEV_DEQ_OP(dev, event_dev->dequeue, - sso_hws_dual_deq_tmo); CN9K_SET_EVDEV_DEQ_OP( dev, event_dev->dequeue_burst, sso_hws_dual_deq_tmo_burst); @@ -573,7 +507,6 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev) cn9k_sso_fp_blk_fns_set(event_dev); cn9k_sso_fp_tmplt_fns_set(event_dev); - 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; @@ -581,7 +514,6 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev) event_dev->profile_switch = cn9k_sso_hws_profile_switch; 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 = cn9k_sso_hws_dual_enq_fwd_burst; @@ -917,7 +849,6 @@ eventdev_fops_tstamp_update(struct rte_eventdev *event_dev) struct rte_event_fp_ops *fp_op = rte_event_fp_ops + event_dev->data->dev_id; - fp_op->dequeue = event_dev->dequeue; fp_op->dequeue_burst = event_dev->dequeue_burst; } diff --git a/drivers/event/cnxk/cn9k_worker.c b/drivers/event/cnxk/cn9k_worker.c index a9ac49a5a7..86aa3f1c30 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) @@ -80,11 +75,14 @@ cn9k_sso_hws_profile_switch(void *port, uint8_t profile) /* 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: @@ -107,14 +105,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 c92fa72f11..635c2f6e9a 100644 --- a/drivers/event/cnxk/cn9k_worker.h +++ b/drivers/event/cnxk/cn9k_worker.h @@ -359,7 +359,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); @@ -371,8 +370,6 @@ uint16_t __rte_hot cn9k_sso_hws_enq_fwd_burst(void *port, uint16_t nb_events); int __rte_hot cn9k_sso_hws_profile_switch(void *port, uint8_t profile); -uint16_t __rte_hot cn9k_sso_hws_dual_enq(void *port, - const struct rte_event *ev); uint16_t __rte_hot cn9k_sso_hws_dual_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events); -- 2.43.0