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 2B5DA45B40; Tue, 15 Oct 2024 09:15:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6126D40A75; Tue, 15 Oct 2024 09:14:51 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2073.outbound.protection.outlook.com [40.107.21.73]) by mails.dpdk.org (Postfix) with ESMTP id 62B2C40689 for ; Tue, 15 Oct 2024 09:14:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=C8GecExV1T26gLQWX8/ZJXkQY2iuvFGd8GdjsXxZInj2y+/20TdSuw/U3ZlBIYiYaJbdaaUudT0MGwHBunCuD/qYMB/8eTpsKdmeP/m6uZD6LJJI771g0dRizxU/6t0I2VocCh4JyQoXScqcGMI0Fpk4LgWpD9o3+dit2a2lPV3ApYR0HlZIY7/S+O5efjEklUYcfXPd9V+Vn5L+lVt6y2EoIHVnx5+mgSDBLTLfwzIfes1EA51EGhzulLeIgIpRpP5N+l+7yBAH3sMSCzmwfachOykOcZFalwAVcjJ83I/G1pS2fjnYMtGoEftkQ/Bk8cofx1D9uif9YNcJ7lssgA== 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=FQ4Y3vtUN2xHH+ctU7WZtPWXTsodIBTB2O30zJYEpqM=; b=GbFFULRENv0sohy9oSPbr6vXQmfcQZAwZl893bVHiUNK8V3ptqYIfmpVu0eht2aiJTpI58+b3uCon0o84pcxOfTZoTGuNgI5wkgx/AQ3Uy4qaNwqlwKMv6Wqkwo/Q7OAKC/5Lxynlg0SSLxipzlmouF5PtruY5tRi4q9r1AETRfFZFjmCHZq28vFcZLoGDFvYcZ/nJ/mdLXrWZVN1ij6iXxqGC9uEwLr7mbOFafM/sE53F94Za9+KHUqvbywkqwBwz2graWKrBQwffH2MATJI2O6gF3r+Fx94PXxrWUhFAUidZ9zrMdijMjxrKTO7LBR7tOdmOa4EiyYqjcauYSGMA== 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=FQ4Y3vtUN2xHH+ctU7WZtPWXTsodIBTB2O30zJYEpqM=; b=fbhDcTLDiRc1sPDhhGGP6Zb1xlJcA/veW3N+4Gj0nOZb+MiRh3YqOnpqPqRZ3zlUk98YxP+nNr7JKvZWfM9YlFOgxPhf1YsTZHeTFuRaTDnRlZ0LTgFnc6iSc7lH2Iqm/sYPZCZLcfqgCUgQ7Hfsjx6a2+YaOpFyI0k+2iS1qKdskj4bTrsuLzE/Ai7/uSaHREky1cDHrouPKJklI4xubH90qEOG8cVR0IFk+iwdByDz2AYz053+qU/5oK6ElL4Vk4e34jIA23Kz7JfySZNPNx8oTfEpI77PZwB31Eg3Gfo9fWaInr7PDzzsCNu+WQgU5ZK3R/uy+uN3oap54N900A== 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 AM9PR04MB7522.eurprd04.prod.outlook.com (2603:10a6:20b:282::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.22; Tue, 15 Oct 2024 07:14:37 +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; Tue, 15 Oct 2024 07:14:37 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Cc: Jun Yang Subject: [v7 09/15] dma/dpaa: support burst capacity API Date: Tue, 15 Oct 2024 12:43:57 +0530 Message-Id: <20241015071403.1940833-10-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241015071403.1940833-1-g.singh@nxp.com> References: <20241014093639.553467-1-g.singh@nxp.com> <20241015071403.1940833-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0058.apcprd02.prod.outlook.com (2603:1096:4:54::22) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8198:EE_|AM9PR04MB7522:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e42e93b-821a-46dd-6a35-08dcece90709 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ZAPTqA0R0LUeLYBy/5Q8FYR2AS6MRK3Izm22ivnkZGQH7PetBdd1OwEcRptd?= =?us-ascii?Q?ZF8ObEcY2auQWBTtVqn4nNS5F4UhfWrtaN7aserpBk7oAHbuG9DGk6SPI/6a?= =?us-ascii?Q?0uuePbt0SknmXWH6I+2bcTApQBgfsb8g8WH+Lp1BjpNJ7gP8D1m6J3JovvIy?= =?us-ascii?Q?EemuLWjrgj2jprVRdTymiTHUjlvlpneZf9dis9OFlHznn7iZBPNcJQZjtf4f?= =?us-ascii?Q?claRGjpoZ8oB6YWa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tm?= =?us-ascii?Q?FuZssz6zhuRLOnBmMIQm+3w9/LMZ+sflex6TWM8nKZ+2sUMeAmcfVjnC2h2k?= =?us-ascii?Q?jPUc3qtNw1H0QQd2u5U0YsSv6227FGPmtwXA6nulVmqadNFdD+X4VC/YrHz2?= =?us-ascii?Q?Ko9PQ9UJ7MvEF1ZPFqwycR7Fnrg/hab7ITx6RRvS3yehD6rgFXtxGO3KZnjJ?= =?us-ascii?Q?1cpX9RljEVMoYlzLhFe7IF+Xeuvb/EgGLzKndFMMTqlPNQ=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)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?J8EBuzBNs1vuJ06pYIkUbMpR7NLk2kcopk5uJ5KveqKyrRWCkb8cR7yePCN7?= =?us-ascii?Q?xONyED/DMpo1WZrpk5vkI/Gy2V4u1OTJ/oilVqUYx8k2x2YLQcfISFiMTTno?= =?us-ascii?Q?30RGa0zZe2/HDRo0oACEeIyUontkjXCeTvpvZxd2M58TsYLwMGET9seygiBu?= =?us-ascii?Q?G2IgGSrfKcLHpmBl6nml2BUgbnsgeDuY33e+jBk5UUVHalHdcfICH7IkCGE8?= =?us-ascii?Q?4TolBhReTeb3ow0b3XN2fX1ewkGBwVBPytuIXgssReLWuHVfF92tFr19q11p?= =?us-ascii?Q?EKQj6BuDP9YXsq1O62fgt1BfvkE2sBslEh/X0Af1cae/oyEkoJp9ltIm1y+9?= =?us-ascii?Q?YkPdHScVx9BxwaA5Yyx5AvXJR+XewED0DApEEo3XKAOGML1XBdlx5sb6FVpN?= =?us-ascii?Q?SouYnfDzD0GJHaAxoRBwQRfJL31ZMYCVzVLL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nV+NNhAe/QIcV9fDpyZAw1ZH7oS4o3MoUM09ssTSMToIKT51QUJITSw?= =?us-ascii?Q?5CF+q4FX0jiJBm0Ipox4VT6ZcsqPT3EEI976cogTj5XFiPfCGBnFWBcKwXdt?= =?us-ascii?Q?3d7rdrhUOv5LSgEr3a9qm7Q7WZ5ZqfbOSsupmhSzxftMeOexF+lJEESeeO0k?= =?us-ascii?Q?EdKMP1sXo3t2e5yQNlK0ph72mS/4SM5p9yPa8CFQj9pnscTYcj27sW6zOSft?= =?us-ascii?Q?msgv1rBgqWj3SIB7+Mo=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e42e93b-821a-46dd-6a35-08dcece90709 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 07:14:37.1299 (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: gj/iU42YAprNdsnQ+iriyOohzJnRKOb5GXkQ3j5xegpA2maIqXPBUpJnuW3jrYPq X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB7522 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 d162d84c45..bb0d1a2bd4 100644 --- a/drivers/dma/dpaa/dpaa_qdma.c +++ b/drivers/dma/dpaa/dpaa_qdma.c @@ -1043,6 +1043,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, @@ -1156,6 +1165,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