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 30E6845A67; Mon, 30 Sep 2024 12:32:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9995D40A7F; Mon, 30 Sep 2024 12:30:42 +0200 (CEST) Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013046.outbound.protection.outlook.com [52.101.67.46]) by mails.dpdk.org (Postfix) with ESMTP id 75001402DC for ; Mon, 30 Sep 2024 12:30:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VJI0+WYkNKGTIEZ0G/iE2pir/0gTHyFizAGk9/TlzGFOwXwfxj/2nHMynAlbuxAZeH8ouoAChhjnk+8HF8nMv65lIxZHrDCBCVUJH1mRy8oeAppdIzdcYVVvlD1mpE6ziLR766Nq+d+BmPvhgu88oXFK7etxAUTLcESwcbyhCvvdpSlqb3aoiTd2ScPTm8o2FUhUE01Dgc1Nx9Fgn3PNymMIMH2a1mSL6VmUtAhBUnQW+WV0Ng+4LB2foUA7GCzKEuFMBX6I8QonP9Us2yicx8SjaEWmAhsL2A9EXT3qEJXYAyoV6LnJJ//RfQF6DygwcppGCeYlY1n9VTJfyGCU6w== 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=cU+XQAw7q6aFPGzaTEKFRicI4XOtoCCtNZewOXu07Px9DOexxbHAdLO3Hg2mb47PYwe/kAYr2W93/jZWVYELnTcJQa4liG8eG+w5RmpKxNWVYK0K/NDgno0PM11eSliogvuJyl8UHIEEL3sEd3+vF6v7uW5h+EplE1T8YM81yCsH+mOX8g3hJ8gDTR2qPkTIUhOAMy6zaQ0loql5PHsYS5VH5aIzM7fAu0si4Jbf5dPYmCjjuMtla7LVnvtwpMmTK8N8vxaE3TkvVXtv1H0m/6jtymyIwFEsO25/oONZPQU+fMqqYe0y1cugrwaLkFprTVJgtDujyYXgNamkeOwVmw== 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=j7KDQp9YhvKNSWB9DXPQCRKtc4HsTfIze1qsQ5sygjV1VFRF3d0A3/74muHVLlGk4mw0B8OEISjk41wJaWyoNdNVceu/1Pund8+WLjmrQ4bbV+T2WXan0dfMeUGMtM/IeYgW6Vi3mWbwmfn2Cw8vfwWO0uMBL7WQ5I/3Z3fTz9Eo7neqeV7bDDuWA7c0EnymcEbtsRDLGLtiI1mAAe/RIUdCmcu1BCjI4Kl4/y7dy5Ju6r0FE3fKx1bIeV8Kx1ZydxjyaGnjaSo2ufLpKXPh8v8PqTvurIrO67pFuBgVEyER6j/Kvg53XIhMweqTqBu4HqHDc8HWDxGqzA5RoVHpnA== 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 VE1PR04MB7214.eurprd04.prod.outlook.com (2603:10a6:800:1a6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Mon, 30 Sep 2024 10:30:27 +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.8005.026; Mon, 30 Sep 2024 10:30:27 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, Jun Yang Subject: [PATCH v3 17/18] net/dpaa: improve dpaa errata A010022 handling Date: Mon, 30 Sep 2024 15:59:45 +0530 Message-Id: <20240930102946.3236998-18-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240930102946.3236998-1-hemant.agrawal@nxp.com> References: <20240823073240.3708320-1-hemant.agrawal@nxp.com> <20240930102946.3236998-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0027.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::14) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|VE1PR04MB7214:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d057164-18d3-4c77-332b-08dce13ae667 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?RFrTnxkpU6YRScVrhNzFR6jvHZJt2HVcnS19BcGxkioX3E1kCmD2v0CN0gRs?= =?us-ascii?Q?HMz5HlCGx8I2s2DC82aWamu210O4bGUQI/iCGAly5k5jcfb+hd6eM553lcbX?= =?us-ascii?Q?CFplsJaClmYm+u9zMM1w/Ow+4Lqx6eONOxrIAtbUgp8ptsi2KSLe7NGol1ee?= =?us-ascii?Q?nnZukIZHjP5Rskad2s380X8em+N55h+gHNuGNRC0rmCbQFxka1hYDSCChQNp?= =?us-ascii?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pCHhgVs9LOkhx8vhz?= =?us-ascii?Q?iDwmPxRd8kCbK5BNFi7Pxo/qmozfdDm6UhIKebuNij9+sEVw/8yRJdXC7Bs9?= =?us-ascii?Q?gOSk/11wzI+6RJF5hex02fZTXLf3I19UrQA07VeRxyp7kIvVPDz2Xnp6Sc3R?= =?us-ascii?Q?YyMpl/DCZgOme8ljiJnpYKarye0xZAimp9bhAoLg6B9Sw8gW+CH+wihg72vX?= =?us-ascii?Q?bSGbcokJImS4gBMnl8PTVzz+wOViNKOVziNuoJJl8xiDgsnV2lfmPBLXLAwg?= =?us-ascii?Q?iT0JM0frPRUSrN/AT2a7craWRZRwghUOlKjjS8ghIpkVDFb+HA=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)(366016)(1800799024)(52116014)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?N5z0kOByLmHG+RPdwVx2OM2GrWwA4lybmRVZnOgVdLJCA2NJgvM7trtTSKkd?= =?us-ascii?Q?KSrXKdRCTa1sRFWAaGlcKmBglku/B4SEbBbZtx/oSA46LOWgSdsTZF+krpC1?= =?us-ascii?Q?YIGBI9i4LjIX+w0LqIO/sNWgvjv9+z7xNYWpBAPoSWXpuwXEUBwFBjllnc0O?= =?us-ascii?Q?UOIQ1a3fXZXYyCkwmCkUL5ADL/Ir1qZuu9QXKECh+B9ZsVj4WLRhyEGc6PU0?= =?us-ascii?Q?AaqbtFxbvy4VJzs864eP69yYi/k4rQICGLmpRuU3rxgNdfdWmQjQog09RB0c?= =?us-ascii?Q?vkS45d1hVIc4Tot8GC4xxYGH9CzSdcpnJYr8OiF2N4hUiqs96pdLDHdrTeh+?= =?us-ascii?Q?FfTGaWk1PlfOE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q?h3ZP8m7R0lNrP/Velpk2m5aYH/mpLaUIuFpaf/GxdAP1hnjzOrk3wtlP2kvw?= =?us-ascii?Q?41OIXy7SCOabSqCnzl/dDfKQ1KTQQuT1xVYHgqhk9pnZiZFKmJK1mBjZrXbx?= =?us-ascii?Q?hqiaVcVLZ6R8dYPYzEWIwEYTL05iFUuNL9LG9LACCofEqHyn5ng7qEzPSfpp?= =?us-ascii?Q?5eEB32SIJEecbee95qT34g+IV7I6W0Ww0tHScz3EcbW5ynmFnXD62fz5WAXE?= =?us-ascii?Q?Eh1hLQRk42QitomyLW8PxxBEMfV/jA9CI/ucAqHZWTn43eFK6dgFy4RYJ/Yz?= =?us-ascii?Q?AU3fTxoHUWLFIZvWcC8ZvI2f9GHGQgV2NAbwf18EEnc8vldSceuyvVHG7J1/?= =?us-ascii?Q?5g=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d057164-18d3-4c77-332b-08dce13ae667 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 10:30:27.0720 (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: 0gMDGekJUXlPQ/Vh5SQgwPsRaKptboyEI0/AK6IWt6MbOVhq5LdbIxt8ue6NglO28LE/bPtMLIluOo8bWbZgZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7214 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