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 22ED445B90; Mon, 21 Oct 2024 11:16:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D49740B91; Mon, 21 Oct 2024 11:16:15 +0200 (CEST) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2065.outbound.protection.outlook.com [40.107.249.65]) by mails.dpdk.org (Postfix) with ESMTP id 41A4D40689 for ; Mon, 21 Oct 2024 11:16:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=J9pyV4Wd59PsmtxTrFW2ZROsob9DvTJrzHS4rMwxgV8pyh3ZQFlBySp8BqgJ/AUV5IAIetjQzrnwpLkbUKvPJgm3+2m0Gc8d7WWTJrHf5/DQeU7dNENeDq60YRD9GNQ2x6pc9fvc0XCaOzfrmgjsF4nUGean/2tPUOmLqC3H7Fzm4954sLBTzwktpX0hArT6BOtwHbLAwTkJslHPwgsKM/fyL8C6fPEgcT3hVJd3b22SikCxnN/vsJtaWnLhPE6bWd+WmeT8T3FEZBYXdoR0cd+Qi+0ioC3wCc9LTI+gBzqp+jj9iq+9XYEg2+ht7Q0VK4LBJKpOzLxPF+49OwwHQQ== 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=yD7nGNeFzA88AWRSEK+SQWY/7fmY8m9z2PwYV61i52kyVC5rEjZ3eB5Hrnb3VXWwmu5k12sY0BaFrommZSh5nKfUke7H6nvfzj1Q89iky0c3R2Xi5rBtyzURP5W5LoBFCZTAmd/FuMFLvlX8tSAIj6bc4Ho7rdj2Jpgy9gu/VmuEl0Qxe6ryoQiIn/Er5mNmhGioanM4Imz1wRPDR7YFoA74bfyQnmsjSOAWIZ2E03x55xYcJTiANfbIn38kcmSH3NbmWi96ZIYKYsYh0gT4s7a9/MhF9HYX+TuhlFZAShOW/eEIeY31eH2dXeEmelqea4CexSDEUXd26feFkn3ExQ== 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=zGxL6yY7HR6iTheXPKaJqCqOgE62npd2j2qhSP3JCxITKrQHhqoftvdOn6TKCC8qdw4sEkoT1TiM21Pu8F8l+36ZctJufTQS9i85Uq3+QcVTDSD+ztjFRBUFtSG1DHSihhQv8my2yrJAo2zAcej02sFYnzqPJyzVs05FB+KKx05rdFb9bzY5K8ZgZzyQEnb4N+NRy9v6vrEYA/Tbor/pxUFYqClu1gIdWh4fFApBIG/V5VyaBAN4iOv/Pl+NHlmT30OlhH/ywhhcsCgI3xjNsuuoZxYbWW5w44E3Nl94Wt2A7qDUxwFtAxmFpnYAU4+GJ0LXx5sS7YFZs246EGo5Sg== Received: from DBBPR09CA0011.eurprd09.prod.outlook.com (2603:10a6:10:c0::23) by DUZPR07MB9720.eurprd07.prod.outlook.com (2603:10a6:10:4dc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.27; Mon, 21 Oct 2024 09:16:10 +0000 Received: from DB5PEPF00014B9B.eurprd02.prod.outlook.com (2603:10a6:10:c0:cafe::6c) by DBBPR09CA0011.outlook.office365.com (2603:10a6:10:c0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Mon, 21 Oct 2024 09:16:10 +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 DB5PEPF00014B9B.mail.protection.outlook.com (10.167.8.168) 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:16:10 +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; Mon, 21 Oct 2024 11:15:56 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 0C0C91C008F; Mon, 21 Oct 2024 11:15:56 +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 11:06:51 +0200 Message-ID: <20241021090653.864237-9-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021090653.864237-1-mattias.ronnblom@ericsson.com> References: <20241017063842.848360-1-mattias.ronnblom@ericsson.com> <20241021090653.864237-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: DB5PEPF00014B9B:EE_|DUZPR07MB9720:EE_ X-MS-Office365-Filtering-Correlation-Id: b94fddc7-52d9-4cf6-ce7a-08dcf1b100aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?PpOkDRl4gKECaj/Df2PfPjT3FV0YLSHz+qH61zSjvEqfumTlsU1VAsoHPIdY?= =?us-ascii?Q?ixG96X/e1LMUTFgR39mfwocF0cw1PbuV0C/+6WOcrBYWcAEn8AvO33ltBymz?= =?us-ascii?Q?6u7ElBilngMmz1qei0tYXFX2HZo226cWBj5lUQGuioGxT/BICrcW9W4dXNQ0?= =?us-ascii?Q?f5cnGsCiZn/wQJWiggThmHaSj7WMUq41oGT7bir+AkYLj/5U8Zmbs8yf31Ec?= =?us-ascii?Q?gnelAk4RcGRQ7JqazjTLjVHap6w6dZchx2IPT2iy8lQDO8hjeks8gsFZuVk8?= =?us-ascii?Q?ikZB+EUnd4k99lwF89M5zoVspjkN3PIo3abnnT5tmGYmP7oG6B0QmFmg+ueg?= =?us-ascii?Q?C17wCS95MWD9504qpevW/j/DC9pmj2lj310DR+zaNxnDOJ6aReS97VNMTUMX?= =?us-ascii?Q?mq0XcSuHAmtAsfViudSMHwhSiZB/R90kglFbUv9BbOEBAZCaJQCes5wNNv6+?= =?us-ascii?Q?OmyG+uPFqool6mAbQG2D9SMX2QgMAiykaKqhaJeTfmvUxazZbafyWTFam5qs?= =?us-ascii?Q?DZcPuIgs6y00OlSekINMhQwnHfCDxU0yQLikjDDRdokLgadWG8OXrsTa/Mrq?= =?us-ascii?Q?HNUXUNhSxajobdpbDtI6+EXxwQHRQZY2TaTey2l0QS3YSmItXo6jvYWcOH2i?= =?us-ascii?Q?2V8whLPYpBssGoiocHgr/44eJAtxFMG9FW1HnQ1QaawCX/zMO3SlgoCRGngX?= =?us-ascii?Q?im1Gh3J3eubL6GIndFENZazMmpqyvpgDN0EOpW7im0FVZdS8ulkZ63I05OCu?= =?us-ascii?Q?eXWzsEHvx4JppEzvRGUeEbKle3acD+ahMuhEeF8BYkcqGPfrBxeJYvHAZqMb?= =?us-ascii?Q?LBCEvR9QHi4Rf0EH7E5PqKmXIarjhCWlWat9hrt3wzbP2jorwYjGHC24ZU57?= =?us-ascii?Q?Fftgoy3J8lh5Ylbq0MjAC3kcLQMcyKFNrDItlypx8oMygzt+mWdOOJ5VR2i0?= =?us-ascii?Q?rkdBUHf/HueYPV/nxcbiI4E0v9mvz5t1/3dQlSFkL4W6Fs+DJLIyImsuXH9h?= =?us-ascii?Q?qPoArGj/GNCoLJcxOJDsC7hICLSYgLWjmrY4INJyxahtIhajF+wLT1DT+oqg?= =?us-ascii?Q?MrawRADI6jv1CdJE/2qQVkb4gKcxGLvVRwjVn9pUTqKFToJO+1iRxSJhJjwJ?= =?us-ascii?Q?JRSCnMHlcgBXOob88+Ngqj64bSNk72Mju2J52WxRwCWrp9/eVTbMjCy9bk0t?= =?us-ascii?Q?UOJ72aGDIpB9HCNsBVkpyefx9ec6dNTTkJtZIhWw+nhYJ518NqoqGEocL9q/?= =?us-ascii?Q?IZ1j6QFCE3XnkEsTtvfz9V1RLvBgKHYo8PK9b0uatlRqFffFWowaZYnaF8N9?= =?us-ascii?Q?6QwVB6BXBRjeb1QBXI140Hzi2Hn5qAEbNQZTwbW4BFuL1A3tlpAqb4Bui1pI?= =?us-ascii?Q?MKhRjkbDKaEICcSBig07o2qQEYKUgGhOaxGaWofmyRjysDc9Aw=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)(7416014)(376014)(1800799024)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 09:16:10.1685 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b94fddc7-52d9-4cf6-ce7a-08dcf1b100aa 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: DB5PEPF00014B9B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR07MB9720 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