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 A89C645681; Mon, 22 Jul 2024 14:02:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF16C406B8; Mon, 22 Jul 2024 13:59:55 +0200 (CEST) Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011007.outbound.protection.outlook.com [52.101.70.7]) by mails.dpdk.org (Postfix) with ESMTP id F1B1940697 for ; Mon, 22 Jul 2024 13:59:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZRS2grZeuIZ5R8Yn5cFDIBsQbcgfkkr9cljfdt2Rw9vmLuDcpv3ITxHycMUJM8SVP25TM5Yky+7lWDnxECPm1kUGtR1SzaWs832thwV+3Ijtkbr/OBNVm7Ntr65GQBDwnQlRC3fqG79j2l4D4jmxTF6S1VgDy6jkYQ7J6AW/WILSnYZJlU7g0H+iY7ITdOZfBjXiRp8IIe5Ve3kUXvNSdsMMt7LhCvMX8o6fROcvWwuSPxRRrvqWh7Emd0cwoIycEM3+8F19hQW/RoKGKvtnN4wDLbQw2XSH9J+1sftUiAMc8KDHbzUzITNhxDjOvl9rptgJuoXnAgx14lC0bOrVVQ== 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=IP3dx75uE0amT3StNugRs5uHNwgQtQhCSV9Ki1KPrxjIQgl+B5Gol1xjtmdR1AW5+SFJXAOmdHiQLm0Q7R5tXGtnZqY/0WU7HuLI9dnIE68Yk2/2b+G35wClbluNFCs8HOvyCVmpfhzn5C1yximQasaKYP9gI1Z74l+MapJ+OwNtJka6bENPf7F/ARp5/Kh++KLdehUQV7h3WXm30KPQoT7bsS8VnRvzEpjk8Qt7Qtag7OFLpY6tV9XJfNvrzEPWvmbXpbzFRmIAoSw09MMrpvSPNNUgHKGTaCOivWXiU9vEkXDHahTaoqeb7BSLJTQpo3jtN5cZDuS3fLpK1ZWx8Q== 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=rDQc2hjfEkZpbmsx7N1HfBlcdE3+mSGsXPN6sCE8jA8f2gQkynZyYXGgp8sRWjL5vrTwx6P51PKLUtZCmh8jjEvOjwomolcqO2rIkr1iAdfoEoMDStB1rlqHzDhHj9F/JHOlPBJhNWn7TlT3FYyxUkNUSdff4wgBtxJU9YeA8dA= 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 VI1PR04MB7118.eurprd04.prod.outlook.com (2603:10a6:800:127::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Mon, 22 Jul 2024 11:59:51 +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 11:59:51 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Cc: Jun Yang Subject: [v2 27/30] dma/dpaa: improve silent mode support Date: Mon, 22 Jul 2024 17:28:40 +0530 Message-Id: <20240722115843.1830105-28-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722115843.1830105-1-g.singh@nxp.com> References: <20240719100126.1150373-1-g.singh@nxp.com> <20240722115843.1830105-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0025.apcprd02.prod.outlook.com (2603:1096:4:195::21) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|VI1PR04MB7118:EE_ X-MS-Office365-Filtering-Correlation-Id: f62e5d5e-ef51-409e-d36b-08dcaa45cafb 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?d5ssGRtDK+idvVYl5ch3ntJhJruD/lLfC+b0KnNxtwWLMvvKd4pYqBxsty/b?= =?us-ascii?Q?dLsxU0iJRDwTwBvUQnTO+O8RvHamh0BIqiaTT6iy+sKgctYvAUpTaFmQ6r/k?= =?us-ascii?Q?hIV6gD6z8cBR1GSGcR4oOby3+cOvnrslQRWSX48rb4KtiuF+W5s9knHiv+gP?= =?us-ascii?Q?ouluavplIjHH2uEzNlMo96srz1AzLqb5Rb1hMhSmfOXEe1/JKWVgl7V62eud?= =?us-ascii?Q?BFPF8n7XuPLxGNEKnf4iUGJ39RM8du5rXXnhZDuZ0YZ59Er99VHuPp7GJ4Vz?= =?us-ascii?Q?Bqlp1O80pk9yONvVwFEYlXp60eavH7FCs6oYQhzuYRU5kKfspnounIHVS1pn?= =?us-ascii?Q?EZbPjH5dMDMpF3AXBh3uvgxKdItsKNWxNk71aJg2Iw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uqzDXLDc6zfCjNyjGbfFFvpnJun3ZR5L1LVTuHhBRXfx?= =?us-ascii?Q?opjeiXvDVU2uyIwbpZyszqHGl4nzkYu2QlszLwHOZrGRkNrXu1eYiPoX9m8Y?= =?us-ascii?Q?IQ87bA/Er93KNJC7q9Ce2HWI7MyckFyTDq+x9V5EqgKCEYGnHQ=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)(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?LWtDJL/NF1LP3CQK5NT7Zl3ZeW8hu1jeR8KdRT4a6MZz5oTIkea51GuLELuS?= =?us-ascii?Q?1fjvqV7DI1SrYIHgcqkzG74/hN5CV6umGqLG7VBAmnpX/1Fap9s25NPKzfD3?= =?us-ascii?Q?qlnbxBTQ/EHVf7Ppe2pzI11ELfFDIR4POnmNZ+vm1z/LjqounEco1V4C5cIq?= =?us-ascii?Q?8wEMecPJ0NYSZwwjs2RZhcIgoUQzuHe7PdOlhOHsGhRsU3PMFSURct5f5XK0?= =?us-ascii?Q?+j/zgWeaaDJBmvY7LVsfUSxgWrHNGHFjg9lLbm1RhyF916Y6NxRv6U3XDx2S?= =?us-ascii?Q?NjSb/fg8q26RIu7f6OP+Uq3E7wP/ptoyiQPhQm41AJlbmpRhaDwZOMRNLZR9?= =?us-ascii?Q?bvWmhN2dd6lbiAnwrrd5e3+OlTKW9v9qBEATvA9AhvvGIB8JwGErDQbAWdVB?= =?us-ascii?Q?Y0DTEv4/QnlWba51eTN1k4zQqbgIfI1pYl8DkRXfVFBkUyd39WjPqSRIcMLc?= =?us-ascii?Q?I2v0WXXBwFYibbqpCzDrJpS1Ep3VMiQgFYvBzI/K0aB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Mr13XzHkY/n3bK+0LxvCBp+nWN1RsGMwvNeJQZAw?= =?us-ascii?Q?5tf71Ia/NT1/TnmSt+GJx7fr99IUPrhWFNubFY1lE8p+6W9acrTjakxfAU2d?= =?us-ascii?Q?seQBs24rq9kVyulFHiz7DcjKjwJ45Jy2dBoOzuyA++rIKyj1xjl+7JArqkMo?= =?us-ascii?Q?KoP/cnSFAgKGpXK3pW1wl0iBkUspLUwlC+6Z2ZB7?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f62e5d5e-ef51-409e-d36b-08dcaa45cafb X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 11:59:51.7107 (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: e4D6nL6URmEFB3dx/cVm3FGb5iMMMLI+Dff1vERMYwIpNZxl46Ye+zRcJfaSAdbN X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7118 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