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 457D845A67; Mon, 30 Sep 2024 12:31:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4625E4065C; Mon, 30 Sep 2024 12:30:25 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2072.outbound.protection.outlook.com [40.107.20.72]) by mails.dpdk.org (Postfix) with ESMTP id 79CA7402A3 for ; Mon, 30 Sep 2024 12:30:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i8AObAuibM4+c0Zz/fY8f84gaNuVpb2NLPcvKYIo8IrrzAS+ca+xw3Eu7sjGaglWmqMvZ80wd6wDUMGtssR2KtvO7QvjHV7DP8EnJBNPFQwTPzZUZvw2DdD9TTYmYlbxcGyPCNGerLw+BgLg0IICEV+6SkAfTzKk+iWmziwVjw2GtnX9xMkubUyKu12x0tqrV8M6EHbB3mECH5XeU/WjT52+RvvDN8KPWFcFeqjR22kGXqQSqryiwpMzHTo4e8c1GLtnCxJMJes0SuOV+cgpX0zO97YyBZmxSoqh6QDAvfHDPkpcI6u5PNBynmMlWWX2q3Saf4aKaGLxAyF5bWjwSQ== 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=XGoMQKlm5/hAHusacVypQONYnViGyjwcpAaA+dEmjh6JobnXJP/U2QQGneRuG2Mnl8gOUMoP5aUO3W3seCvzOtVqkqGVomK+U9+vSIqXLrW1q8VyNx/vK81nKO33tM5Od9iwIeG8EejF5biKerSjsXdRIX6BAGAoMdRVPxusN0+Rn/ZAq1DzUadD4Hl2Zz9WXhtfmSsIcYlDMvwRU32lJ4M59Opb53drolhddyvoo6IfqHo9+/Tg55A+8/uGYxT1vFl/AqzOq7XRBfuXbQHRltSXhaPZapyQpRJY7yIQa7v6NL3qVr5Ewksx1PP3tMcqHT2RoTmInqKf/8EkCw4w5w== 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=GCEKGrVftf+A8EqMRPakJfXotxU9Gi8bRtQ+fJd2i0mYppiyaJ5rLNcHXK4u3JuUxYfJbS/TXjg3o1U7B8HETszsElRgJvH7qj42K9dx75V8pnCi3kQ8L9RHSswikDD8GC8IVEnPGVMYpT4gxEAMNCpodKeTDm2gpbQQUlb+h1Kuql7oL9ArNP8h0ctGYW7UQJUGEULRdtV/U5Lun+3PNTAu38JjmUMsTJU2dzCONmhU6aA/0Y4MNZlxBEP4wT4Aa3JYZlilGptOcLfcIklsGSF3Y/cCxF5hhwdICRPDlIQ6AlRCxVgMouqlt+45B9fw0FwvPk6JK9FLnkBCIT+JQw== 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 VI0PR04MB10161.eurprd04.prod.outlook.com (2603:10a6:800:242::6) 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 10:30:12 +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 10:30:12 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, Vanshika Shukla Subject: [PATCH v3 07/18] net/dpaa: add support to separate Tx conf queues Date: Mon, 30 Sep 2024 15:59:35 +0530 Message-Id: <20240930102946.3236998-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240930102946.3236998-1-hemant.agrawal@nxp.com> References: <20240823073240.3708320-1-hemant.agrawal@nxp.com> <20240930102946.3236998-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0027.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::14) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|VI0PR04MB10161:EE_ X-MS-Office365-Filtering-Correlation-Id: cca4312a-f04e-4f90-f955-08dce13adde6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?zHMR37i4yo62cgggv0wvVz3lInatilVitJUM9jykWsW5+i9iQvzp5sTANf7R?= =?us-ascii?Q?/yD9BJtzDHXvpsEn/ql+DknDYyM5sawv+ySlpRK1mCx03uEAflx0eEH/CIdN?= =?us-ascii?Q?f7Uq+aLKHqR7fufbasynj4Z0YB/6YdJnr4/a9/3Onjk6krAmzpcEvZnmSLfE?= =?us-ascii?Q?LtjyXj6yNaMJwODR+UgGI2K4Orc1NnXA0k7fT437pakt1XLZ6KytDnUb2Eqr?= =?us-ascii?Q?t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S9hDcpr3ypS?= =?us-ascii?Q?TEQ9Tkw3Kqx7RjALSIzJ4yUkmDgES4xRwJVWiKAMpwDIM1gNoVox+vxlFEeZ?= =?us-ascii?Q?KY3rK5/oTtLj/Vl6tmrTQrrYdnKqKn3jhCgJmkTH+pCM/91STy6zuEBfvKIL?= =?us-ascii?Q?qB28EG/4peZTo69YsHheGdS/Lix68U39hDNlbj5y8ndBhXqIIOeChOstXraW?= =?us-ascii?Q?Qr1rZsw1aDXA9CICxpZUU6hpONMyNwl0k0HSTNfWNpFAqA=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)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?cQQNuuV1l/qavTt2ZWoVL1VtmiRjXPzAI1TIb2aerHr/Kz+Yy/ySKNGRL1ff?= =?us-ascii?Q?bxdZBNOMdKc9Iasa+QPDcb7NzSa3HUNrYjzbKV8JBIDw5RiGLg/BSHdY9uSn?= =?us-ascii?Q?Ue+PrBo7zRuxDxK/5QNyfEB+1Mj/cPbFCnsRMzU8qIQtL7K8Fmat/y8+oatQ?= =?us-ascii?Q?/ut9so5jQVRmC34JaUOyb1IHS31uqyvOR/nCKjTxzlZMXV77k2/D9FdusFaP?= =?us-ascii?Q?gSaa0fQOzY/WgyWec2Vx4Bxcj4bmGZMumLdI3bQ25tY8H3J4ooeVnbLELWpN?= =?us-ascii?Q?MZ7Tjxxq1i6owJeDw+TjdvVPAtPzt+HZPZ+/MbY/OgSHBSCrfU2vFGIw4xL8?= =?us-ascii?Q?jZ34H1tpFV6PRrG828HjGrMSVuiBWxQkxs9SF9x2nfh3BeAi61zI/ffu6NiY?= =?us-ascii?Q?V4hi6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j9oQRC88QFxeG+nH92m1Ng?= =?us-ascii?Q?INL1F0+/nYtBlVY01mTnS8yxWko5amb1/KQBYstitDCg62okojYf1fqphHKR?= =?us-ascii?Q?MnzBcBWAiXtW4Esj5YANqE8ReVfX8d5OgLZTk2TDR3Dc3lvP0AFkzven4hLJ?= =?us-ascii?Q?/E3RH9KLq2fO5xOSibrmXAUanu3q9i7IgeoDhcEOGaDPRqOUJWMBMxu8UbFg?= =?us-ascii?Q?FgoVeHncK9EQw9lMvUjeqQfgIeLSfVX77x32VMCCrRgQxA/fZTyrPq94ENGX?= =?us-ascii?Q?TbQFPiI+fc7yMsfm/2AFqqIRnHT7a94km4Cx5QBuWOtitYuyope+Hli93P9M?= =?us-ascii?Q?Gg=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cca4312a-f04e-4f90-f955-08dce13adde6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 10:30:12.8386 (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: GBKEZV4f6SgYDHSd+4py+frV8C7orH2+JtpFCjepn4FZZLcmtNkHiZO1A7pzLabjGqQOfPS5eFO/XQgd8+Ffng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10161 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