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 796F445710; Thu, 1 Aug 2024 12:55:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFF7343405; Thu, 1 Aug 2024 12:53:57 +0200 (CEST) Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012048.outbound.protection.outlook.com [52.101.66.48]) by mails.dpdk.org (Postfix) with ESMTP id 1A5A8433D0 for ; Thu, 1 Aug 2024 12:53:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X5wOfmLtWbop9tcwpVl/zVyNI1BUEGRB2+/CGTYjfoa8J5/nGDM0LLrAUmRmyeAEV5JlHulAeG0+naEsndKX+E7eW5wu/gfbgWORMMIH/7JQ0At7OyKluT/uZE+evM+Srz6tJUR/fchJNcACtdjB2NI8jrL19ynduzk0Uw1Fh1X6zb72mYwHRn6vk3JPEfIPc8aWl5rXmNNW6YqNuRdQ764wDtclh7t+mjtmbpiMvaqG3JEAJlz6Zbnkeq/snz3Ph/qwyh+gqQ7rYrDo2VjuaM6oqRlucz42Iha7VQD0oFT+/7xP0DsQT8WENulnBVs0Tx3UbtvcEbhKI4KFHwt5IA== 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=1MmulNMMqEZtmTs9tg5ayj9YbhXWp0y7W8vf2v/FIrE=; b=kF8uOCocxCJ+UAT/9nOQaNepmDR8tgufReSFrR0meIUw18gpH+QLIRuN98/7uWtc4z5RpxKZcPGhTNxBjgl/tqByR9blBqWi1khaMWWLCji6ArXlrsrnIFIe9TpCtIvSbMnGE7YQXa9674NpBaOr/ZzIRsKtIPIkfS5Wr+q7PzKyjekZEfERy0UPZqgYOqKlCSVx4PtoVEEdW1CxOrn7d0fl3KMXEzk/9UdtWirgoEMemIqoLAwPxJKPTqp2gV3E6UMgygLt7Bv++zYCbhg83wfAuiuUe1m2OOT6j1paiXbR2FoPdqsTPFbmImuJvvNlcVTCaDPTq1lWd8VWWCT82A== 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=1MmulNMMqEZtmTs9tg5ayj9YbhXWp0y7W8vf2v/FIrE=; b=jTJ871xOgW6W9VE/ucjt5psQzQ/OVjSPcFrABj42PV6LhDemRrCY0UxR8/fHt8iQEIcJzVUtWe6IbJdIbzU8osKXI/o0nHQLqXaXxHltTt5FDkkwbdwJDyLFkagPjhxnyU2TdLGthx8r7ZgbFbK/wDsayzilnB/wj5Bg3+DjSy3mpM9+w9xpHeG8jAjcgzKqOjU5PBDAghmFkW6yNIfVJoQHixU2rVjlZ+r/B0HYd2r5pmlT2+rQfSsYVq6+CaeP3rzUQvOTDT9/sY3eTttFP7AdoN9WzAHqINJQ71GpqLIE9Bbu1/KN0KXDKF2jlF/VfBYYFbqa9M7sso8RteStnQ== 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 AM8PR04MB7377.eurprd04.prod.outlook.com (2603:10a6:20b:1de::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22; Thu, 1 Aug 2024 10:53:52 +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.7828.021; Thu, 1 Aug 2024 10:53:52 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, Jun Yang Subject: [PATCH 17/17] net/dpaa: improve dpaa errata A010022 handling Date: Thu, 1 Aug 2024 16:23:13 +0530 Message-Id: <20240801105313.630280-18-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240801105313.630280-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0026.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::13) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|AM8PR04MB7377:EE_ X-MS-Office365-Filtering-Correlation-Id: a23b9f55-4b02-4895-897c-08dcb2183afa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?pie7QnDyWduoLHFME93W3cvIXoX/5/4U+StH6oURXwMhnU+arRN+1LtEuyFX?= =?us-ascii?Q?uoTXFPy53GesXTYZ/cF8CYyIZXG8taJqlxlcy3mh72fMC0kZ7PcLnlVf12Ri?= =?us-ascii?Q?Ih5iQmDPfUe+DTK/5Et15bLGObzl8Kcu+UVB13DhTYqEa/kZ6sMirjIuuTXl?= =?us-ascii?Q?zcuacZDYM/S2uMQGdbJ+vPCMhltGbJEt6kVWPKSCdpNsr9FNKZZU2aBvfagK?= =?us-ascii?Q?JRQG+1HcKw3RB7sDPOZGKNNKB1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g51eu?= =?us-ascii?Q?oHbqXJC6Rd1qwY8cQCcF7Uzw2OZ7/9chbf1RWYOhtka3KkxKEsdflFRHL4js?= =?us-ascii?Q?DQbPu4fGMbrFqEEwOJX1Rw4UHvQf6ymsz2BEDSkp2mph7Seus6RTpwKtDgAz?= =?us-ascii?Q?Sitv5S/lAUzQXbW1J4QcaPjYPCY1IMg5VYULeXgsYGv+PXUcTjW5dVEE2AOb?= =?us-ascii?Q?RKpCb8DtIz30bJTS/scNNl3Zcf1H6vZHWcliTWzs6O3sGmvutI1BCcqvEyW2?= =?us-ascii?Q?y6g+DmJZN6xmX99M56CBGEpsdaWITjtaSIIylW7GIMTBz2MSQA=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)(1800799024)(376014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8iQF3zvoFFGczC71od91D5zrkRBonXHwV8DknZeMAKLjWRJ1lNOFMUGsgpZC?= =?us-ascii?Q?ywo0/d5QBhIce7wSafHdN6/zvxSk5TUBDOTrKj0rwCU6iS0hRREeZG8iKFfn?= =?us-ascii?Q?zZQQ5OfqPGsoJqSyzd1EoUOhIcF4ewimrjHDzxNikbPQLIA3uJAPYjkqdLg4?= =?us-ascii?Q?Q5vwolF9BFueIJLl9XmGcdqIDaK6CEC3N/lt9zLXFRGhwYEsHk9Uu+Xog2U6?= =?us-ascii?Q?F2LCOVLyXI5BIL0L3eX017t8yed9BLtSpu60pkGsQ5wcAqrVFBbTbLD808ga?= =?us-ascii?Q?sLKOFAV46Do4C+G+K5t0T3YN8TC74oO/nLhu8fTTZF1faJmKkf1SPl6q5WP3?= =?us-ascii?Q?UjL9CMghwULicrl841/5E61KpNhA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uwBH4mRyH4C5BxtOVnY+bHCJ1J8vPRb2NjuvWVGcQ7kYJXKfuZVG9y?= =?us-ascii?Q?8Bg4Mex5wt7op9oLwJrL42L4jAcgCeX1XrWpENNco43LxewUkcrmyJHxHqxS?= =?us-ascii?Q?03hYhwNmRpnDRP33mg1Vm/JVlE2C1DNFEWh+LUMyqlANpRoLOlBxR9iHrubM?= =?us-ascii?Q?ZA4bAfRz30A+N42D6GiGW1uF3eXQGcS8iPy3sjKSNvsXnn+ieyc3fD6stQEr?= =?us-ascii?Q?T6jtq/iIVty+vNHjH7TbtpF23ezCgQL5O4lygiO7wyFL38udJGuX+yjojgJ2?= =?us-ascii?Q?e5Bs3eWI79VN1Cwh8TMCkBDKToAnMc/PvQ9aOnoKdMPOY2E+W3OmE9Ar9VQw?= =?us-ascii?Q?Qw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a23b9f55-4b02-4895-897c-08dcb2183afa X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 10:53:51.9409 (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: uKjRUXiNWUElxBFEFzACUMLu8212EgkqNbZtC1Bbkg+tfWGEyiyhdkjZxovRtS7069ICSRtvlHhGfufihifZ8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7377 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 84fd0c57a4..325785480a 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -1264,6 +1264,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) { @@ -1304,20 +1333,15 @@ 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 defined(RTE_LIBRTE_IEEE1588) fd_arr[loop].cmd |= DPAA_FD_CMD_FCO | qman_fq_fqid(fq_txconf); fd_arr[loop].cmd |= DPAA_FD_CMD_RPD | DPAA_FD_CMD_UPD; +#endif +#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) { -- 2.25.1