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 3DB3D45B36; Mon, 14 Oct 2024 11:38:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F09840A6C; Mon, 14 Oct 2024 11:37:25 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2065.outbound.protection.outlook.com [40.107.22.65]) by mails.dpdk.org (Postfix) with ESMTP id 9724E4060A for ; Mon, 14 Oct 2024 11:37:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iW+iDsH6mmyaGheDdvuKglPKnMUhfWGsOO8w/GRl2B6hPcT08q78wnSGhmS4i+W9NLkS/wfRf4zICi22nMLYdoA+TKDFaKDaP1se+nEuWBW4rsi4SctUnL9k7MGApg8VIRi2/XgVrPyuGxc9a8CXR/nAg7KWlxyRS3DIbuaxSHZhXBPc2OBnkuCimzvNu989tmevhiqvWsIoE63uvQRbn4qbLes5h4Bt/l3zTBAT9jeyo2oBaFt0fX1/8Tv46qhn2dnjxqS3xzU0CHRKKeIvg5BEJQY2AxrryFBysNFpQKTxqCXFfpi7OeKTa0SGlX+S9GqY0+dLEbuJtkSa4zzBoQ== 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=xqPwUNJLi8t3MyLuG+R3waHj+OtCax4sXelj0MDNbStTAR+grIqcjvokDdZ48tivjycNXpV4I5TBlfllgq157V7TEKbj0VdE0W1CyjJ+oBaUsHVZjFMOb1xCoP45p6iF5/0rizWwbAJ4QsLjdU6qquqfpn+KvJ7AQpL2dVClSRIuc8Nm7SIUshYdse7LOQFXauAU7417aEyAQNsyYyHYme9t8gJiUkrvBFVO3U3+s+7UzKMOZiFYRcfpH7NXMLfS2yikr1/PAzG3GUcpBBHuEJcBlObiwZbfBBGtwN61EIc+oI/JekNzBK9ylYgDka2hv/6xRIgyFiNlPwl8SXujAw== 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=i99gAwWQ62WR90EZSBTs/BFskdmmiG58CxaGKw3c2rJ69+VxanN2hQmFD+pjsGLXLenvTSgFlOt3XzD+vOGVGjjOX9MCaUuNNkw5GBsHE0q5Vdq1HXmpNZNOxmiHS14wUKaXk2IL5Ay8nBfNb0mYR5Aef+rwCEFIz5t22Em7D+4HQJeLrBSMOpPJHdc2S/pW52prtgWBS+kyEFThLY3mEo+5x5KuBxdzj6oopOVeh4Z7HXOd05W3Ts3jXbge5DdsIh5bsfqC67r2Oia06PAh4mSLKYgQeu/dMANXuCiwmakeC5ajaRdi51vnE3IIZQ8+SDauEN2ZRHB5fXyxV9MNkA== 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 PA1PR04MB10580.eurprd04.prod.outlook.com (2603:10a6:102:482::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.25; Mon, 14 Oct 2024 09:37:11 +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.8048.020; Mon, 14 Oct 2024 09:37:11 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Cc: Jun Yang Subject: [v6 09/15] dma/dpaa: support burst capacity API Date: Mon, 14 Oct 2024 15:06:33 +0530 Message-Id: <20241014093639.553467-10-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241014093639.553467-1-g.singh@nxp.com> References: <20241008105810.1454133-2-g.singh@nxp.com> <20241014093639.553467-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2P153CA0033.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::21) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8198:EE_|PA1PR04MB10580:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c17800f-bf8a-443a-3232-08dcec33c78d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?w58SiDZYtLaQuYfyhBWVcjFWbYphzDX83DSD+Y3tGY2kfBZJwlotNTJBLGQ1?= =?us-ascii?Q?u3KypJKiaYS8CPbALjwBs2DbhlAGOsnloRlCC/qcDybTtJLPlLNgqXACeE71?= =?us-ascii?Q?CCk3cG6XBgz1Hdb1deMseobSe9lCG7uCvYxMeEJsvSAc2Tj80bjNFMzl6Kk4?= =?us-ascii?Q?l0kaXA6oscEnPlNhRh8ocwZBxS3US0hanYIZNcNktcn5wOx1ZpocBXIGyE57?= =?us-ascii?Q?qdUu8uTg1Q25QBfpclh6oHF8SGINyo1RHIcw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cKOYfCU5iDmJMg+zsvL+eAJGDg1dzqk15vyUlBN+FqGjBXgmfr877KTZPtV?= =?us-ascii?Q?rEvSxf+Kq7JslBh9SPEFUJaP+l0ZM8JMe2A7JQ8Iw9EkjnBpwZwrBPcbzYaN?= =?us-ascii?Q?Dybbvo8PgI0zF3UKnYtejFx7QgHk5XfLyyRGF5KwHs8IahxpqCk6sX46UOan?= =?us-ascii?Q?kH096wDc5PPwYMVpOC54hHvUa+7FP7pJ+SOOa2fKg9daeg=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)(376014)(52116014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?7bN6gdk5UYkO4fP7gez8SVwTfLekpncafZsJnUNNDumvdc64vQFXrtglnq9R?= =?us-ascii?Q?KMAGsw256H2p5COgRjlH6L7Nzpav52+uU3rHy7YtzSbxmT07g1cGK0epgA64?= =?us-ascii?Q?yNPEEC170ZqqxfcT9grvN3foosI+GimEoyjN9eabk/+ngoXu1UEAt6l4SzAa?= =?us-ascii?Q?9xkk0duGxQvAV/W9DR3iT7QSKTJkQTGje6wo+t8zTRD/CMxj5teGPTiGAhG+?= =?us-ascii?Q?x89/CVSMX+6Bf8YARmQIw+2QO+/e0FSz+65+XdqeIOiC/bPrPHy2BlRasFdF?= =?us-ascii?Q?oZd89DPG458BVFBjUyNZJCQSZ1GDRG3UrvDkdxe1HYRlVx36sJXcpquIlA9J?= =?us-ascii?Q?RcGcZ5d1ZapGIKvUrHM1Y5B8To8Yp6pt5wW+pMi55C0pClZzbXnMxA7wiJfO?= =?us-ascii?Q?iYpBt8GQC7QNFhvw5QVTqPg7oDvfXWXplNi2cyHwY/sgyjS43IPMyDWng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U2iUwJhrIc7zPPB5FlFZz7vfBjNnyPDNBt?= =?us-ascii?Q?eaSvdlhu1xgAgbTbZC1AtGARgzEwIrz0F9/Ara6/+1b7bHbfVq5tcqUewiSZ?= =?us-ascii?Q?RjsHPfpfmdngM1NiTmYa6pUNM0Li8tCaC954f7LvJaatcTqvC/u0p+SVNo1f?= =?us-ascii?Q?gE4/+V56pSuJHpuVQD0FWCWdmF98SgczXQlUcwIDixLFQ+6EQNPtm86kmjwg?= =?us-ascii?Q?zz1A77MM30N2ePpRtTk=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c17800f-bf8a-443a-3232-08dcec33c78d X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 09:37:11.7035 (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: 5IcaTVcB1YXrpFX1h/+KfAflwIdYLOIvePw9gRDRv/i8mNsi+JE3UXYhXyzDx6Z1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10580 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