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 9A9C443C08; Tue, 27 Feb 2024 12:16:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B79A4027D; Tue, 27 Feb 2024 12:16:16 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2109.outbound.protection.outlook.com [40.107.93.109]) by mails.dpdk.org (Postfix) with ESMTP id 3584240150 for ; Tue, 27 Feb 2024 12:16:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k4SHvlYrNGpynrM1P4wa4eDvzEt4JWcW60jFEv4mwAMyQk4Y/aCYcjgPoSMWm4dxytbKLFxg6fc1Nue5oq3IkdJ/KmnojYoXCe7twqymUB4b+DU76vHvFdfHpHgTrOvV3xecHCCpWmwSWZHK4GCdvobj2yrIcRD3P0gyZ5m1jy0/1f8gQlom960Ctl64kvTidzZW6Nmqa7u0U0jFowECzM4EPPjMZg97eCW0X+fnwUD0NSzj15jeqbfwbvm1gUDAPcnanZcvh6XMVa56wgsJLxB/QlnIaho31TUPQKg5EMsRvNC1+8VVvjALacxu0C/uYT5ZZCQTQKUFpRylbwD7Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=BHAB32dxJvNos6n4Grr3myURkLYVA5u5kXHWPqdbAaM=; b=eFuOkzzs5bjPsQhXLvRulG/BQbe59N2hwecbtKIf1UtErlTJaYuRIdmVTkgThnXIiWcBb5kDi7Suewtjbg/AZXDPUZAp0G4/CtlhsbgFBk7l9g+lUKZddW524FzuL50U6cYk+ymZm10RkGsVqYQ7TjjV6wM/iw2ZpHLei8vKluMTdfo4qPmapLWiCE8gOr9d3jSrF7nHJW9OBU+GQUeii2uWBGd8Yc9PcgdWyRsWX/k1vhdg41AU5SAYFW4awxY9T/Q8UDU6ZWGKuC5K6YhWz65Y6gek5gD6YHt6V9Mf4CWS1eMPnwCvwO8kS61qrrW4xCl1L3EoucajmvfQQUKvpw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BHAB32dxJvNos6n4Grr3myURkLYVA5u5kXHWPqdbAaM=; b=i+OAvvb3AABa3LrlRI3jwsDAVARBzN9f4M5eDx0dbi9yFVMzzvF7WdGFO9l4lEWhOkYUScFJBKYITwccn4V6sE4EUpUqTtBfAbdszPShus2N9QM+7SE96tPSLLKxl6E+3sNehwWEbaE7YI1HxsnkRnOfajIYkOkqcxGnMsZUWDQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH7PR13MB5843.namprd13.prod.outlook.com (2603:10b6:510:151::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Tue, 27 Feb 2024 11:16:11 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::8e02:f738:570a:f8aa]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::8e02:f738:570a:f8aa%7]) with mapi id 15.20.7316.035; Tue, 27 Feb 2024 11:16:11 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He Subject: [PATCH 0/3] reload the firmware as needed Date: Tue, 27 Feb 2024 19:15:48 +0800 Message-Id: <20240227111551.3773862-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY5PR20CA0002.namprd20.prod.outlook.com (2603:10b6:a03:1f4::15) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5843:EE_ X-MS-Office365-Filtering-Correlation-Id: ffade758-bb18-4ec2-dce7-08dc378580c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4PjVsgSbiv/UWtbRkjoPhBp6x99wNaPnPwJIWuSIWrFVuRW+yREL+vCZsmSIVGoHSZ0QJypiBCT0FJ1v+0BBaXQ2yrsaMEGK3O6X+sT4BtgFd9gA8S+jVLjtBvCrYcvGnoWhsSLi2kdvCj5uIImZuizaRymvWeGE7vk8SDqFuDr35IptCXmio50+NPzwv3DLyZN6rP7bYr6FNbS56MBeLiaFMypaOWinZ20E1jKa6oHb2rAHpskOI6GnJl+vhYcz4wQqBtbZECLeS1aEag1Fu7Ho9oPhPbQvqoIGo6phg8Z24adQeaUCPWVXRoqcWyx2M4t928hMDNFUOLfnpBMNx+C1MPSwqgyI6Fcv17yURJOwNl8txk3HboqYfKppeyQpwQU8RtYZflz4+Nsk94ARBiAIU5fiL2IGHMmAdtUbBhNfj9zIcXIXg32mtGPXgUVo+5bE6+EBYk24+U4SgD4UvsAH4LqML4M1nFw0thWz1/I3g/NX79vy8VKW/77UZlPaP6SxsDjTuUva6WTlumPHBXNQS7JoMvqpKFE87jFV96gI4nuF13rzU4wjE7i+TjOL4lGeeVxvtLmzi4Ww7U3uGNqNU9Hoc2xzjBfzgwWYdheBbg52GgPV9YiQIeCg7KUxEZj2Q4cpEUAX9b9s2NKuXUjY434lsLU40TZEUrmGCdZ5mXvF2Mpg3eZpxaQvAn7Hk66wWZY6w8qxRmSA7/UugGKN6J92aC9NLlObUEUgSSo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?G+GRJkwStAwsibBwVtniB8y/wlfcZcaaP4gC9s2y30ip+VYEO02sCQ1uVOWD?= =?us-ascii?Q?rU9LbOptcekXSEgrLT6zIcSWuAVQrTSNk1Y5uU/mSn3GuwURYcYh1gEtBqkP?= =?us-ascii?Q?0ZDQxFn8E4+fUdETqbf0PtfbbhtFCALPxIfCVBgNI1d1z4mhBZjTEMKcc2fi?= =?us-ascii?Q?FtMSbsUVVZon/tGTH+4YW3WTVku4YR8VVD6NDlrizxzR9T6kumq5K+zYpbmB?= =?us-ascii?Q?uqd5KRWByhUWWu6uxtbCVTcThRy82Up11v8lQgv2fGLIbVO9HLqF4JAQp2eY?= =?us-ascii?Q?QrCAADlxdApZ851R+ms/fiuxtARuXsMRfeWOkDDd9YkkWdCA6g302PkeLg4i?= =?us-ascii?Q?V4+pKv7bqPL5XeR7zBK/jKdbniBgoijlItFRp5rqh/Eatzhvtz/UGZWvPUJl?= =?us-ascii?Q?vN+bylT2xldyRpX5SVoiW/9DopKX5a/ziAhdpK9TWwwbrDenXNwY7/3eOEbE?= =?us-ascii?Q?i4p1P+lP0pP9t/S3c6VoZB4Ss+WdAN7MPIbTqmo5W9/Esz/7G7cilMiLNrje?= =?us-ascii?Q?12IWyZayLjKoM/kz7h3MMMRH/YiqkC/Ypw4UTIT8GT1KAjQhMBlR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+fSsCTlqaNicxzhW7OYRkueGCOWYMWR7VaDv9ze+V?= =?us-ascii?Q?YTjUxiGAO4CZydb7XJIPPcA0C8O3PVXRNtx8jnGIyeJwXrnCBT92YEatYtKr?= =?us-ascii?Q?A/lrZvqDr6yymUO6kBz+BjxRhVV9tCeKnRvGAcSbNttRu5CHgJcEbS2+m/7l?= =?us-ascii?Q?wg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffade758-bb18-4ec2-dce7-08dc378580c1 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 11:16:11.3072 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hXlJSWvDdwFzEyoifLsABWgqvp98DHCZbPgxGbekL+YEYnZrmOchYSX8lxZCi8crcp0qNUSTch+KBg5Vk0p2T810FdVCbaJCUE6rj0f8kTE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5843 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 Add the necessary logic to get firmware version from firmware file, and only reload the firmware when the firmware version changed. Also add a device argument which can force reload the firmware and ignore the firmware version. Peng Zhang (3): net/nfp: add the elf module net/nfp: reload the firmware only when firmware changed net/nfp: add force reload firmware option drivers/net/nfp/meson.build | 1 + drivers/net/nfp/nfp_ethdev.c | 177 ++++- drivers/net/nfp/nfp_net_common.c | 17 + drivers/net/nfp/nfp_net_common.h | 10 + drivers/net/nfp/nfpcore/nfp_elf.c | 1079 +++++++++++++++++++++++++++++ drivers/net/nfp/nfpcore/nfp_elf.h | 13 + drivers/net/nfp/nfpcore/nfp_mip.c | 30 +- drivers/net/nfp/nfpcore/nfp_mip.h | 70 +- 8 files changed, 1355 insertions(+), 42 deletions(-) create mode 100644 drivers/net/nfp/nfpcore/nfp_elf.c create mode 100644 drivers/net/nfp/nfpcore/nfp_elf.h -- 2.39.1