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 5D38845ADE; Tue, 8 Oct 2024 12:59:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20DFB40E68; Tue, 8 Oct 2024 12:58:47 +0200 (CEST) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2089.outbound.protection.outlook.com [40.107.103.89]) by mails.dpdk.org (Postfix) with ESMTP id DF6EE40E36 for ; Tue, 8 Oct 2024 12:58:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CmG/pohfUUGfhBwT8sjotwDuqZTS0XhQtR9q+YDSTLeRdAqCUDaTGSx3V4oOJeQZnZCDUdk9n1hPCRXkY4H+bQLIcLWKPEcZkfuyrM/tVua6nwcYPZxwlljYqTPZPX3qsBq3BvmSvpDlT1pjnZk8x2f3bVcQYF0t7rOR9I+jymh7accRu3nhLkeEULrtKWfK12MXzkx7sXAhH/I3Bo8Rh0PnebWyEaMYRU7sq6OK0elGHaDKdbHY/QyWomEvFLuvZ2Z3vtcT7aK7HGd3oigOs1m1VEAMDG9z8Nb6dzJbyrmterYfVMJYYF6152FSfJ/1XrV5uuS37OZqcFvfzr7p6A== 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=y041T6BAYeKiBWIybs27ykLIkbPCKg5nVBHCboi9Izg=; b=PlWCoRQzEBNf0bf4hEUHurVO4CcFYgEpwdq1sOuJvxysAzgKNQMr+fYjO5pVQuEWcsfkE+ix/GwOFVoeAi+5RRTel8HSJR1vvOBCwZDXMy16B//VUjCGkAABkahKNNFCp5VD8E/ru8NifJkDfKZqv/ITnPfpaIU09r5m8771naekXexpGAspswnfFGipCVIcl1AulYD+Sd3pLaTUtzwJULZX3n4FmqwDKp/bWbsxjzJP8j2GVFUugZbPuW5/0mfpu7ZrfT7v001+SKlFGIPo2gdwwjnn/HSvlFGpXxuQ9julH9llbPVFTA9CW+hPpOKcuSz85J9I15Pa4BqgK7IbbQ== 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=y041T6BAYeKiBWIybs27ykLIkbPCKg5nVBHCboi9Izg=; b=JX5U4sFZaCyBItIoBoxy/LMbEDRs11kqaAL1zeXeMGUz4f+hVcY9ObcVDaIWrXi/x456DTrSJKcmmBIhOX/YqBtrfDwlaVcm7VjFECMSGK2CaToxkZq9xbcXmYgZTLXNibanhbw7BcE4aGCDumjedHJgFXcRgtvqOHT5TUfq20QPiRLHDgIrc061jxOvi40k2JCW4+cFx/eWf2pULr1obb/YjV0ocOXp85KmhZjTsL9QLP+/yTyNc2ObhwposR21JK/+g5YP9vTxtnWrr6A7n9eNDdmw47RXZiwnpTx+gY9Ibqh+3co2C6O3/Qur50zMvADfdNtHWrFcNOPhyJALCQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by AM0PR04MB6932.eurprd04.prod.outlook.com (2603:10a6:208:182::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Tue, 8 Oct 2024 10:58:41 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::2e32:1a4a:7d29:195]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::2e32:1a4a:7d29:195%4]) with mapi id 15.20.8026.020; Tue, 8 Oct 2024 10:58:41 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Cc: Jun Yang Subject: [v5 09/15] dma/dpaa: support burst capacity API Date: Tue, 8 Oct 2024 16:28:04 +0530 Message-Id: <20241008105810.1454133-10-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241008105810.1454133-1-g.singh@nxp.com> References: <20241008072306.1256445-2-g.singh@nxp.com> <20241008105810.1454133-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR03CA0123.apcprd03.prod.outlook.com (2603:1096:4:91::27) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8198:EE_|AM0PR04MB6932:EE_ X-MS-Office365-Filtering-Correlation-Id: 1dd29345-07e6-4890-39ad-08dce7882b63 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?FbRuU8Bw6W4HCUGpqon83XfOUuFHphyV95vmbkaMhtoSxSmzxUo+kTk5tzmY?= =?us-ascii?Q?WYYyKg1k2RboFewoqo8Pzy9vjg5rDP9JLaT65G2SGhkO4YpT7xuP4FwN5zVI?= =?us-ascii?Q?3xHOAKlBbsWEySmyPRl9bmrGCn02MgvLFX8UBM+6iEwnZVUlHHXz1Q99KF7c?= =?us-ascii?Q?7japHz+dTXPx1XBJNWObJw5hQ4EBUunU1sDG7IJI+K2qqh6nKPXals9J++yZ?= =?us-ascii?Q?gg6WnLrjyxtt3iCbhUBh76+rSAmSKfIZkmrPm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iN79FKVS5He4hIfHRI1lgGf62fw64m1Bd8qyeFsLuZ4E2yyV9d1cM2?= =?us-ascii?Q?P+n0yAO7Ax3ej2Ck2HVO9TH730y4kMRNwAdDaOuHgR7QpS+CUk/63llkY//0?= =?us-ascii?Q?JvDJH8wCZ7AY330a1eIJ7fIoE18trVrObUFAdFqY+APar0ktb5eoSDILgmwL?= =?us-ascii?Q?iB5X+lpc4FIjmKiuUdpxu6dqsiT/pyBPpF/hSeP2tfC4gg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?niDjeu85dAoIpcCHFGKas19mXz/2KNc+tooSceJuklGUsO92nsZA9SOdEmE7?= =?us-ascii?Q?OIBhqjZSiRoChtSs4qUf9jlfBhPWza517N0Be3uROFj5cHDysVcSWycEgguY?= =?us-ascii?Q?7lMMBEk0rBDnOcNqt6fBH3gLncO4BhNWdXgqZpry8eMyh6bXwcfJC2BY+3iK?= =?us-ascii?Q?n5eddtAz+3JMwu6H6Az0M2QW64cINeAViqbuvbbxuECjS3sxszbYKjVcVFdS?= =?us-ascii?Q?XvAzOHJq1Py+JigmXOnvWDCn5m1+shVpQ4dBcUdt1zkUEiNWCESgfjLFviPY?= =?us-ascii?Q?JPAcL9kjMljYqEd0yzMjxhFWdxHcsSaUVQ/rQwTF4klwKBj1IezcU3cKvzDp?= =?us-ascii?Q?/6pigAlo/HErFko73DXf7UVzHaFPc9yYmORfVoqDahhlTIlSi32xhXAZ0Qm8?= =?us-ascii?Q?Xw/p9EAFgvWKZp+43mjxAKyKDX4TAAGP5cymm2XqlL9EWB5aXDc8fK7SmlE8?= =?us-asc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R5eJ1Si6Ps+/Dt6Z?= =?us-ascii?Q?tYrZwXEUDIt9ADniTdpwaJ5HgHin4ajYc/gh7z/xKNRcLGcXGDNuUDBGGZZj?= =?us-ascii?Q?xdrW5E2MdfV7GQiy54oH9Ffm8yOpRD4BRHkyGT+nmlvA2bolpmd5WL5ppIq1?= =?us-ascii?Q?CZM+769Nf0LHu8flA6AJrGa6yT/l2Eq/ONeuAEptwRqNJTkNWrhRvfu8s4cf?= =?us-ascii?Q?jsDdkXZm0uaTeldjofU=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1dd29345-07e6-4890-39ad-08dce7882b63 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 10:58:41.1326 (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: cHR2pdDgnCONPv/2Xw1ooO4sjdPFwW/qZTrnUqvCBAVmIHeU/5CSE4Vc1cqQ2rDF X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6932 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 This patch improves the dpaa qdma driver and adds dpaa_qdma_burst_capacity API which returns the remaining space in the descriptor ring. Signed-off-by: Jun Yang Signed-off-by: Gagandeep Singh --- drivers/dma/dpaa/dpaa_qdma.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c index a10a867580..94be9c5fd1 100644 --- a/drivers/dma/dpaa/dpaa_qdma.c +++ b/drivers/dma/dpaa/dpaa_qdma.c @@ -1039,6 +1039,15 @@ dpaa_qdma_stats_reset(struct rte_dma_dev *dmadev, uint16_t vchan) return 0; } +static uint16_t +dpaa_qdma_burst_capacity(const void *dev_private, uint16_t vchan) +{ + const struct fsl_qdma_engine *fsl_qdma = dev_private; + struct fsl_qdma_queue *fsl_queue = fsl_qdma->chan[vchan]; + + return fsl_queue->pending_max - fsl_queue->pending_num; +} + static struct rte_dma_dev_ops dpaa_qdma_ops = { .dev_info_get = dpaa_qdma_info_get, .dev_configure = dpaa_qdma_configure, @@ -1152,6 +1161,7 @@ dpaa_qdma_probe(__rte_unused struct rte_dpaa_driver *dpaa_drv, dmadev->fp_obj->submit = dpaa_qdma_submit; dmadev->fp_obj->completed = dpaa_qdma_dequeue; dmadev->fp_obj->completed_status = dpaa_qdma_dequeue_status; + dmadev->fp_obj->burst_capacity = dpaa_qdma_burst_capacity; /* Invoke PMD device initialization function */ ret = dpaa_qdma_init(dmadev); -- 2.25.1