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 E61A245A68; Mon, 30 Sep 2024 14:17:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C23F40678; Mon, 30 Sep 2024 14:16:23 +0200 (CEST) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2089.outbound.protection.outlook.com [40.107.249.89]) by mails.dpdk.org (Postfix) with ESMTP id 9FC784066F for ; Mon, 30 Sep 2024 14:16:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vzohcJBzH0IdjGCvk9pwI4OtjulTZ54TYKfG+QwsULg+VRm6xU/HrKtC4K8kX8Qt3+v5NTicsFWv9k94poIcT6rLGN0dO43rtQVEXUk+eF9NyOwnWdM/oTLqoumXuM+25gHIk1Pm1wQiSCesktKmjk6PQETPaQ2ZFcKQWK+4HHbVyyGCRYK2jdXFYuuS67QfugYj2tUtpaaj5ioeYrkICKtA1GrPbDBHu8OE53vhKwdVFkX656Br7YK69uqdjEEFOhZ00a+Yn24mEyvta1p6TjQHgz6MQv2Ee6n5bdLHJllipQA8PBZApv9kCRgkUSgXSpMZDh4CzGD4zWJEK57hAA== 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=YA0Y31Blm/x8OGeX50AKfkM7kKa/nSeUhWEpGbGVlcgIeBlgRwPMj3t62KDiIWNFoxgKF2kKk8zxF9wnjkFAvD9m+JEdusaGYa3sziXjs2adRiNZnxobRWQyYT5j8mH/x8lsDDEloE7t3tQWWOa+6ZvxNVnO5jqEhlgQv1z1tOBrN2yIHrxDRR6fvPFq6CJPFqLmoVELAgQsLY/wwia75FSDo7IzE1qE3BduTwLFQuGY1bKkvizyhL4c6zdFiFgw3qNLHCHRQuawo6U/5Thn6rUx2U3zXgKek1tnjwYJO6yh07PfERgStEuvzxhVyNzR/d4bqT6P/UuT+TvWPeRK/g== 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=AtcaHgrIqafhPPkAud8np+L3lRJzOurTIs4m3u1uYFKrUJnCV4Pa/JprcZu/5ySf6ncWYDz6UaqBSzNNcgn0ZIDSfFVIyOgr+YG0ToMDCf0b01mrkWyPDmFI2ip5kdtsDBu3ARhvMU3KbI1KHrcaUha6QyGzDKc+H16JbC7URadgob45/+6MGwy/TpEpizt7Z/q2O4wJSN/Der52BzyyYIZh2jYYDBom7rIMoRyX/iMsWHdpDSS4uB5sJ2eSZsbJ6zVlILqNsxKQJJQzGt1dJlrOHhgGKmR5CipYaS5BsbwMhPfDy7GBhvq70r/sASIDAEag0UEbMKvWm1eccLFOng== 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 PAXPR04MB8334.eurprd04.prod.outlook.com (2603:10a6:102:1cc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 12:16:17 +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.8005.026; Mon, 30 Sep 2024 12:16:17 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, Vanshika Shukla Subject: [PATCH v4 07/18] net/dpaa: add support to separate Tx conf queues Date: Mon, 30 Sep 2024 17:45:14 +0530 Message-Id: <20240930121525.3452847-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240930121525.3452847-1-hemant.agrawal@nxp.com> References: <20240823073240.3708320-1-hemant.agrawal@nxp.com> <20240930121525.3452847-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0124.apcprd01.prod.exchangelabs.com (2603:1096:4:40::28) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|PAXPR04MB8334:EE_ X-MS-Office365-Filtering-Correlation-Id: 99998d94-f1fe-4a0f-6101-08dce149aef6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Kh+RcPfVlv2+0OaCuOkJyKSkojG0nEq5GsGP2bPv2rz3Ld5l4K1bljboFnsH?= =?us-ascii?Q?PQBe/KVZCxWpvMq/KZR3iJ6IUr41UkeebMc57EtDLC4gayavsShe5/LYnBrR?= =?us-ascii?Q?CXYFbQ2dPQ11n68uQOB2Oww4d6kKNKr78oiTZK9kgLwRVpvHhmJcUR44TrYp?= =?us-ascii?Q?4G55SwqyOwbNxlQs/rM4e9FsAD03mXmGbCh7oOqmvWZMSsgA0oDwcKVtnG/h?= =?us-ascii?Q?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NireJr0q93CnQkc03KirtMVmvxnHP0R?= =?us-ascii?Q?CbwVsF05qvwf6abbqS7fF7URUnUuSGGi6ylDvXcYZIDQXMleICHJWtVNJbK3?= =?us-ascii?Q?etyquC6YmP4OaCeRIQzo+ANkWQnK2S58Gh56HHo0PBf5Jl4Se0Ul4/H0ofOG?= =?us-ascii?Q?R8kLWIkcmwugvaKoj0FWpscxxsdOKcsct9H5qUpqrpHxLqWx05aabFcssnfC?= =?us-ascii?Q?o5Drsjf14MoizF7Vu7GwuPGTno1rD+al+b3pFIM+dekcVw=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)(366016)(52116014)(376014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?c/cqjwcnFHWOfc1Yi+pxqHT2m9fBAQMKl4L9JLEBMjQKRzoMtnOFE7v7zK58?= =?us-ascii?Q?NMrUWjyqdID/Fz4/e2cJeKOzPKtCPcjL8ThaPAAqe/rrqylJEUteJVFgIR4h?= =?us-ascii?Q?jpccj1rL3KTGO3Q6OV1/W5Yu44LkDIhAhzA2xFw8wtzWXvdoQle6okSKM1xe?= =?us-ascii?Q?P/KucYaYpuKpTF7kEylgA7rmgBSFbxu5koXsSURbWetJSW8eEuVfL/qDaa0z?= =?us-ascii?Q?+2v7JBGTMUleo9g3cQZOfObiyv9F2q7qoYUoUMHDKmB/6YnK3wZLvHtJ7abE?= =?us-ascii?Q?VvHHV+Sl5UEbqNrNRbXf0ZV7eLhgcQqsEdmIcRWn+hJdKrKfNLCTzBAlzJvA?= =?us-ascii?Q?qcnMcKiXhPaKUGYjw7KTPrto2O/pThniE8dNKIejIQngu5RKueW+IrUkCS0J?= =?us-ascii?Q?L9IZOy9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uwKMQHIF?= =?us-ascii?Q?eylZ89MXnq2i+LMZuquywF+OQ+kSpDb/A+MeJFzU904YmNhXTiUp7yIA866Y?= =?us-ascii?Q?5fssFLB8o9gu7nIdkOBa9/FtRysREgvOa5IqfPkTzDgIK6WL5RY9DACFw8P+?= =?us-ascii?Q?1TeusHvVPcmhEZc/jfqifL4dodUl7LRPTLbP6PiPbdiEVraofkVpcYU41o0C?= =?us-ascii?Q?NWO6vdllANS0GcsA/Y5lrwo77CCaSEQXN+d+Qrrb9ExhF7S5XjpXUqSPjL9U?= =?us-ascii?Q?XphHIGjMSlTVp9ST3EAcGbsbqN3cCwXmuh7N+nWRV7/gjzAUyuJLWHaRiSkN?= =?us-ascii?Q?UQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99998d94-f1fe-4a0f-6101-08dce149aef6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 12:16:16.9640 (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: hWBX6KY6DBmmnNvaf49MLWpQf/deznxKP4gdOHZTBrKzl+cMB94+kbz5FjqglMjkmAhEDXxysQcQ4Au4dWs8ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8334 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