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 754854564F; Fri, 19 Jul 2024 12:05:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B712E42F95; Fri, 19 Jul 2024 12:02:46 +0200 (CEST) Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010054.outbound.protection.outlook.com [52.101.69.54]) by mails.dpdk.org (Postfix) with ESMTP id B441942F37 for ; Fri, 19 Jul 2024 12:02:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TsikJJBcPQOUW3t/f9nNWAGGaLioJgobD1s36BTOvyR64tUaIbDkPgDR8XcEYznbaEg4SvsxNOst3VodmN3nvD6ycr4UnL+44OR1Dh0DPve6vhDAjqtevpXslx6T/r7bFTUd90doK8PB0OZnUx8nXS9xZVS97ogBO6VBEw6IJMLDitmCsu91hQ+e+cUd+VhA8DrVxDOxkr/DAAfjtlHyjsQo5cVI/CvkBZDAilsjxeOEJI0zEs8gyOPlQvGYtNs7V9868bQHO1S6pAso9EFn+7fpWVwiEQjizJcZ5J9fECPg+uPqQGA4m4ddUxXTnXGtupYUt+7uMfr1WKr6uow8hA== 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=w30Vop6b8i/osESd5Rvh1NlKvkUbWqEQSjUQhSw4ivc=; b=JdDwgzBUj0izXwutlcxCxpO2MAcyJ3amPVaBVCOW8IMDVaQtbXS3evV9hoKOEeLQ0enkT5ymIzOfDenVjah2fbtAJ/1+3J2FIRY1JERb0JTrWSEaL9ICAnO8Vfwh99fRGD2QKAQW+PNYve3I05wFSPCfIq4pgJjrULVV+sncGI4HRMIcjtzs5/XeqyqJNwyDfk0ogAosyamCYFqv3z5erOgqAOMdCwAiunDgfY9xEM/Y6HvBk2VvAzj/YKNnvW3x6McxRZq140D+aZex06qD4qylkX/eY2VxCWWOKMXLjP0oLkCp9c5L88akJL5Sgm+QiRQsKYCyNsqC6Jd0g14lLQ== 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=w30Vop6b8i/osESd5Rvh1NlKvkUbWqEQSjUQhSw4ivc=; b=Pq3QdWe+2eL5TJojx/pNGV01AZ9h9Ijg7XkQvFoREHoqqa1nGxBW+zEbQriPlJujJdQiJS0a7t/+9owaLsuHngrCsqLEWSicnIqNB+pOsDSCJpXgro/oTZVs3uUnwh0lQYrS/UFLHhpKJ9IoHLVYa9+8TLTZ/tgP1uo4UzrOJs8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8205.eurprd04.prod.outlook.com (2603:10a6:102:1c2::20) by AM0PR04MB7108.eurprd04.prod.outlook.com (2603:10a6:208:19e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Fri, 19 Jul 2024 10:02:27 +0000 Received: from PAXPR04MB8205.eurprd04.prod.outlook.com ([fe80::7633:884d:5973:174f]) by PAXPR04MB8205.eurprd04.prod.outlook.com ([fe80::7633:884d:5973:174f%6]) with mapi id 15.20.7784.016; Fri, 19 Jul 2024 10:02:27 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Cc: Jun Yang Subject: [PATCH 27/30] dma/dpaa: improve silent mode support Date: Fri, 19 Jul 2024 15:31:23 +0530 Message-Id: <20240719100126.1150373-27-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240719100126.1150373-1-g.singh@nxp.com> References: <20240719100126.1150373-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0184.apcprd01.prod.exchangelabs.com (2603:1096:4:189::9) To PAXPR04MB8205.eurprd04.prod.outlook.com (2603:10a6:102:1c2::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8205:EE_|AM0PR04MB7108:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b2188c5-a813-46db-87d5-08dca7d9e53d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/zPbgGTgaGYPVh1zJrTxkw0uqOtWrgWsWkf/M+Q3WkoGWARSeRZp6xR/xmve?= =?us-ascii?Q?iU/DlXEK0h0oVPdoadlAyXY0DBmT1N4yxO0qWaZYyKb4eruV2zOU5u2NypkJ?= =?us-ascii?Q?r3ndP7wrKy+Q+8f2QZk69z1Pgn1Vl0483qdYSU3Bh92JDf9DsBdpCSovorXg?= =?us-ascii?Q?j5o+5irK6TikLrk6u364j57rPWAMqCqM44tyHCmoxu98KR9QXOdYdsv3kRKn?= =?us-ascii?Q?HK/+Rx+wb1Rzr+1bVEjIwL9nwUewJR58zoRdln8plTgrsfJrqI9PsjkHPPGQ?= =?us-ascii?Q?V4+euvntwHi5g0A0Yu4//lVRHc4tMDep/wvyh88v8yMelk75ekBBr43k0bnE?= =?us-ascii?Q?yDhdErlmVUWp3atkFiGFICfjaTepxHJ3D3hz7Uon9wpGL4zrjkZFczFbItDt?= =?us-ascii?Q?OL45SOZtizTqyeSZL+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ii?Q?meSOVst9jO3ryZj8AB2MnkIahDIKEnsl4hhJyLy22uK1A763q4z6IeqUJFwU?= =?us-ascii?Q?76alFAfVTXWb43COw/ZDS/5t1QqzE7Gx4GGtEWH0nt3HzPArSg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB8205.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?CHo9q+I9yItvCJ+if/N+kt8cfRM5XnHtrppAY8LzpzN36ZYt/VMOupVUMycj?= =?us-ascii?Q?Ya963DpirzGfoboHC7x9oCuMe2OQD7Orv6fHW/jfp/d7S4ozjqjjtWf2UQF1?= =?us-ascii?Q?c0s1TI1j8/NP4RuM5MRDRJgAl1r2otcvA1VgCuRhuB7OueVT0JssmRRXUqSY?= =?us-ascii?Q?0KgFABCBeIryjYMSRsqZVx2JyuGZ8RW+O4JMIfk6c//EHMuRSpHAW9/UJ6K3?= =?us-ascii?Q?4Of8QCwnDzTriLnpRdvClMyMTRo8gnU1NpCGh8OxBUXlkUq2rEl4ODJUVqVg?= =?us-ascii?Q?AH6V/YG8oeaTKdGAAtN6g4rRHbzqgyrCSZUcGr+lAUvPMd5TlUImliuoQkWe?= =?us-ascii?Q?Y0IprDmDOYlFy3WdeiNrM8Dk4aTEiP2WuoSou4IXrXaFIK11bZBuJKeTSW80?= =?us-ascii?Q?CqX9zLXVuc0MceQN2+bDZ3K4fdWWBI6Pm5DrKHsoAYyAD/2WCz0e2r1NROLR?= =?us-ascii?Q?/YOcdqyRaA6UPgpt7Mbko1G31u6+bdLSkXUoDs13A4ctj7KSuPiDH5q5K7+u?= =?us-ascii?Q?vY7i8bIKVgoNYsa7gUYQOu/9H7nT3lAO4vq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ascii?Q?6rwGnd7ZOUy8biZ3rLjBofExASOAPQztDnoNetZv8LyyxGSSLZ5szJYh9Hav?= =?us-ascii?Q?qsrzkesErlLCUfZm1okn6q/bFiyXBUN0lxKenq1NpXajyGCA3UT7CtdZBosa?= =?us-ascii?Q?/2CxEtDSvxye7X/ZGepJRMpNcRLAqwvziKOnqGZu?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b2188c5-a813-46db-87d5-08dca7d9e53d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8205.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2024 10:02:27.7362 (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: KgnyNs0KMgFHn1NFeTVFxw5mCgxnJ22iAZ621F9RWN0MvhJRLLKtswJNgZYbYZ0u X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7108 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 690ad5a6ff..b059d9b7ea 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_slient) + 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_slient || 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_slient) { + 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