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 7DE7245843; Fri, 23 Aug 2024 09:35:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC924432EE; Fri, 23 Aug 2024 09:33:46 +0200 (CEST) Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013023.outbound.protection.outlook.com [52.101.67.23]) by mails.dpdk.org (Postfix) with ESMTP id 17A3E432C8 for ; Fri, 23 Aug 2024 09:33:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YY3BF2tP7UNbcpCBiIwuI1m9aWL/2Q1aGsVEMbVTCxdUKv3Z/gfMWqAMMmnEJfDIl7RAhsdTmPhtbXj5szLAnRQ0VsWQNzVsZMbNViwv4s5DZJumLIjp8bgs28o+EZ5R7JWPdObosPZlZg6TGohnIJvgZaaYF9TrKaugwJ1pIrmc4gh9/D0yTn7OH4WE00NPPdu/KzUBnKjETR9HQfOsFjg3X/EI2wLoOebvd3ElvPJg6BtPZ4DYTs3GLrRs35iyvpsSACO+886pIJWh8Xhz0KelGt1B6dsaiSRiTTKwj+JEOASGuO2v8EZwOrhRCzHByqqtMDsFP73xZIwITxnWuA== 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=nIHEYb+iVdZEmKXCeSRSt13eGad6ABBBk7tLqR5BCkU=; b=ecyhasGU4eAdqalaNX1CWBSj2cq/WXHMknHkLfxq6ipDuFCNbe7GcAQ489sYWQ1RCqAxm6o4u/VH+n5UyugkeKhLtgy0niFVlSiZRXbUkxqSfuyKVOSdHheTpEYbz/5BjiOCq5bPIcxJfcNr3ZB5LFdHUalpbfCDhwa1KtaJWwWiNXMIwOorzvMQRdUN7ObOZLx5IDDvIejVpoNN5g1FjQLxmlgL0N8s4ew3KRWYv3JVPgR/Ok6qTtss/1Ngd3p2LLT99NiN6RyCkP+erv7WDgSVkRrB8w56jIOZQYVyOisOsOGwwb7IlMGkzBP66A9eZMCtIpDdIOjvtXuI1b10BQ== 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=nIHEYb+iVdZEmKXCeSRSt13eGad6ABBBk7tLqR5BCkU=; b=Cq6BimTL+XKNYC5ZLK9cyyjNY1KINDhKWT6+Q7G3n8MPa+jOhvaDq/eImPl3myHrgixBGj4uFZlKizTSsXNSw+4jKGxJaNQjZ9gBltpXFVFYtWMCA4aU7N9jCiLQChEAlSs3NXo1Sg0sW8COa9NdjL6Tq70hL5a8Vg3zW7NPwSK0zbqy26HhhnklPnmmoRHLeda7fNkUSguS8ymxUMx9aSKEoFlYQuc5MdHSUUo9pTCuZlCfWP73DuxnsQtE2Mph77ELpor24Tu6a9TIp4uoXeOv4RsKMOfMi0JbitTSx/4zR+nnhTKRJCuB5tlHTA4HlFMUwJhMllD/Vc2aAWBRQw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DU2PR04MB8789.eurprd04.prod.outlook.com (2603:10a6:10:2e0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.18; Fri, 23 Aug 2024 07:33:24 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%3]) with mapi id 15.20.7875.019; Fri, 23 Aug 2024 07:33:23 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Jun Yang Subject: [PATCH v2 18/18] net/dpaa: improve dpaa errata A010022 handling Date: Fri, 23 Aug 2024 13:02:40 +0530 Message-Id: <20240823073240.3708320-19-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240823073240.3708320-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> <20240823073240.3708320-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0028.apcprd02.prod.outlook.com (2603:1096:3:18::16) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DU2PR04MB8789:EE_ X-MS-Office365-Filtering-Correlation-Id: 32051832-1592-44e6-c507-08dcc345debb 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?D7XRnANzejEZkamyRThP45mo8GmcRfI1hitrKFXReZwzwpmLsetWwYlBifA5?= =?us-ascii?Q?Mj7+LMSLYLVHgbDxlvU3vlbI35NwJIy8HzkMFUEEigIHkRwqGrlLS2I2Hg6R?= =?us-ascii?Q?HoVfQlS/bVuL9SVUQnnLjdopAEKjLBRbV6C8yRBgKuoEdxVdKMNcTgeZqH9P?= =?us-ascii?Q?gw+pxP5SRfSDrZAG4FbFOeHb0s28K187m9nVRU305yARQnoBYcRvxphefo7Z?= =?us-ascii?Q?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xU+MbnLTOWqDW?= =?us-ascii?Q?2kuBmmuUabI81yob30f2TjZYPLDmHCEvkGUpiCM0AV36BU9g8YFI/tXvne5j?= =?us-ascii?Q?yzmbkkhL0B8Hahj7HGpB9v/3Z6kuQ7H2bL8EVIcnezGKNIlxZqdSJiYbq2RT?= =?us-ascii?Q?xRqSZmk29vn1cA+n2yOZAYs/cUY2mv9HM/6QFk1sCP0hOMo+ulDA1sxborC9?= =?us-ascii?Q?cXOfRbHFEUdZH8yBcnYnhgyPO2zx3EqKdMyCqS4btTP9OwqaHqILmMF3hIpv?= =?us-ascii?Q?4k/HP4tGJBVbHX2HxzDwJinbuAyYfByIErj0cDIGHfnhqgPbBw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.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?E+P18n5mei+jmozIEIJTYytsxi0xPwnebzzA9kzHJV63nPqlci+oRo8Mam+2?= =?us-ascii?Q?rRiscXZd6TyCARcXZtXcjwergocVl0VGI2pr2/++eVhKkRK6w5kOAYHD3nYx?= =?us-ascii?Q?dffwLRCehXWGBYAJc9My7jTFXNeJoGBMcH8UK/Zpp7IblK/0iu2CV80m1ne8?= =?us-ascii?Q?ZlBjWwbLWw7UCP1WvmuUGbaZI5m2RHcGm8Wvgb2aYBg8+lRDGF2HhOQ0bT6O?= =?us-ascii?Q?3Ff/JTJav9EvrIIMV4lfTgEScHIPc5r5DuWzhNWPIas/ftXqF9ZuZjMudG9d?= =?us-ascii?Q?MMLyizJDFuHuCd9kzTNem4F/bpfW3JhnScheVIF7QNzQXVir7Al4xqH4M1vE?= =?us-ascii?Q?QHwvdN5OWErYTFW6/FtGT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us-ascii?Q?4KDLe9Z+0C+sRezJLyQtlEm7J2s9AfUKc0sBfUL5oVCh07WyBGEOZopwuah1?= =?us-ascii?Q?W0a0HG16O0Mzrdf5HWcC3FhMsfNIJtdP0brK7zxeYXRkSeliqfJrV+haqWcI?= =?us-ascii?Q?zPwrz29akI4j4wZHPpVrmbFf//VViCbTjo5FsAQm9rW7hqSdxTVZOF1QuFSD?= =?us-ascii?Q?iaj0BHh0dnaceef2kfn9Te29Dbs9sFSHircjQ0wJsJZTw9N8vxGMnQBCauxy?= =?us-ascii?Q?zV83Txash5clTSbDNPd4eQi+joWpWU0fyewcRQ+Y4Exh66Su56PKwjHeodoO?= =?us-ascii?Q?RRBcQkjS1tsuDYBlQLjDBKcNJ9q5JpXl5Cpg2q5UDyFgXAIovDGZLTqZw2FM?= =?us-ascii?Q?nw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32051832-1592-44e6-c507-08dcc345debb X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 07:33:23.8696 (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: CqzzhvK8cACcZuOuJ4H6ELm6471AdKAw9mFR3ha75gN5mttLLW/jgVxxTAYSd1nZDlQ1TuSJFOQ+c4ELluXivA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8789 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 errata handling for "RTE_LIBRTE_DPAA_ERRATA_LS1043_A010022" Signed-off-by: Jun Yang --- drivers/net/dpaa/dpaa_rxtx.c | 40 ++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index d82c6f3be2..1d7efdef88 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -1258,6 +1258,35 @@ reallocate_mbuf(struct qman_fq *txq, struct rte_mbuf *mbuf) return new_mbufs[0]; } +#ifdef RTE_LIBRTE_DPAA_ERRATA_LS1043_A010022 +/* In case the data offset is not multiple of 16, + * FMAN can stall because of an errata. So reallocate + * the buffer in such case. + */ +static inline int +dpaa_eth_ls1043a_mbuf_realloc(struct rte_mbuf *mbuf) +{ + uint64_t len, offset; + + if (dpaa_svr_family != SVR_LS1043A_FAMILY) + return 0; + + while (mbuf) { + len = mbuf->data_len; + offset = mbuf->data_off; + if ((mbuf->next && + !rte_is_aligned((void *)len, 16)) || + !rte_is_aligned((void *)offset, 16)) { + DPAA_PMD_DEBUG("Errata condition hit"); + + return 1; + } + mbuf = mbuf->next; + } + return 0; +} +#endif + uint16_t dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) { @@ -1296,14 +1325,6 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) DPAA_TX_BURST_SIZE : nb_bufs; for (loop = 0; loop < frames_to_send; loop++) { mbuf = *(bufs++); - /* In case the data offset is not multiple of 16, - * FMAN can stall because of an errata. So reallocate - * the buffer in such case. - */ - if (dpaa_svr_family == SVR_LS1043A_FAMILY && - (mbuf->data_off & 0x7F) != 0x0) - realloc_mbuf = 1; - fd_arr[loop].cmd = 0; if (dpaa_ieee_1588) { fd_arr[loop].cmd |= DPAA_FD_CMD_FCO | @@ -1311,6 +1332,9 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) fd_arr[loop].cmd |= DPAA_FD_CMD_RPD | DPAA_FD_CMD_UPD; } +#ifdef RTE_LIBRTE_DPAA_ERRATA_LS1043_A010022 + realloc_mbuf = dpaa_eth_ls1043a_mbuf_realloc(mbuf); +#endif seqn = *dpaa_seqn(mbuf); if (seqn != DPAA_INVALID_MBUF_SEQN) { index = seqn - 1; -- 2.25.1