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 E28FA43BC0; Fri, 1 Mar 2024 09:43:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 692B24025C; Fri, 1 Mar 2024 09:43:08 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2113.outbound.protection.outlook.com [40.107.220.113]) by mails.dpdk.org (Postfix) with ESMTP id 58671400D5 for ; Fri, 1 Mar 2024 09:43:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j/6fleNO1Pt+77bnIvqUJQqxvqfY0ZW9rvoGgClhznkRsgbJaGKc75QRNCQTgeAql9L0CNK2qMesJzmqokyLMLOSQEQlcEwno3iyPI8jqgDJOsfMREBI4xe/fQIgN4a5xA8Jl6mSqFhQoBrsFJ/YJ0jFTNdKO+slzheln40rkFDX0bMYhfVrznsImuRhuV2JayclyC/WUlEofUpev7yPSCximWdua+lVwLEAoF5eyRl5F6fegfOGXJYxhlJbCeqGTz4MCQQ8DYSnENkTTVabcuHlqdxBaMvQNqrKzLEfKGNiPXCsYF985qLE7/ZA5tq63SHMcRDt/Wejt8oC6f9Oyg== 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=+BYEW31k5DAYE/vlwPQMu4olYO1abdLVpl9zdWDavIE=; b=Q97v6oT7e+1KTVjaSH17mGIt8HbJRNL4Mzk/F29vP3CDpjL8L3kBlpIfo4eaRjlGl5CdD4UzmHEmyBlBx+GNt8egQx6/Q9ReQuyCdmM1z2am3Kks8auprBR8mIc4mRkJVpqCaO+KjmvTf7FRPeHBiFOG/2u9kEPXHHf3ZBWfr7nDSKejWRerguHJG8bsUrFo0rzRkqIyJq4ni/3wrQz70WFvGSEPS5ES4RfnX6zXCGxRpJSeC+HuIBbf6bYY5foDSiukH9FsnFI7gS9ER89iCsaco3KiU8Z1w8gRasycXu2Le4cahcDooVZ1tm44npK6E1vJtN3Qzu24fRypVg5nRg== 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=+BYEW31k5DAYE/vlwPQMu4olYO1abdLVpl9zdWDavIE=; b=VixxdLyONiy4cL6cw8bR+hY3hlgm12zcag8jv6IO4/ARt8hNJCxkMJCu8D3ZlG2OhnqQrsdmBkuPglJjDboqFxpXwJK2rPAmQqEHSmwL/R9Squd/d4Bgr6U2BZIoHJWOXblBkqyHa0n+HOLt9WFXODXs1EJYT0xSOicHZ0CkAfg= 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 MW3PR13MB4153.namprd13.prod.outlook.com (2603:10b6:303:5c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Fri, 1 Mar 2024 08:43:03 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e%4]) with mapi id 15.20.7316.039; Fri, 1 Mar 2024 08:43:03 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He Subject: [PATCH v2 0/3] reload the firmware as needed Date: Fri, 1 Mar 2024 16:42:41 +0800 Message-Id: <20240301084244.190484-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240227111551.3773862-1-chaoyong.he@corigine.com> References: <20240227111551.3773862-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0206.namprd03.prod.outlook.com (2603:10b6:a03:2ef::31) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MW3PR13MB4153:EE_ X-MS-Office365-Filtering-Correlation-Id: d3a23e0f-f8b2-4255-2c54-08dc39cb9b8c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eG9YS+w/R01t6j1V5B9KQO26/WR721M/hMXhvvZ6rP1i232F8y7oVRH/JSRQrlXwALtRN3SR/FgVs7goJZYlglLh556dfv3jwyLGzpZozdSXMPjmcr0PSr0yRTUu1nfiZeS1k0Zi9dWTXuge29KmnRzrRepD2k9G7qc5ybDSwpIEuF13o+/47frdUETQt02tRWi7eSNR5/vmV8lZjJZBLcSoHZogW4yzfOxv8/Ew5kuxhjqShsPLCzco4ffv8c1Sg8/xBrgG+Ubri6EnrVI8lE4JdOiPdKuRcW6BJNHlF6QztVIC8/iHG1wVpnu4isXtqN1ARsLQNoJyicRox8j9bUDv9jl6NByh8563k5hA9pQA72pXxr8XGFDXzsf9q4wWRzoqg+10lolpKQQP/DRO4eF/3gtHOhJHmn1XjXDJAEjtEiP9xMJQQx66wQfjxf4SWj09Gj5oR8cnziBGYZ5W+eAVYOP/r1m7/eKtfLRNkSacJ7kV15CWYs16hIjR9XKH1zF9DIAEz8p+VRLaOi0vFy9E0ApR5IVKcWO92NOwGLXEzLoHk6vo+TpMWEOf5wNVWU66ATB+5Y84oHslnfz8+FsAsNERRNGgv6ylcNS3SfLGGI7nx1sF46k6BWbCn2VY1bvuLrVbm7plhKyx141OtiP4dawDv/XPgBhFlvZnf5ZwPhV5VLSMI//E9dsbeq369pmjgQ0IOV8zI+oUROJKajmyY+P3E1mdP8RsDOlv4p4= 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?GdcCaBNm73ZF0xQR+G0mMsbKrzwYZ5gqHhPRLDy/SQcAMFjhE/nv0xJJDMbV?= =?us-ascii?Q?IJjfnCIvRSzxsnkFdmVASBOIpBfa7DiviqsCcExb7JEpxiipkFeuDneH78iu?= =?us-ascii?Q?Us/jc021/CKCUkiGT+AkHCt8h8+GvDEFGi/x/+V4ELOlkLtSZ6Dqjdhl/+B3?= =?us-ascii?Q?lqMpe0wXe0SVgf++9kuULJ0qUmN9aac08NECAbIusdPdmEhgTArwb3Rppmkm?= =?us-ascii?Q?BLCCBlC9JwfSQgDdx53rt+3FL+dklFBPMbFJnwSnWWpWJCLzkkWRGacw5tyO?= =?us-ascii?Q?lXJc8Xwsje9/EfRpIBK37Fo4KlAFF/rJJA5KRDbphZzfge2HVfEtkOr2KBvC?= =?us-ascii?Q?C/Otv8Bh8pWKC7gLVXdy9OXi+Id/CbfgHRW0M8PVt3Wrz5Q8p/fFOibzKLZS?= =?us-ascii?Q?DsxOgPExq0ZGS0y25f9+tO/EC8YAV+MAVbUgykN1Kqa7d64sJPMslNsLrYXk?= =?us-ascii?Q?gA38yyUSz9a4rhE+tAZU9ogeyyBXEZQ4guLXJOEyV9YUIeQrGZa1rxbcUpA+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gpfyb/XtCI7DLMs+nmXaP3OMtrgurcykk?= =?us-ascii?Q?IoNdS4Us3Vma1EggOuG+K/iyQoAR6Knas0iAhanGVWuahq4tthnnPmUJXgGt?= =?us-ascii?Q?i6zJwPdIQZBJIcqlSSAB3tD5R2qu2GLGS/S+hf8X2kWjf39L8u5HG97qib0i?= =?us-ascii?Q?YK1Unt9jHhN6ZaPv13xGJT20dr3vB4HPBGWPRUJF1C66SRiCQ6vn8tbmrMM5?= =?us-ascii?Q?3A=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3a23e0f-f8b2-4255-2c54-08dc39cb9b8c X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2024 08:43:03.3681 (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: pSvdxHUEQOeZS5dNaQqN9rlbTQlQf4s9/rRrasJID+kMfVvbeKWLXR25UNndGfO1lLfT18LNozlhZloASNA5ZVuj45rK/s32t2K5uuLKY7s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR13MB4153 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. --- v2: * Update commit log to explain what 'MIP' is. * Document about the new add 'force_reload_fw' device argument. --- 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 doc/guides/nics/nfp.rst | 21 + 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 +- 9 files changed, 1376 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