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 23D2645843; Fri, 23 Aug 2024 09:34:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A6ED43269; Fri, 23 Aug 2024 09:33:17 +0200 (CEST) Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010060.outbound.protection.outlook.com [52.101.69.60]) by mails.dpdk.org (Postfix) with ESMTP id A22B143252 for ; Fri, 23 Aug 2024 09:33:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KiOuLj4JlSK0xn4yfBZSRljCKismr0Ybbw352YcOPpPXGzWp3JC/dmTaqkfSJoH2BX/ZctNTs7XPmFh1xyLbWh05bApH7WljUFGu7gtz1QLc3If2jUZm8vve4dAnyw4DHCdaDHfA884uXxuLO77YjesxeIlWyhqtTc/10cvMoVUYhTgkxbeN/9rwJ81eAeJn8Uvp/CjhnUg8zsfVjncbnyvXfaWvmCGgnMtNVpM7JaVZwjNdrZqJkdS05+PM/7mxRrM3pGSDiQ+A3va8t7q/lyDpHCtDujAlmmGWjodtUoJnNa6jR7MyK3uz7us4raPA/gK7npq5F7ES4PTqzYSJKA== 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=SlQLyZcpxbmi7PhLTp9uOlXZwdXEk3VKjT/ip3yqASY=; b=KIt+zfpKEkPRhuviwL2cxA2JhQaUXYXc89twyL8Zykekl1cnC0+LUZJDugfqpNBmhchlAwXbJ+NjAu2I9ExihMDRSdOu7TBAiV6dO2vz2P2LIGR18eSjDActWbphcn5bc/Ks5UEn9vdibeobTx3WJw1OAUhFYCSCjivoxML2X/1kJztTwqgIuLr/zO3iWmOccCLoz1CHfEoWrs2Ml33+m1IJ1/2f393IvhZmxtnXorZq2LJ47n7mpP4iFwKDNyq05kqD63NQDoM3Y1QG6ICTS8iUHindcTfV0HNNrmIZ86yPj8SrN/bzNcfEbogVoqKbQar6qUGiD+0knq5BKO9wFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SlQLyZcpxbmi7PhLTp9uOlXZwdXEk3VKjT/ip3yqASY=; b=PY/ZvEeSyzpkxTN5uNGpMTpuM2/gArVVhFP9O1y6x/Uj8aP3qCBL33mFwVx/IUpRYQgDjWMHjcDMbx4D3hSt0tXYcO+2Q7q1ADQUTV33V0wr9OIpSHY+huT48Ib3ZC0D/z0MrEEYOcIk1hrvH5Z/8LKW5PXHAQ0md3tODcJ2roEh8/6D6iHO9NCjio54/K961Iuo1VJuCupUn55IMxInWzyQyARPasGLNzqQIo1KBFnCleH3HLTlopmXPD2FsZVa7mMacNUzpPw1docswEoJJgP+YRsW09DuL4bkiJsYKvYFUUr/5LzupRbdtwiZIq2YDWrhLOy72O/3odIq8gdqNA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DU2PR04MB8789.eurprd04.prod.outlook.com (2603:10a6:10:2e0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.18; Fri, 23 Aug 2024 07:33:08 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%3]) with mapi id 15.20.7875.019; Fri, 23 Aug 2024 07:33:08 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Vanshika Shukla Subject: [PATCH v2 07/18] net/dpaa: add support to separate Tx conf queues Date: Fri, 23 Aug 2024 13:02:29 +0530 Message-Id: <20240823073240.3708320-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240823073240.3708320-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> <20240823073240.3708320-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0028.apcprd02.prod.outlook.com (2603:1096:3:18::16) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DU2PR04MB8789:EE_ X-MS-Office365-Filtering-Correlation-Id: 3bd8223f-d30d-42e5-725f-08dcc345d58c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/c+b77NYhmxBX4C8tmS/XyChmnzhYPaYiSpKH8uxPnLg6Qj0H/YF2HHDfPJS?= =?us-ascii?Q?HxNtkJx6xrUovzIhjJbUJOGH1rZHqfx+tHlJ/aqL4tZS86kD18PIVBtS5OLw?= =?us-ascii?Q?fbWyBKd83m3BLJlWSVgGzPGB9tk144v4+fgsIq4FLDzv0V0legpC/FE2iJWh?= =?us-ascii?Q?U1DXM/HR8UU0OL/P4rwbOpmVnI9kAT8lyKWrDFRJv8BDvnPWuY9QjH3ChenG?= =?us-ascii?Q?UIaJda1voAfk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us-ascii?Q?YJrCxesT8OMI94YeUySLMCWusKOX7p4yamEhCSmxFEpAtXIKIE1vZui6RsvF?= =?us-ascii?Q?4bZaIYvE6a/K9epcx45Zs3zEtqoflJhrcIjwbOEtn6ud+n9n/fIL62SNYy2Z?= =?us-ascii?Q?dMmsaHLEvHiIutZTS2lRswFjmf/a9wdJer6EUBE/tWwjmPTyxl1p+f1nhZeP?= =?us-ascii?Q?RVK+5UW8wM5WpZDY4tRL3XyAte6Hvp/zXlfbyDMP6Bh5xd/o1MaPSlmjgkEl?= =?us-ascii?Q?G23FTDL80gq6UqOzBcCc0x50lVnd+kQX/3YUaRepoDqvlGRyKw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?HzbFHmQyK2viPzNOuvnZSttWHa8nrMDNWNYDpFhZMmkoJlwzD5DNwHOdZV2x?= =?us-ascii?Q?RJrY+/rfqE3u0YoemTTzdHAEly/+uoRLqBk+BYj9kLk/b7puIE8Ate8C91TA?= =?us-ascii?Q?OZm7BPkykxjdC3Kk74tr6MyPxhBO/G1EEPgfZQG5JG9WSCxH4lsuaDVypIDk?= =?us-ascii?Q?LLoOHKR/4hAH7CuZvM4AEXzoQna/lCoPwcdnCOrVXVTtsOVC5HioJSxa2Q7E?= =?us-ascii?Q?OBxXE7wbkeRuniCXnm5dOai4BFxCF2sS6M8WYaCtAdyIJb0cZ6BTBvwTuqnn?= =?us-ascii?Q?9+VUDoQeuAJgURLmiPhx/ESyUF6t+RhfCOawnp6FgP9Dj3Ll5kYlZbnMLdUf?= =?us-ascii?Q?Snb2+5OIYMtlgv7se7/S6oAKWBxF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d0q4UayQ1oB+PM5DMwte+yIkDZFTDxiugeeMNNVs2vpLIODZv?= =?us-ascii?Q?CJGDbvAYTi0INzyQxtpitPqg2/UovgMDVKqb/WIEf6umgq30sXfJu1vuhlu4?= =?us-ascii?Q?s0czHFw+gLmxrvE+tE2iIkZTE0ztTjaUmjwF4DGhQX0jpAQV4PRAYw6s7cQM?= =?us-ascii?Q?FI82uU3zhH8KrRKNQOfwfRIxlbHMfIjCBzfFYlq0Qx4fiU9smULeZsTkTuYU?= =?us-ascii?Q?YohMNMBtpuTKV7TjOaWc1CJazacJZYuKa+EXsE+97zUwl4dNIB2LE4DUU9pM?= =?us-ascii?Q?Y8pWjf/5Bu8UQc7spY1gxNzShepLDDhz1hfyKmkiCzsjEcdeCMkVSC7m8Mk+?= =?us-ascii?Q?Jg=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3bd8223f-d30d-42e5-725f-08dcc345d58c X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 07:33:08.4277 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AkICeXYwh6aFiA/QulG1dQ79Fh0r3RVpmvEX9cSRLMmp1vTnotMnbi5IWEilBzwN0DJD351KNJvLHXN3fc3r/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8789 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: Vanshika Shukla This patch separates Tx confirmation queues for kernel and DPDK so as to support the VSP case. Signed-off-by: Vanshika Shukla Acked-by: Hemant Agrawal --- drivers/bus/dpaa/include/fsl_qman.h | 4 ++- drivers/net/dpaa/dpaa_ethdev.c | 45 +++++++++++++++++++++-------- drivers/net/dpaa/dpaa_rxtx.c | 3 +- 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h index c0677976e8..db14dfb839 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) * * Copyright 2008-2012 Freescale Semiconductor, Inc. - * Copyright 2019 NXP + * Copyright 2019-2022 NXP * */ @@ -1237,6 +1237,8 @@ struct qman_fq { /* DPDK Interface */ void *dpaa_intf; + /*to store tx_conf_queue corresponding to tx_queue*/ + struct qman_fq *tx_conf_queue; struct rte_event ev; /* affined portal in case of static queue */ diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index bba305cfb1..3ee3029729 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1870,9 +1870,30 @@ static int dpaa_tx_queue_init(struct qman_fq *fq, return ret; } -/* Initialise a DEBUG FQ ([rt]x_error, rx_default) and DPAA TX CONFIRM queue - * to support PTP - */ +static int +dpaa_tx_conf_queue_init(struct qman_fq *fq) +{ + struct qm_mcc_initfq opts = {0}; + int ret; + + PMD_INIT_FUNC_TRACE(); + + ret = qman_create_fq(0, QMAN_FQ_FLAG_DYNAMIC_FQID, fq); + if (ret) { + DPAA_PMD_ERR("create Tx_conf failed with ret: %d", ret); + return ret; + } + + opts.we_mask = QM_INITFQ_WE_DESTWQ | QM_INITFQ_WE_FQCTRL; + opts.fqd.dest.wq = DPAA_IF_DEBUG_PRIORITY; + ret = qman_init_fq(fq, 0, &opts); + if (ret) + DPAA_PMD_ERR("init Tx_conf fqid %d failed with ret: %d", + fq->fqid, ret); + return ret; +} + +/* Initialise a DEBUG FQ ([rt]x_error, rx_default) */ static int dpaa_def_queue_init(struct qman_fq *fq, uint32_t fqid) { struct qm_mcc_initfq opts = {0}; @@ -2170,6 +2191,15 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) if (ret) goto free_tx; dpaa_intf->tx_queues[loop].dpaa_intf = dpaa_intf; + + if (dpaa_ieee_1588) { + ret = dpaa_tx_conf_queue_init(&dpaa_intf->tx_conf_queues[loop]); + if (ret) + goto free_tx; + + dpaa_intf->tx_conf_queues[loop].dpaa_intf = dpaa_intf; + dpaa_intf->tx_queues[loop].tx_conf_queue = &dpaa_intf->tx_conf_queues[loop]; + } } dpaa_intf->nb_tx_queues = MAX_DPAA_CORES; @@ -2190,16 +2220,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) DPAA_PMD_ERR("DPAA TX ERROR queue init failed!"); goto free_tx; } - dpaa_intf->debug_queues[DPAA_DEBUG_FQ_TX_ERROR].dpaa_intf = dpaa_intf; - ret = dpaa_def_queue_init(dpaa_intf->tx_conf_queues, - fman_intf->fqid_tx_confirm); - if (ret) { - DPAA_PMD_ERR("DPAA TX CONFIRM queue init failed!"); - goto free_tx; - } - dpaa_intf->tx_conf_queues->dpaa_intf = dpaa_intf; } - DPAA_PMD_DEBUG("All frame queues created"); /* Get the initial configuration for flow control */ diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 8593e20200..3bd35c7a0e 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -1083,8 +1083,7 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) struct dpaa_sw_buf_free buf_to_free[DPAA_MAX_SGS * DPAA_MAX_DEQUEUE_NUM_FRAMES]; uint32_t free_count = 0; struct qman_fq *fq = q; - struct dpaa_if *dpaa_intf = fq->dpaa_intf; - struct qman_fq *fq_txconf = dpaa_intf->tx_conf_queues; + struct qman_fq *fq_txconf = fq->tx_conf_queue; if (unlikely(!DPAA_PER_LCORE_PORTAL)) { ret = rte_dpaa_portal_init((void *)0); -- 2.25.1