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 A7C7E45683; Mon, 22 Jul 2024 18:43:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5A71410FB; Mon, 22 Jul 2024 18:41:08 +0200 (CEST) Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011023.outbound.protection.outlook.com [52.101.70.23]) by mails.dpdk.org (Postfix) with ESMTP id 86ADC40C35 for ; Mon, 22 Jul 2024 18:40:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h62lfqGJa4aAm+m+1Gi936AIAIdNkRULzXHbeIOSVCXR2C2OpzJ1Dttl/Kw17rO58yaRkX4VsZoVQ2y9wWpWgQp2gYHvxtp/L7177bvr5m0fmqCCV3mwMjn9/bI+ewKgwjQKBVMrmoGSfmH54gkIHnO8gT43lI9ASCy8rn0Cm12xyprSnEHT87s24O8FMexCBMtksQUebvD3sitPG1ue8l/3h6jVZce49J1hTxhsXX9QnuPFe2RNVaOB4EBEEUfPiReJjw3EEwGyNcYe0EXbdjzajOGrJ+GbMdpOstktOmEBMhbpR6CexBUHf+Ec1s+YpRjlU6demEkrucYPRyPGkg== 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=dD6irFh+S+2CpJUTE5a7b/XIGzFEL71shfOr244B+3g=; b=n6wW5NE1xyeZhUyC87nQYHHwMd2ym6Rsk2HQ+O3m1sx4Lb6m+zqSvPo8V079lPqzyYzl4Qmgtmv1uO5U3ZmLb4A1n4OXPWxnxcy1WtG3KF/f3Ll8ssVfozZlqjd4ZoW9BuArBrqux8SEDTfAVrvCjOE/MXdL7L0E19cdZ0Kn4CSdq1h7WNB7ciVl+dtLYuz/QwJEmOgqyxl+iSqMIi0PkSanpeybpQD9ItoqGBUN7iEWi7P7snKrbvhsuQFqXCr5t6y0hYPLhVVMwZmSqHGU3dbOpkIJI72n3lOiU+naDyKNKR5LO5CKdjJtaUL461WSvX6zwlYttPXiiCIqoowotQ== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dD6irFh+S+2CpJUTE5a7b/XIGzFEL71shfOr244B+3g=; b=mdnumZXZswH57CDchIO5vuIqUC5twQRn4XLUpF0VEfDgP05q4L6zNz2eYTYXo73gr8t47fZimwFIaFmEw4EDAjbw3xmZLOEEETTRVGbgZH3MbvRq40vk/ELX3VFi3w2H3u74SFuT2SDEj3r12mgCTvyejjL6Mu9Uc3SEbxUY/WU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) by VI1PR04MB6798.eurprd04.prod.outlook.com (2603:10a6:803:131::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Mon, 22 Jul 2024 16:40:34 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%7]) with mapi id 15.20.7784.017; Mon, 22 Jul 2024 16:40:34 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Cc: Jun Yang Subject: [v3 27/30] dma/dpaa: improve silent mode support Date: Mon, 22 Jul 2024 22:09:27 +0530 Message-Id: <20240722163930.2171568-28-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722163930.2171568-1-g.singh@nxp.com> References: <20240722115843.1830105-1-g.singh@nxp.com> <20240722163930.2171568-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG3P274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::26) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|VI1PR04MB6798:EE_ X-MS-Office365-Filtering-Correlation-Id: 478c3db1-a238-46e2-923c-08dcaa6d0206 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ZfQCXblAIh8bppnjQbh7/wwfYlPs0/gL6i43mQdJrHgCnxy32T3G5SWnK+4H?= =?us-ascii?Q?MzS6ZNZCLLaPzz7Xz2/jaqdMhA+uXlYpXBde1hGq0v48D+QtPbN5ZsPhesTL?= =?us-ascii?Q?Fr/Vn+lp3gFwp1xDl1EC9hKNy2gzsT6S2URl8yiT6lF5jLdXDtIxP8vxwSc7?= =?us-ascii?Q?hAJLYHbzP8zVpqWj2Pn6WV/pkhCzXHPDEsRJHag5vf3J3geBnGG/Ks6MZcs7?= =?us-ascii?Q?5VwLUodo/11tgJ5XsqvaMPOKBjbYJL+ao68uWY/OEYM0LSKKI+ScvykuI5CZ?= =?us-ascii?Q?P7eEFM9bhdtiKxKiEsk/HL4Cpo5BJxLd00hlaE7fBAtZkb4+Ufr9oeQETrzc?= =?us-ascii?Q?KB5xarTIvv4HkGjTYPseZW7G6zJswE/Q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?us-ascii?Q?1t0JHbuEk3KhjIOcXAFMzc1+VgTtrmQ/AOGIFT3i2c1M0gAcUQkd1dLC1kgm?= =?us-ascii?Q?vvZnOoDRIfTxDMAWMH7ekIEf0Ktoi9HywsVsSzrXN0LiBjIfH8Ncg+sfrE96?= =?us-ascii?Q?YGQAy5aSHKxQonGELpBYO8X0MCUwHzlYUSGGiMzNukB4pcMi3w=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8SPR01MB0024.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?leYEMGTpmGZ1MG5pxsqOU0B4w7FIzgDD2vBfokTRJ5LuYdzRp2rpYp1YhagJ?= =?us-ascii?Q?/KgkAx6N27KzZS4mw/DKeCnEW/SpoCYHqDMOdOu0apm5PyhoHViUOPwN+0M7?= =?us-ascii?Q?870s/2E27sVl8kd9/2BJ42rPDtzKQT1DMCrB9p4y6wnJlKO/mVl4aqokzF7W?= =?us-ascii?Q?eTgnNeeRXikFKEtLqWDPbbLu6KGSUSEmI1BtAFJNwQGvkQBQakSD6kBHOzOQ?= =?us-ascii?Q?ycHXulLTV4XZEF+4b1d07bghHMIJATCZ6i7M3l9tbol5C59CcODEs4Q1Goad?= =?us-ascii?Q?0MEKD8wQoIAcf3jMu3wZz/Q4onME4DRTq6f7ofaNjzwbFIX+LEH9dkwHFkff?= =?us-ascii?Q?CygvGoo6VplyTqs2WZOg1oRbNR98THwmRCcerGOX6Mj79rtqyQrpZZlIOxuw?= =?us-ascii?Q?SpBZc3BOA5DRh67UeqX3URTYLvxZdFoE0Y8qJXA6kiYVwkiq74pK/MkmUlUC?= =?us-ascii?Q?Mzu0DxUQba0OSMK/1eUfCPO62jQ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M6b1TIFMi4klCaAONrr/sR7iWEEfxjUYo+UzPfA0hdQEFIEA9zvARuVur?= =?us-ascii?Q?wkHuCf6ZfOg9BesAhQZVwpuIvqqqF2i7AEsQ/TbTfYVE2CDiuvh5BFaWVfhp?= =?us-ascii?Q?w7qea2ktYLxIA12iezlRPdPeexys0yhhmbrYlGd43an0cOt8Lm+2eXSGKLbc?= =?us-ascii?Q?hBJ0KR/QJlcQRS2PmVid1s5HCfB/oPo+ZgS+J+Xt?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 478c3db1-a238-46e2-923c-08dcaa6d0206 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 16:40:34.3319 (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: INLZdgjuDEmbgsAtFsctuaeHh9+jiTVh+ddIX07DA94iVjMJcoly0VuwmrnW0/cv X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6798 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: Jun Yang Don't save eq context in silent mode, check HW status only to identify if queue is full. Signed-off-by: Jun Yang --- drivers/dma/dpaa/dpaa_qdma.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c index 5d91ad2d70..8f5b6c6ea5 100644 --- a/drivers/dma/dpaa/dpaa_qdma.c +++ b/drivers/dma/dpaa/dpaa_qdma.c @@ -586,9 +586,13 @@ static int fsl_qdma_enqueue_desc_to_ring(struct fsl_qdma_queue *fsl_queue, int is_burst) { + struct fsl_qdma_engine *fsl_qdma = fsl_queue->engine; uint16_t i, num = fsl_queue->pending_num, idx, start, dq; int ret, dq_cnt; + if (fsl_qdma->is_silent) + return 0; + num = is_burst ? fsl_queue->pending_num : 1; fsl_queue->desc_in_hw[fsl_queue->ci] = num; @@ -697,7 +701,7 @@ fsl_qdma_enqueue_overflow(struct fsl_qdma_queue *fsl_queue) check_num = 0; overflow_check: - if (unlikely(s_hw_err_check)) { + if (fsl_qdma->is_silent || unlikely(s_hw_err_check)) { reg = qdma_readl_be(block + FSL_QDMA_BCQSR(fsl_queue->queue_id)); overflow = (reg & FSL_QDMA_BCQSR_QF_XOFF_BE) ? @@ -707,8 +711,14 @@ fsl_qdma_enqueue_overflow(struct fsl_qdma_queue *fsl_queue) QDMA_QUEUE_CR_WM) ? 1 : 0; } - if (likely(!overflow)) + if (likely(!overflow)) { return 0; + } else if (fsl_qdma->is_silent) { + check_num++; + if (check_num < 1000) + goto overflow_check; + return -ENOSPC; + } DPAA_QDMA_DP_DEBUG("TC%d/Q%d submitted(%"PRIu64")-completed(%"PRIu64") >= %d", fsl_queue->block_id, fsl_queue->queue_id, -- 2.25.1