From patchwork Mon Jul 22 11:58:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142601 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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> 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: d5ssGRtDK+idvVYl5ch3ntJhJruD/lLfC+b0KnNxtwWLMvvKd4pYqBxsty/bdLsxU0iJRDwTwBvUQnTO+O8RvHamh0BIqiaTT6iy+sKgctYvAUpTaFmQ6r/khIV6gD6z8cBR1GSGcR4oOby3+cOvnrslQRWSX48rb4KtiuF+W5s9knHiv+gPouluavplIjHH2uEzNlMo96srz1AzLqb5Rb1hMhSmfOXEe1/JKWVgl7V62eudBFPF8n7XuPLxGNEKnf4iUGJ39RM8du5rXXnhZDuZ0YZ59Er99VHuPp7GJ4VzBqlp1O80pk9yONvVwFEYlXp60eavH7FCs6oYQhzuYRU5kKfspnounIHVS1pnEZbPjH5dMDM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P: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: LWtDJL/NF1LP3CQK5NT7Zl3ZeW8hu1jeR8KdRT4a6MZz5oTIkea51GuLELuS1fjvqV7DI1SrYIHgcqkzG74/hN5CV6umGqLG7VBAmnpX/1Fap9s25NPKzfD3qlnbxBTQ/EHVf7Ppe2pzI11ELfFDIR4POnmNZ+vm1z/LjqounEco1V4C5cIq8wEMecPJ0NYSZwwjs2RZhcIgoUQzuHe7PdOlhOHsGhRsU3PMFSURct5f5XK0+j/zgWeaaDJBmvY7LVsfUSxgWrHNGHFjg9lLbm1RhyF916Y6NxRv6U3XDx2SNjSb/fg8q26RIu7f6OP+Uq3E7wP/ptoyiQPhQm41AJlbmpRhaDwZOMRNLZR9bvWmhN2dd6lbiAnwrrd5e3+OlTKW9v9qBEATvA9AhvvGIB8JwGErDQbAWdVBY0DTEv4/QnlWba51eTN1k4zQqbgIfI1pYl8DkRXfVFBkUyd39WjPqSRIcMLcI2v0WXXBwFYibbqpCzDrJpS1Ep3VMiQgFYvBzI/K0aBYSLyb0V2mER84ra7ENOgYUFjBBgeIqL2c3nXL0egkkycBxtbUTaZb+KehMfIsIb7ypopMhpJQiUz/u5gXBm6vKG8XHS2U0n1UDS7Q4NpWNSkom0z1ZEk4QcrWso0AKTk1qjhKYvRD/GAUExIoPOpwzMpp9YDIk23EYM0+BlbekQnp3QC59ebt0VoZG8SJm+niH8ak8B29u82Py/hE7HOfRBxhHOGz6KRk/W/KB0qmJO/aIkPkjEy7JHvzw+N/OniPIeOV2Ax54jVekmPIRN0w0pF9h/CU1H+wW77xLE7rrjP+8w9Uem9AVD0SBOAWjJiExT2vmYzndRK9kkfccZ/VDuRywBM8u8TDstbUgHa/ggX0TRiX08+2LFYPrgnD4eEyQwGFLSHds2h7q1hxVrlxgxE2uB3KGiEXP0Ln/vwTDCeOmPHR3Xc4foPPQDgKFWgZbjA2b7UDAvuMAK63Z4HkstWddnDNv+qyq0Hnj476RpbhlwbIxzDiNSpZ8rVuZpArzPXcFH3aDw9wYkXEQ4FmGDdhe+h4Dpm5bFFnruAtdOi0N33jliehLmfSNfCHv7L1YFGVKeOTFjmotsLooYSNkgka3Cn+/htutooYzvaRDOEIC9Vg3Lcx72kTxlUF5M9KyC99wNa67OdHj++VtooZvd9Kb+v2iTFzGBgMjHbs9REWra8rVQqexnDcbMf0/O/SWIK9rEaVeCb3ox1swULTk7HeX400Xmq+JGsP75kMVzZGcyrnB+lmLYlhxiXA6K2BjJQ8aG/NUz19U5fvDFr92OFbDPi2U29/dlF2TB+bxm4esiBxerEh68sL3SSjguA872gFaJ1cow+pWPGwN2mzHVZbTR/A2B7lu0UNLTlN6/YMMr13XzHkY/n3bK+0LxvCBp+nWN1RsGMwvNeJQZAw5tf71Ia/NT1/TnmSt+GJx7fr99IUPrhWFNubFY1lE8p+6W9acrTjakxfAU2dseQBs24rq9kVyulFHiz7DcjKjwJ45Jy2dBoOzuyA++rIKyj1xjl+7JArqkMoKoP/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,