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 038F045ADF; Tue, 8 Oct 2024 09:25:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D28B440B9B; Tue, 8 Oct 2024 09:23:46 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2063.outbound.protection.outlook.com [40.107.21.63]) by mails.dpdk.org (Postfix) with ESMTP id E2AC440A79 for ; Tue, 8 Oct 2024 09:23:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pcp3ZAblUV4M6rMmi/NiKAWxMcttHCGQ/jn1x45Lyaovq25A4E2BTK6Cosovt/6YXA1Y0bBGk8Gt1brswbigX2AK8rl7NxLXZ6/woG0Hn8pZW0wYQlBvnmvzzx6yad99RGBoubxTmxdcgm/RtHOZun87dA4sxMm7WHrx9tPgne07LGoTjDLxqluFlUqnA7U7nnp+WehB81Kg/WS8ShrXkUK9vJBBl8QAbNmGNRXQUNtkC9FkD3ttqvUl1u3IVlQ0GdisiPHQqirz1haA5Kk3jC5WUWTxVHpG+p8wpEq/rIlx5zDUtCCWy0Afi3JzCjTLndSUDeRnxWOdDcT/DVIGgA== 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=lKUOju8RvVg+SzsOgOGTXkdlXvg+u3uT9EnanQfq1+apXEMFKPU8I2BJ4+zmp23oOL4huaI29iRQw6znQRngOoqPg3lRwnRh1ouYU4pAt6rK0I83Jth7b8sJSvAZBybFMa2EvEU14JxInddAlSsJNihkx5ePOvwG1XMY9Myz2ZRSCqPcMg6lntveKusOabkNxggBg5fSA+mjkzEbsVdBfVZ52GY/mJRj5PfDhfHxP1NxHmyArdPP/XaO1n2V44ueQPwJVVc/X91wzmiJ17syYTHTnDh1dmnJWarOqWifb9iqAOMusdzz6cPsQVhr3Zs5y/fm7tFpd1LbHigFcj4DyQ== 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=n4dBleVrHTLBQe3X7woJQNDfp98NlY6WiEk5eU4d16nyXZeiWdWXSZolX2x0ukXZwfJsb52lhhM4FtidDWZ7CVcgEGRGCBmIPf1SEXX8FSqYqV22bWKA6OcEv62xFbXtQ7SJvbjtsqxrzNejcixUeBgAGPGV6gOvzc6gLDG41W/4xVytRsKwBRudBG+Rzm+OCw6ofgrDG2LHsS+AiaQDE9ugu4N13XEIGGsCAgYYSVAYAHX6G61em8A28ucmLEoRdW21scSxP5fuiczNpTD19ATYJFCw/1wnvwKQYKR11PrpDaeEGqSMInh1+bfVyBb4O/AELqlHd9RWT+ShQ1pfaw== 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 VI0PR04MB10829.eurprd04.prod.outlook.com (2603:10a6:800:26b::16) 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 07:23:42 +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 07:23:42 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Cc: Jun Yang Subject: [v4 09/15] dma/dpaa: support burst capacity API Date: Tue, 8 Oct 2024 12:53:00 +0530 Message-Id: <20241008072306.1256445-10-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241008072306.1256445-1-g.singh@nxp.com> References: <20240722163930.2171568-2-g.singh@nxp.com> <20241008072306.1256445-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR06CA0221.apcprd06.prod.outlook.com (2603:1096:4:68::29) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8198:EE_|VI0PR04MB10829:EE_ X-MS-Office365-Filtering-Correlation-Id: 3759ef5b-0882-499b-6920-08dce76a230d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|376014|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?NRWVSQVp0qkam7QX0XPmYA0ZdlNqT4/imgT2kotIF+E/2eKDUq5okxVWRTWY?= =?us-ascii?Q?ONgGeLJw/NhoRnVT35Ej0PpLw+y6y6zK0Z382jXioP2Gvl7IErbMsTToU1O0?= =?us-ascii?Q?MSQD0p30MGa54hNkVy+XYok3txJkcqMyPRphr0XfVW1Z5N1Cfb5iQXyW5hz9?= =?us-ascii?Q?+aE+QOO2uY7bN/479vSD108F/RkUtQmXRBteQDjeHLJ0Y5HjtXsn5OjbxbPg?= =?us-ascii?Q?b5ENmeRSpQn6PigZnjISJRbfbAgPG3IAgSFQ8OteXApd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DMFkx7LVJd2KowUipGm53fE5eInPCp6g339Y/2OH4N2Bt9SpAf?= =?us-ascii?Q?+kU9qopLCQPXpGCwh/dbL5K8hNoLdkodg5Ef5ZXCCyIxMGxJHC0iQi76gPr7?= =?us-ascii?Q?bcYTIngoxGNjf6UJUA/EWXBhPPLp/AFDmE8vJ9q5r53o0IWfR0QE/GCldASq?= =?us-ascii?Q?eUryvbZFwGq0tXHMGjOweYEzfXbgBsvPbSCS3nOpqgAZ1A=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)(366016)(376014)(52116014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?h52qAgEt7Y1rlsc4NeYYYhYSAMyeb8OyvEvE2IAVvnX5fDpQxF7mWUojUqlI?= =?us-ascii?Q?G5QgGUywzVwS7VNgkQmg5kJna1GZooRHLXWaqyuO1C1dxpeWjiQf75+nrzc7?= =?us-ascii?Q?q11uyQ3LqNBOIXwkIRSR7tP7Mg02RnqSycMnTsxKHPsEEoTOAENVlmXTKyS8?= =?us-ascii?Q?0YLeEVVh1siP53feJ70f98ZYfS3gXKydeBe+/enk0nqOIsSHRys8OrD8iEJp?= =?us-ascii?Q?UxXAozqOKb4ooHTmNpljbPeBnhi3zQhieYUYQUr++ppUBfRK5jgiv+ISJxwS?= =?us-ascii?Q?/n/M3QaS7OeAoQ4+dznBS7CDZzUvsF+8pb7j99SneMGBseJ/xmHm0BM6KX3m?= =?us-ascii?Q?tBiy5enyi2fqPcLDXcqrG2DNKD5GxiBDArdE76tWPfFfA6GUk9v4vU8BrW3Z?= =?us-ascii?Q?8+060j18ZtLka2X/kfduDauGaqVMnNr6o+WTa0bmKhF3vBwz67lpps6/WPu8?= =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KSxZbxGWnJLBRfuvBdDZrGzxhg7n2dfgJ?= =?us-ascii?Q?wJago8cQz9nK+VUhCegARF354U+k+wUqeM/mxga8X4SlWRDvxleb+z+7vMgG?= =?us-ascii?Q?bR6pxhHRWq95iFvUivheZc23fVNBvXM8K8m9hpn3EuMhiOMLXTTK7agdJj+R?= =?us-ascii?Q?bTN7yorAlCHxmS/QXakAz5+sujY55y5d4r6CVh+AfWciRAhOtB9DXad3M8z+?= =?us-ascii?Q?EpcV/T4M/i6nSZdrvY8=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3759ef5b-0882-499b-6920-08dce76a230d X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 07:23:42.2431 (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: 03PqwEr7pS+p0mjKqdVOkV2wuBJf4juRLbk7t15EdSWBNXpK9oZknTGsgOl+RcmU X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10829 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