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 7C9D945B90; Mon, 21 Oct 2024 11:01:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5041140B9A; Mon, 21 Oct 2024 11:01:15 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2056.outbound.protection.outlook.com [40.107.22.56]) by mails.dpdk.org (Postfix) with ESMTP id BD5754067A for ; Mon, 21 Oct 2024 11:01:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hk8w7dCf84JCACglXMNIo8TCXMiNA66v92KuW7zCfYNTATGwFNZGR0UhXsFduU5/DGeV3FqNNxhqi3hkhT9Ljfidk5C0xXK4o4tuYa8Aae5XhE38m2zRy2y4/EVtY/Os7rRO27o2mOOjxlg3fqucRHylUDHHlGTC+XkUgDMIqxDcOozG6jwrcyVcrFlHItwbpqAuVLW76vUlL3k44dnwzpBKmoz/ZfFUhYNkdsKZk0O2X1XL4QgyiIASsTPGNJonNQAp5vshQGZjbaX4DOqdYEOrt0u+EDXcs9UQWzViCPaY8cPqqwi6ExH0hZ6+vAnap4quMGE9iFyM9JrhMj1kog== 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=cEbjX8vPRSD7cn4nEuuXsidZwmBe5IteqwjwyCSk/RgnniSbB1ijlnHsKU0fcti83wCWQDQqfRoG9QVxY9/S0Voli+ISHfI/xo4y5xhcN7c9NJt8z+q/EWxZmGMyl20lIw19F9578I+xKp6ADKzOfxXRT31LDL+A4//m/Lu0p1RcbY1o2QPv6833uk8h2KOlkP9ZFy7jO047ejyHm67vn8QpBWCfAAzSsa0gT0qF9MY365hal0nliRxRj/2Jgou0HgmoHsowgzQTGnSMWvihjAtJB/KHK2ZxDmb5DzgmJUNdlHuxCtu55iYUGLDsNCF+SqSXtfd7vLnnWfwuBxxS1w== 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=N6r//8a/mP5+Dyj4b+iHHE4XfeXNSCE2GepUdvikRLUpXMq7pHEYCl3iq+wOrC7XrC7c8uMJoTENKd3STdyDLL4HwzhBbmcSlDM6YGUB2wOxEpwdy5gJ/GIXIehVDv3LddnOppVoNuFqNJfL18Fb7UssJoJvdBbhU4+/YWzaskbU/J6pKp7sJtINisvuk6a+6EXBdpGwiBxWPeb8/XVG1kwsZ2YByQYKGcSfUI0qpOqnEN5jXFnE9JSJUlFFf0Wq/NCvGUIqpan8CAzwmfUJ4IDagIVeHyUnEETIXI1Bv/tGMEyrgwiXSGp6eqCxOKmnkhWypcK1dlqoLLePiqmPjA== Received: from AS9PR05CA0355.eurprd05.prod.outlook.com (2603:10a6:20b:490::16) by AM9PR07MB7283.eurprd07.prod.outlook.com (2603:10a6:20b:2c3::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 09:01:07 +0000 Received: from AMS1EPF00000047.eurprd04.prod.outlook.com (2603:10a6:20b:490:cafe::5e) by AS9PR05CA0355.outlook.office365.com (2603:10a6:20b:490::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Mon, 21 Oct 2024 09:01:07 +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 AMS1EPF00000047.mail.protection.outlook.com (10.167.16.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 09:01:07 +0000 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.68) with Microsoft SMTP Server id 15.2.1544.11; Mon, 21 Oct 2024 11:00:22 +0200 Received: from breslau.. (unknown [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 517841C0092; Mon, 21 Oct 2024 11:00:22 +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: [PATCH 08/10] event/cnxk: remove single event enqueue and dequeue Date: Mon, 21 Oct 2024 10:51:13 +0200 Message-ID: <20241021085115.864114-9-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021085115.864114-1-mattias.ronnblom@ericsson.com> References: <20241017063842.848360-1-mattias.ronnblom@ericsson.com> <20241021085115.864114-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: AMS1EPF00000047:EE_|AM9PR07MB7283:EE_ X-MS-Office365-Filtering-Correlation-Id: db536886-18bc-4d7d-c97f-08dcf1aee68e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|7416014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?VuFmm1x8WMteUNvWGy577SQSKWoLKujmdVgoCu0cz0SZeHCt+G0RzceDOzHV?= =?us-ascii?Q?lPiiyWxs4bjfoxgkbKXpNyAcsg0Mk6bhAIrWblrqpKtL35GmGEngDSdW5GU0?= =?us-ascii?Q?Luz79wGYbaNtSGDbfHv4RvzogH7iYlYPuLUdKvNJWhuHxNlgmKXmbFppiqJe?= =?us-ascii?Q?SeMRnnrGrEgtvLaEn34l0PZqEO6+oJIvzFsLdemNFSNVWlOcWAmdWQCsT9C+?= =?us-ascii?Q?1I5sP81tdXALpdXQc9xIQ+TLGyawFl0Z9NXGccSaXP3qaXsbsj4yjnmApsIk?= =?us-ascii?Q?SITEByky7aIILS/FeMa3h2OBjJzIEENdVt43OkLeJJLY6k/i64UZbKnh4CQi?= =?us-ascii?Q?ua+eaF1CjGyur5i4cWor6M6LonGWuEx0JiFsy/gPVyYoS6b/VWKmZaZbfJAe?= =?us-ascii?Q?hsyqqenklEEpxlHT7HQPFsGpe3Ei01METkNdk+9jo2zBuhYFhYG5Bvxiw/ob?= =?us-ascii?Q?iPi+GC83Eq2aH1oywksuZupF4bJbSLqNFcJz7NiwYThn7Ikglu4fM3yTiFAL?= =?us-ascii?Q?4EkKNizw9F6dra2Bbn8YPL4hrW7VaEg1+iu9xk80a6skOv04JH6hg9GPVFQ4?= =?us-ascii?Q?tv0+VDnX6qHdh/kJL4L1IHQ9Ja9Nf/VpDDhsE/GLLO+X1n38geeYji18GiRI?= =?us-ascii?Q?OPxElyeiJW1v5fa5ElSr4X1AbhittHKUtAVeDmFAtPbfFG9c+OnXNrDhn6v1?= =?us-ascii?Q?lCzZV7lVQvg73FlPIxLW/EDaGeTtA6V1qONnCpZuyjxjTCEu2DW+UD4ZKLWq?= =?us-ascii?Q?MCmuPhy5sg4Ft/SqpVqobwrbb8C4UQ3QgBOUHIU/uhfaGJ8uKYVdzg2eU9N3?= =?us-ascii?Q?2R1AdlGuHAzM7cGXcrax8whMsJ8LeTPJzOKm6w45521BCnU5P4CK/GdVSKVC?= =?us-ascii?Q?YKiitu716cFBmFTKF6moFRyJdksK2Sqe5GT8PLdJ+0DVbNBOdqnU4pzwifkU?= =?us-ascii?Q?7m48bg+dwwDpOc/8eWTi6zU8nEmKsDPHtCH2ynHBlka4RXGY5CXnkDndUqpX?= =?us-ascii?Q?TyCqLlr6PNKdKPGPUszJJ6SWks9Uv2F9CQYS8B/QmZJE0JR++wwbg2+gVud1?= =?us-ascii?Q?OpcGLkq++Gvc3nfy0tIMKzV1bM+pn3hWyk9oFI0w2vGHFQeixZ8mcS6fFQcs?= =?us-ascii?Q?p9RHNfQSfZllcujlPVlNFxjEqSqvOCoZsAlTnAq3ysZ/LCrH2ZJ9wUFg/G39?= =?us-ascii?Q?BJExxQQJfT8YzJtHNrTaf0Ba9h4G4b4K3X40pW8CFl9G96o+TDQIy7pM2h+T?= =?us-ascii?Q?3pC6+DMI1igVMU2X9yty+XB/HUGVTyeCi04MlUH/aP+z1r1b5rPbH8Pi5dmT?= =?us-ascii?Q?DJbw4+GLQsPaDEb4EQif+MhDcsZ4Grpq9/TldufRXXaAY/vP9JQcUTGFtnp3?= =?us-ascii?Q?wvVsPxufeSyB1RGSXxyfzLFtMrVW3QqVlHo9JUirLTIPe1th0w=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)(1800799024)(376014)(7416014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 09:01:07.4019 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db536886-18bc-4d7d-c97f-08dcf1aee68e 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: AMS1EPF00000047.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR07MB7283 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