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 235DB45710; Thu, 1 Aug 2024 12:54:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7EE0433B4; Thu, 1 Aug 2024 12:53:41 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011044.outbound.protection.outlook.com [52.101.65.44]) by mails.dpdk.org (Postfix) with ESMTP id 248F14337C for ; Thu, 1 Aug 2024 12:53:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LC0Th3uWd3sKayUU6LvZv2Nmv6+XxAUHY1Q1C7oAbDeRkvGTy5g0d9hQ6EjimQPR60H9Yf7A8MtuGBmdzzkF3jVXctVSgC78gPs5SIk+ESiX7IN8cod1ALyMrguabzEOsqW2epBxhdUwEmE2Pv5iEdWdVbukkX3LhH3rZqOPSCVEb0mjpwMqZrInPE9qMmEH5pX8nKUMRYno3fIKaKIO6ksz53HusbKTFNqU8lJUnQ7nt7Z0SxOx0t8ss5wR3QdvBAz2/hd4LSpF/a4FpY5BCbqqcKVSWt73pfoTv+niRvokSV1ON1gTIL4E/awdtsKx03+zTD8W/0CdZ6MkH9vn5g== 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=lrbUZZkubGz/OXDLUMBW6aQOgG3c1OGgL6EpmRJID6M=; b=V9Wh4MNe3ny+QQ4VAmIIzwAUlKLQXmdSvCqphY+MTLJnxmO64cyJsh12ti3wAGlTbt+I9madzBwFjU+R1b5BaVId0QoRbrqUl16OqGeLTzkdTE0/YSkIUlFr3x/BQ4D6t03ikiwhb5+HBBcjT+7UaqYHu+1Z+LdJQIbSeHUJtAOlpn8PG7TqwnNophu5R2kAp7emPrvLRZY/bF9GC8H4AT7sVKYqV/LQhx1u0fjOj+Rk7l4QaTCBu89lAdaGbvEl+0gYUM8JuWyA8Gt4eYNO0Q+8KhsGmCkeOtt31L7gWy0XcOHxHE7Oj91RCgGFCvnfxyGD9s2FV6Q4HEW7eQr2kA== 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=lrbUZZkubGz/OXDLUMBW6aQOgG3c1OGgL6EpmRJID6M=; b=XfDqWxw0j9XU4bQKl8U3+Ts0EUXpfzmNs9eI6Bp1i1YhpS6gFZLp0Vo9FjcuRp6VcZAW1wj8CDfhkjlvQoLBfKwxQLSlm+ueKszN4xfYGDW8NbD/pKUZzgEkAnOK3/jr87dwyNZ4Ff6Nj87QkcE8104ty15wpDRbCvoAjwOy1OkF64NHRID8JmBIZ7hC/BPEXVLiPTg6JzpaIRZFja1YBWNSH4ni1Yrlhvj+UrGoBWYdaE7ZVOWc/sGsFLPRrmQdEoEtNLRMjOb4DOm/ZIBz8jqTKZ049JN5no4cUzYRtBbXg/tI86TvckGgEPniHCz+pWgvsv6N/kAQlqYrrPA/tA== 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 AS8PR04MB8433.eurprd04.prod.outlook.com (2603:10a6:20b:407::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23; Thu, 1 Aug 2024 10:53:36 +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.7828.021; Thu, 1 Aug 2024 10:53:36 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, Vanshika Shukla Subject: [PATCH 06/17] net/dpaa: add support to separate Tx conf queues Date: Thu, 1 Aug 2024 16:23:02 +0530 Message-Id: <20240801105313.630280-7-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240801105313.630280-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0026.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::13) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|AS8PR04MB8433:EE_ X-MS-Office365-Filtering-Correlation-Id: 643c06d8-738e-4655-0be9-08dcb21831c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?IqQ2e0IOrRYBD5w6TirMO3nx+V9LRRcdwJhCmN66KjZKp41XLctsXwRyXoGp?= =?us-ascii?Q?GxE2LOvpQ7GCyrNHeJzVv6m9dQYiRn9EInBL1nunhBSt0jA12mNFGwyREFAs?= =?us-ascii?Q?FBGWgHIP8J/TkooPKLsyDmKe0nBWlcTlviTa6DPnuK6Dpt9Q/BDBCtGZgJf3?= =?us-ascii?Q?ZzsFaZpnei6mvodJE8QxnpiJPtXYTJmBUUUdBnzk0lFauKzA+vzauh76+guf?= =?us-ascii?Q?Yl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I3d7?= =?us-ascii?Q?kTi5oHAtY3Zf0RR3KmOSip4rLMxkGIgX/JveEaGyHDVBl8MUPRE1YP4tBWeD?= =?us-ascii?Q?mh5Plf/YoZ4KqS/6OP1RleUEXb89vswz+l0iomW/iQBHXRMIWPVZupcvVIkC?= =?us-ascii?Q?0jXvPNSFPEiJd/D/hpO0NzYT4VvZmqdcAEGhdA2B08VyIPYs6SqssbR39XzU?= =?us-ascii?Q?/1jWtDtmip5MPAaGMmg+s9ipebOWJHSnKwKiay2T7HaML3/QCTQGgWUiDC08?= =?us-ascii?Q?e/BBd/mnrwjukH4uSV/xvgL7jbY9o88F1OxWb4XZarc2hF8JXQ=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)(376014)(366016)(52116014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?NO7P+e1Tac9VW7ql5NyMRn6HSe/Xr3Jo4sff2zeZN5ZPtMVdDeual5GlNcY8?= =?us-ascii?Q?HBy+cBVbROweXOETxUlQTHhGxuSMZqr4su9P7uzeOTnV44qhD4H+vPPjNUd6?= =?us-ascii?Q?uCGzSIaUor45e4hOEyNGma0DD/UI6FRSGmSRKplMGN3k8V1A6EsjkzUArcjT?= =?us-ascii?Q?ho/pYvdvhHYkPRlvOnDG+vlRqpoCTHFpjbJizMph8sXd+NtrPD0OyeOhk43E?= =?us-ascii?Q?eJEmjKla2YnlMRU1x2DbM2+4jstwBZBM2sfJ8iSBnPDec7Eekj12d4yJ9LqB?= =?us-ascii?Q?W6ue52MEk11C7DEOD+p09itXKB13HFTdEnTvCZD9L4qmM3iiUk2xvEcKjBWw?= =?us-ascii?Q?1aXsEMXyMwrXW5Jh9YzfCHOFwucl1F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Q?zaYtqFjsPbqEDCYpf/l8ZtJjkWZb4tosQdjV4KYN1qnguzw/T6zikrUgqPh+?= =?us-ascii?Q?MYpH2XySmF2ThMe+pEw6+zauUZnJyDIcjmylmJNs7Z7XfG7WGPzhNeroyTg7?= =?us-ascii?Q?p1up6PFuFuIwcBr/AASKREHnZQiROV8aDTeHEHikufEhAuREODEybEBxruew?= =?us-ascii?Q?RgfOdWxIutobn4d0agyYbVKCQdTUcti4nS72AzHFjv6J869HwNF8TgEkSUYr?= =?us-ascii?Q?EG+paepAtgNKk4xr59vxebRi+1mbiWibDH8ffrNQPeaNzXoEnIZEAhpeF/oN?= =?us-ascii?Q?pCxJjrn1G6A79Cclpx5uMJ1/rLixFTUWg49hvuAKcDWIPtId81odc86xzNuN?= =?us-ascii?Q?7w=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 643c06d8-738e-4655-0be9-08dcb21831c9 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 10:53:36.5148 (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: bYdLL1kWxRC7oEmC19C51AwvxxrENgO0e62exsUUUDaNTf1HZUGAnD68zDnklIfxCw4b6Xpvp8yhyv7/gpcB3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8433 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 | 47 +++++++++++++++++++++-------- drivers/net/dpaa/dpaa_rxtx.c | 2 +- 3 files changed, 39 insertions(+), 14 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 9ffb8c578c..17058d762c 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1867,10 +1867,33 @@ static int dpaa_tx_queue_init(struct qman_fq *fq, return ret; } -#if defined(RTE_LIBRTE_DPAA_DEBUG_DRIVER) || defined(RTE_LIBRTE_IEEE1588) -/* Initialise a DEBUG FQ ([rt]x_error, rx_default) and DPAA TX CONFIRM queue - * to support PTP - */ +#if defined(RTE_LIBRTE_IEEE1588) +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; +} +#endif + +#if defined(RTE_LIBRTE_DPAA_DEBUG_DRIVER) +/* 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}; @@ -2128,6 +2151,14 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) if (ret) goto free_tx; dpaa_intf->tx_queues[loop].dpaa_intf = dpaa_intf; + +#if defined(RTE_LIBRTE_IEEE1588) + 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]; +#endif } dpaa_intf->nb_tx_queues = MAX_DPAA_CORES; @@ -2145,14 +2176,6 @@ 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; #endif DPAA_PMD_DEBUG("All frame queues created"); diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 189af748e9..c15538116d 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -1085,7 +1085,7 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) #if defined(RTE_LIBRTE_IEEE1588) 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; #endif if (unlikely(!DPAA_PER_LCORE_PORTAL)) { -- 2.25.1