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 E6BF14564F; Fri, 19 Jul 2024 12:03:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EDB542ED7; Fri, 19 Jul 2024 12:02:26 +0200 (CEST) Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010027.outbound.protection.outlook.com [52.101.69.27]) by mails.dpdk.org (Postfix) with ESMTP id 60FC642F08 for ; Fri, 19 Jul 2024 12:02:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cB+pp29QLKy/NSQI/w+YAZOMihu+CuYLugj9BwZ1IXDWEXJSgivdu8bSIFbqovna6qjRyApeJmlHi8bm42TbG6dp54AXIw3PC8AWfJoabKS3p5tXRUHl8NdzsFSyo9uY0Qhw9aDg7Bq94XgZP62ePWTq0LGD+0jYafrvq+mgKbGF4gg6fe1r3BG0T3OsrC2HqI0DqK63/ONfzwxZkSSWDJbGyCNbTxeQhUDw4Cr8HX8J4iogJa4PYOEQwaGT19KFKfo4LcBj85e8EDSMZRUZmymPedf0rGNnjWerweaLqM0uVLgvW988udSqnEx/r/p1sbdIM0cJtnGm0OybP59ADQ== 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=PWUoMrkduhZmZKmC2LcLjnnDGF7Cw0n146YYyjYBPBI=; b=EhXvMODzpGygx9BJwH0mbMYcIdmM0cDhZRklusAgxuAde8IKXsIiLoNTvFuf4oJKOQJcBG3H8F4rghAeRr46OX7wGlfQjlvJFTkbNgHI15iVWic+Ltav78GOE5QXwgB5RnZR8zVA+OxAJux4RtjCrkC/RZ//MpOG8qlW2C0/c8Ck0kaJKv6NDz0jZjQ6ZpmJPXg5Gd/JxEEPAg+hQ34/UrJvfMvL4qc3WrThCcjA7H96K9zliLRhSlKPZB7rn1Hgw0UEfVI5zhyZoPpC0CIPE+D5gb5z1lJF5rgDG+AyIoi2qbygRB1PqbCWhSxRB2NeZ5Os6wvQRnsRdJ7GeZY0dg== 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=PWUoMrkduhZmZKmC2LcLjnnDGF7Cw0n146YYyjYBPBI=; b=ZMc9gIHnlVpsqZ1pBc9qyBlH8zwz3kdQf+jkERfh6qhPU4HBWAtAo6wZbMzt+n7JxitT4/SM58fZzoNFhDdsa45ynbQGKE+Bw848893UiTFMJ8gXa7ZNx9ZvsnTuKsafEdxtLYRsvOJUGWTkQKSqIlUU0YjcBKQxR+OoMETwZp0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8205.eurprd04.prod.outlook.com (2603:10a6:102:1c2::20) by DB9PR04MB8345.eurprd04.prod.outlook.com (2603:10a6:10:246::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19; Fri, 19 Jul 2024 10:02:08 +0000 Received: from PAXPR04MB8205.eurprd04.prod.outlook.com ([fe80::7633:884d:5973:174f]) by PAXPR04MB8205.eurprd04.prod.outlook.com ([fe80::7633:884d:5973:174f%6]) with mapi id 15.20.7784.016; Fri, 19 Jul 2024 10:02:08 +0000 From: Gagandeep Singh To: dev@dpdk.org, Wathsala Vithanage , Bruce Richardson , Sachin Saxena Subject: [PATCH 16/30] dma/dpaa: add workaround for ERR050757 Date: Fri, 19 Jul 2024 15:31:12 +0530 Message-Id: <20240719100126.1150373-16-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240719100126.1150373-1-g.singh@nxp.com> References: <20240719100126.1150373-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0184.apcprd01.prod.exchangelabs.com (2603:1096:4:189::9) To PAXPR04MB8205.eurprd04.prod.outlook.com (2603:10a6:102:1c2::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8205:EE_|DB9PR04MB8345:EE_ X-MS-Office365-Filtering-Correlation-Id: 65e5e06f-a704-42a2-f13c-08dca7d9d9cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|366016|1800799024|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?RJQwl8OZzrvQ3aot/VD9pTkskVnjuny8SFGJ+NvUvcXVtLB5AW/vhyYDw9lT?= =?us-ascii?Q?kJMNF3qPHk7Oj3VQ4FACHnxOhjZnAZYbmnLCibNRqPzBB71I449U2/c01dVG?= =?us-ascii?Q?uIXR1OcTJFriI5wvzFr1J24DsUEyO0Tz+RNpZuabG6ET3zD0eVDQ8wFlf2aF?= =?us-ascii?Q?D69ZSmn7rVmsutHjyizcXMd+beKiJN/hoxIJAxSfkx+CWxYW405AR2E9yQEX?= =?us-ascii?Q?/DVwne+mqrD2aU65PEjAezp1/NAeFEzZg9Acm8NK8/CObfzdR/Oe2e+A3NIA?= =?us-ascii?Q?3mmE+afnS9Jx06aSZxxA1PB1rtX+GT8un03tK1+DRglvAI7GJOpQAemtCt6D?= =?us-ascii?Q?DoUfondSYSkdG+Huro+S5OPv17HwpFbNUHjmv1AbyoVoHumVhaOktOautg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M+HzM7UyNr5eFG4wIhFh+sFxJfPLFM?= =?us-ascii?Q?b9W88vQ8oCe1He8MoToBxlcOXwcFKcqhm21Vp6LBmU7C/PMmqNSYU68fT7bB?= =?us-ascii?Q?agWreIDh77bwsSv+MrvvsVB7pgO+NS+3xFLnK5PUJQO90nAzlw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB8205.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(366016)(1800799024)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5pD7tSMVFA+o2MpBrrjnEHwz8WZZaQjpN2Oactja1tg1sayoobWk5UieKeZW?= =?us-ascii?Q?BUIa7ShTkYe5EuvaGRIAg+5stoHzjd1cBDy1Ih2LDSNAxOBj6KunB+H+shtK?= =?us-ascii?Q?k3IQTubrrsJCZDeSIpXacGfzBlRTnPBd+y5XJrhmsHDcnF2/xzvk2NP3tLGZ?= =?us-ascii?Q?xKrMQWKnRNhZm3tnlRJ+c4PeMc/8jPV3uq4YP117IcfkJtzpAnLXukqmUN70?= =?us-ascii?Q?YnRL0JBgeBtXHVyfcIoKxb6B7Es9F8dRbKHo18Fg1hX+ybD5oH2b0ueQadjn?= =?us-ascii?Q?piIMozRJtLudCK0aDuPy33s4rYkljdM6dkP2eF9VIMIDdRwTXMeQK7NRjJ3/?= =?us-ascii?Q?JR7gHUxPzpQcmyBwDic5LIAJxL2mYgolSbtqcHTl26RfZz8CLesimD63dnZ8?= =?us-ascii?Q?DySHJ+VqMa3sWqAwmPZIsU/h7VMMPS4XpODrqR1lfiaGXBTpLg73wMvC0Xqo?= =?us-ascii?Q?uuZRUQBtWWDNM0aH4IkmFq3k63Z6wY6nATkmYGzYp27Hr82V4LRlmx5MZlsJ?= =?us-ascii?Q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j8kVH66tetwYX1IMrLOijVjORNU5?= =?us-ascii?Q?t6bwDQhSHP+9mOO0e0fItg9cNxSAd1Tf52s0zn+5Lou9uMwJTbBQZK9PU/no?= =?us-ascii?Q?5D6hojLd6/tBEO2SL264dEWvLp7CudnP05gLGGESrb660cPQ2ZSqejnSPggL?= =?us-ascii?Q?qHdz/2Y4bQ2eb674Ukf8SQIeNu64gaA2Ogp5Y0Mn?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65e5e06f-a704-42a2-f13c-08dca7d9d9cd X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8205.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2024 10:02:08.5770 (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: JlfcWYayMRN5UB9cEtRzKISPSen3ik0ZVUY/U2vNX19+7suu3niOk87ZbFupQq1e X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8345 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 ERR050757 on LS104x indicates: For outbound PCIe read transactions, a completion buffer is used to store the PCIe completions till the data is passed back to the initiator. At most 16 outstanding transactions are allowed and maximum read request is 256 bytes. The completion buffer size inside the controller needs to be at least 4KB, but the PCIe controller has 3 KB of buffer. In case the size of pending outbound read transactions of more than 3KB, the PCIe controller may drop the incoming completions without notifying the initiator of the transaction, leaving transactions unfinished. All subsequent outbound reads to PCIe are blocked permanently. To avoid qDMA hang as it keeps waiting for data that was silently dropped, set stride mode for qDMA Signed-off-by: Gagandeep Singh --- config/arm/meson.build | 3 ++- doc/guides/dmadevs/dpaa.rst | 2 ++ drivers/dma/dpaa/dpaa_qdma.c | 18 ++++++++++++++++++ drivers/dma/dpaa/dpaa_qdma.h | 5 +++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 012935d5d7..f81e466318 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -468,7 +468,8 @@ soc_dpaa = { ['RTE_MACHINE', '"dpaa"'], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false], ['RTE_MAX_LCORE', 16], - ['RTE_MAX_NUMA_NODES', 1] + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_DMA_DPAA_ERRATA_ERR050757', true] ], 'numa': false } diff --git a/doc/guides/dmadevs/dpaa.rst b/doc/guides/dmadevs/dpaa.rst index f99bfc6087..746919ec6b 100644 --- a/doc/guides/dmadevs/dpaa.rst +++ b/doc/guides/dmadevs/dpaa.rst @@ -42,6 +42,8 @@ Compilation For builds using ``meson`` and ``ninja``, the driver will be built when the target platform is dpaa-based. No additional compilation steps are necessary. +- ``RTE_DMA_DPAA_ERRATA_ERR050757`` - enable software workaround for Errata-A050757 + Initialization -------------- diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c index bb6b54e583..a21279293c 100644 --- a/drivers/dma/dpaa/dpaa_qdma.c +++ b/drivers/dma/dpaa/dpaa_qdma.c @@ -159,6 +159,10 @@ fsl_qdma_comp_fill_memcpy(struct fsl_qdma_comp *fsl_comp, dma_addr_t dst, dma_addr_t src, u32 len) { struct fsl_qdma_format *csgf_src, *csgf_dest; +#ifdef RTE_DMA_DPAA_ERRATA_ERR050757 + struct fsl_qdma_sdf *sdf; + u32 cfg = 0; +#endif /* Note: command table (fsl_comp->virt_addr) is getting filled * directly in cmd descriptors of queues while enqueuing the descriptor @@ -171,6 +175,20 @@ fsl_qdma_comp_fill_memcpy(struct fsl_qdma_comp *fsl_comp, csgf_src = (struct fsl_qdma_format *)fsl_comp->virt_addr + 2; csgf_dest = (struct fsl_qdma_format *)fsl_comp->virt_addr + 3; +#ifdef RTE_DMA_DPAA_ERRATA_ERR050757 + sdf = (struct fsl_qdma_sdf *)fsl_comp->desc_virt_addr; + sdf->cmd = rte_cpu_to_le_32(FSL_QDMA_CMD_RWTTYPE << + FSL_QDMA_CMD_RWTTYPE_OFFSET); + if (len > FSL_QDMA_CMD_SSS_DISTANCE) { + sdf->cmd |= rte_cpu_to_le_32(FSL_QDMA_CMD_SSEN); + cfg |= rte_cpu_to_le_32(FSL_QDMA_CMD_SSS_STRIDE << + FSL_QDMA_CFG_SSS_OFFSET | + FSL_QDMA_CMD_SSS_DISTANCE); + sdf->cfg = cfg; + } else + sdf->cfg = 0; +#endif + /* Status notification is enqueued to status queue. */ qdma_desc_addr_set64(csgf_src, src); qdma_csgf_set_len(csgf_src, len); diff --git a/drivers/dma/dpaa/dpaa_qdma.h b/drivers/dma/dpaa/dpaa_qdma.h index 2092fb39f5..361f88856b 100644 --- a/drivers/dma/dpaa/dpaa_qdma.h +++ b/drivers/dma/dpaa/dpaa_qdma.h @@ -81,6 +81,11 @@ #define FSL_QDMA_CMD_RWTTYPE_OFFSET 28 #define FSL_QDMA_CMD_LWC_OFFSET 16 +#define FSL_QDMA_CMD_SSEN BIT(19) +#define FSL_QDMA_CFG_SSS_OFFSET 12 +#define FSL_QDMA_CMD_SSS_STRIDE 128 +#define FSL_QDMA_CMD_SSS_DISTANCE 128 + #define QDMA_CCDF_STATUS 20 #define QDMA_CCDF_OFFSET 20 #define QDMA_CCDF_MASK GENMASK(28, 20) -- 2.25.1