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 3C374457FE; Fri, 23 Aug 2024 09:36:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B8E074325C; Fri, 23 Aug 2024 09:36:25 +0200 (CEST) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2080.outbound.protection.outlook.com [40.107.104.80]) by mails.dpdk.org (Postfix) with ESMTP id 3AFBD432A6 for ; Fri, 23 Aug 2024 09:36:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Sx0oNZhlrgx3Y11KSu+QAxOcY+8c3Whl6EVpkG8uaIOS3rRbL8GeRbnQwwguvORdlDbIM8buMrMcr/uxYO/zSf4Q0vcUX5A6jK6WeknG276U7CLa/oBooadfYqakxBrV56vNomONSXeZXKzAvCqm+178N6F3s2hcLPq+3SKnmVMDQL+pQDFnOL3N3M4rAOZGMv1Hy6FhcnGz0OudeBW3/8Jn4lPQBpsiyygRQzrO32iKt6NgsrK8KC7b/IfzGbj8Aaz8FItWEOdivu95TRaYFUQ0oQVvgKuKKjYcemZAURTnFtUQiMEd7O7+gP0umTGgTWq0FsSyJmhEiaaSzrs3Gg== 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=sD8wQ4IzBwiELd4F/Tt90CC/7cg+3oVl9x5Duzmg5Jo=; b=b3AjcH81u3r969kdPQa0dS6JlVtWOVdrMK9Kf1lfUALLhc4utYwkqyo0GijRX7hV+5WcKb3VaeASmjcejuWk9NG7LfywfLGIrdhLhkn68iKwFcyDnds/IAXdt18u7nGxH22qmt+sQZtdkBg53KQkdYRbnaI2lfa9l36/KyDr5L5I6rkFLVdSSHwFHIzyLQHAdueqUvAwnK7Qqk+W+vaU3plGNAogDFUl0PCnxkF2buRnY/rWAVI4MfW3xqpwnyaket9jNXnfCLF6fl9+vU+8NoTcZkKlSTV/ik/H9Gr7MR83dss3ktuWqsIkuKgxqZdT6jJwROJw/1lEa+P8sUZdAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sD8wQ4IzBwiELd4F/Tt90CC/7cg+3oVl9x5Duzmg5Jo=; b=MNjf17t2iALe6dTaq/rtBpZ2U04kpknJuXmr4p+GKPlI4b3BSVyLTKKzPTlHWEjYkwOGixk3rne1wIx5ItDwy/yekWgw4MyODiioLuJ+r2bTo9aBMa/uQf65rZIq90vy5c5kr3pQexhFtzM0EhSTyYx/dxu3pi6hkYfYiCTG95S5Re4BK9LMTMbUAluJM6MaW3x1mCF9VoprXrh2tikJhg9NlFNrAxOP0JFFJt8Mr0p0t6OAkzClHT20KFH9fstOw9pBvyNNvZhBmuN4TyqiR+ty6Aq0GI6pLQFJZuFr8eGgFjlrI2vxTA9fGJro9J/EtSdqpKJsaZbuP94giYl17A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DBBPR04MB7994.eurprd04.prod.outlook.com (2603:10a6:10:1ea::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.20; Fri, 23 Aug 2024 07:36:04 +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:36:04 +0000 Message-ID: Date: Fri, 23 Aug 2024 13:05:59 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 17/17] net/dpaa: improve dpaa errata A010022 handling Content-Language: en-US To: Ferruh Yigit , Hemant Agrawal , dev@dpdk.org Cc: Jun Yang References: <20240801105313.630280-1-hemant.agrawal@nxp.com> <20240801105313.630280-18-hemant.agrawal@nxp.com> <5a5de567-3df5-438b-9614-d77428275667@amd.com> From: Hemant Agrawal In-Reply-To: <5a5de567-3df5-438b-9614-d77428275667@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI1PR02CA0046.apcprd02.prod.outlook.com (2603:1096:4:1f5::14) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DBBPR04MB7994:EE_ X-MS-Office365-Filtering-Correlation-Id: 2fc572ab-ff63-436f-78af-08dcc3463e7c X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?T3A1bUJUVnU4QlpyYjFURUsxSVJTcjNBMU81TVphbzViNWhWM2ZYMXhtSHA1?= =?utf-8?B?clZVNkdQaEtQRHpZUDF5blROSVdtK2lHdU5NNTNvNlBqeUNrTVJvbGM1YkhF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:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TTJJeEs4b25GVzlHcmtNZkNuUFZLTkdza1pKVm4zRzVrUDhpTUdidzN5bjVG?= =?utf-8?B?eVYzZEFxc1hQMXowOVh0eDE0TTZYMHY1anovWVNONFpYSzQ4QkxRWE8yNFFu?= =?utf-8?B?cE5nZUhFd2UxcWM1TStXRU1ERGlweG1FTzZ0TU93a2FpeGJOZ3Z0cFE5RUt1?= =?utf-8?B?U0ZYSm04b0NuQWZYRWhxMmJFN0gvaWtacVE3ZVdGUjRiVzJqQWFqRVFzaUVo?= =?utf-8?B?Qk9FMUhiYmRLb01sMW4zejhWZEJiYXlLT2ZzbWs3NjZzTzdKbmRsdDFDb0pX?= =?utf-8?B?L3p2OUdGQVBWUmtGWmtHWXRKcCt5Qi9oYktCY0E0K3ZaTDZVT2dOSXhCRU96?= =?utf-8?B?dWE5cDBkbllxYnFaaWFpL09jUVVjOWQvR0c0Nk9CQTZlQ01naVZvZkZnbFNN?= =?utf-8?B?UjllYVU1bjRFZnJZZENwb1NiRE9IMURxZjcyQWVrZVR4U3h5QTZRUlp2NGUz?= =?utf-8?B?ejAvOHJIei9od0prSkN5dFF2NGVhWi9UUHpBa3hNa2hZaStKcUd4aVQxNDFM?= =?utf-8?B?Yzk1Tzg0RkhldlZ4ZVRqT1FieDlPTGpIQ25QK1FONGo4cUhNMUNhUC9RT2x0?= =?utf-8?B?d3JKUlppUmlBTnByNXlHWExmN1JIYnEzdmhoVHNGa1ZvZHdUTm81RnM5cFVB?= =?utf-8?B?ejcxVStOM0ZrTE5yUk0vUGkvdUhJQ3JZU2dPWnMyYlFXR2RYdVYrOEdYYzg1?= =?utf-8?B?S1RVRUp4aEgremN4ak9iRFNIbWdQSUpkYTlrelZraUh4Z0I4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b2RDNlRVSVc1MzdYT2RJYktVZ284?= =?utf-8?B?MmZvMmt2QllwdG1JV1pUMUhsUmRKcW1veDc0WkkrSldwVE41d0M4eHNLVlY0?= =?utf-8?B?dEhFNVhLL1JSeFA0bUxvYXh4MCtKaXEwVGMrdUt2NWtUZ2ZJOFZNbEo5VHJu?= =?utf-8?B?dFU0RW8rRXhGcGtLU1gvYytEV1d4UGQxS3k4N3krcUxUdVdDbkhKdjVtK0dO?= =?utf-8?B?a1JjVSsxblVyOTFrckJCeGZlaVBRc1g4VCtYSStDaElLY3p2UHF5MXpqaWQ0?= =?utf-8?B?K0NleXdnV1hlTkpGMzFodlMySnREZUJURGpJUjlpaGFQbFNCWk9OaU9VekVm?= =?utf-8?B?Z3NOdGhTQnFjS1V0WWMwM2x3MjlYSmN4ZjFwR2VGMmRKVGZraDdkSjQ4Y3JN?= =?utf-8?B?V1owMEdvajZ3NzZmM2oxMm1KRE5peStYb1ZFSFdya3VZQlpxV28wb3VGV2FL?= =?utf-8?B?NG1vZUk1cGE1bVdZaWJ5T3czcjBTTGV0UlpIVlVYNWJWdVd4eXB4UEhVbWMv?= =?utf-8?B?b2c9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2fc572ab-ff63-436f-78af-08dcc3463e7c 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:36:04.5898 (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: HDqZJ9idqeaSUqEnOjNF9MV45Q1PoPJv865toXZb93JlCiBQhD7FESX+I49ftRuhEdFU2ZNJSqcPYeEX0PFHMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7994 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 On 07-08-2024 21:11, Ferruh Yigit wrote: > On 8/1/2024 11:53 AM, Hemant Agrawal wrote: >> 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; >> - >> > Previous approach seems better, detect when need to apply this errata, > and apply automatically. > > Now there is a macro controlling it, how a user will know this errata is > required and how to enable it. And this prevent same binary distributed > multiple environments combination of errata required and not required. > > Why not stick to the old method? Currently only the LS1043 platform is effected by this errata. Other DPAA paltforms are not impacted. So, only LS1043 customers, if they are using impacted scenario need to enable it. Other DPAA SoC customers will not be impacted by these additional checks in datapath. > >> 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) {