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 48B514597A; Fri, 13 Sep 2024 12:57:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB21E402B3; Fri, 13 Sep 2024 12:57:39 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id 17C314025E for ; Fri, 13 Sep 2024 12:57:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1726225057; x=1757761057; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=RiGiSshffNnskc/D3G7pt5Mub8cF42qtyhmY3BDB/no=; b=fvR9UVr5E0wUUd89y1D3pOsEFAUWt5SCSm7+ASVypaSEYXacN0le/pcZ fnA0lnTyIyMVk/p0TmgTK+uj2edyIgVnS7PaffXT0IxwfjUkm6HF3jkxI 2LpBLi8um2Gyg7vt34AJTZOJ4QsleKx8wWZvRQgGhcK+jvlUz00rm5ePu F3yMQgUz2fEK7w4uXAgU+GviqMxpz+J8CrDtSWvG7TBzEXp98e6mT5Mjv G4YNxcydmDOYe5bHeMw8RwP5mh2tLqPF8ZmRxC+ZkMklgDYJytE+WU1Zu TbreCcg+ezaVomr+fpc0tHDj1VS26EqbRiWGsfeHVvrQ7OGGSXdG8e70p Q==; X-CSE-ConnectionGUID: JcDEEdbWSO2NKnwrbwWRMw== X-CSE-MsgGUID: 2WdX6CRaSJiN+SojFba8XA== X-IronPort-AV: E=McAfee;i="6700,10204,11193"; a="13510892" X-IronPort-AV: E=Sophos;i="6.10,225,1719903600"; d="scan'208";a="13510892" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2024 03:57:36 -0700 X-CSE-ConnectionGUID: ql9FgMhjSRafATFPbyUYCg== X-CSE-MsgGUID: toD4Tq6iRM6a5p2F6K2PwA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,225,1719903600"; d="scan'208";a="68105226" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Sep 2024 03:57:36 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 13 Sep 2024 03:57:35 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 13 Sep 2024 03:57:35 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 13 Sep 2024 03:57:35 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.49) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 13 Sep 2024 03:57:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c8a4fKsoBV9S06YczaLUzup/1dnzCVWiLmzzMNalK6fSdbqIs+O7jB2+iKS7lVFARYUto7gjQmG+m+ha3FXAU4MxueyNjCqpuUKrjx7ioLcKeWt5Xfolatd8KQtH0jEd+tOcmYRUIG//NxFSxUzSudHaZUBuljbq4/vVNAd9DOZbyo7SNqr70T7zVKWz0GlXt1UOtu2spniKZ4Szev+12D8NN+aDrP9hh3XETOScDiS3DEs9dNCsbhvOC/3GuzkCmwghibpT6vjXFs05ETr1wDvxbmWCm4Vzvr+E4kUSe+K3CX83gMP98Vt0o88IFFqNyi0dfKaB1hEnmLnMHFXIgA== 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=z6CPyzoXve+8FmyOOjNDARneJ9HbndL/5E4waU2hC9c=; b=ha1ZBw30pIC27VQ0uoE1X0bNsb13MeVR8zDNqwbWeDZTFtZh1uvEtwfj5pjCMjOO2Qr/6HHkUzRhDbnCwLSy1WmOIzYne8eXpOD/Va5Cfw3HcwpuE4EXT/e3uobfhelSl9XcJphMImsR6zp29x18MIiz4+wgRRMfyh0LVgGpgbzBBAcphtcDqFBtG5uXNKY73whOkj3rXCLuMP0S5FlmCLELFjrwok3JFY7zz9vC0Bf4JZ+hCsDyOcPxcaAbe6r0HTwd9Ol8tJVJqEwKbkxjAUYrdZgs+03rLFlMf56WiE80GTSpHZvLP14JXFPu197FPjRoXi82nq3koqz+SjDnhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by IA1PR11MB7344.namprd11.prod.outlook.com (2603:10b6:208:423::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.25; Fri, 13 Sep 2024 10:57:23 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%2]) with mapi id 15.20.7962.018; Fri, 13 Sep 2024 10:57:23 +0000 Date: Fri, 13 Sep 2024 11:57:17 +0100 From: Bruce Richardson To: Zhichao Zeng CC: Subject: Re: [PATCH v4] net/ice: support customized search path for DDP package Message-ID: References: <20240912080114.1513773-1-zhichaox.zeng@intel.com> <20240913061537.2077253-1-zhichaox.zeng@intel.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240913061537.2077253-1-zhichaox.zeng@intel.com> X-ClientProxiedBy: DU7P195CA0007.EURP195.PROD.OUTLOOK.COM (2603:10a6:10:54d::26) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|IA1PR11MB7344:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e530286-c4d4-4548-5cea-08dcd3e2d8e5 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: =?iso-8859-1?Q?dyziADgI9QwCFOtRYZRR/EF9HwiZXTFWgyhHAp1jKTMBeNb0FTeqYp73iU?= =?iso-8859-1?Q?S89NoUgjg4YzUKFgMQufEQEtWB3JaIpMYQph95JdFE9JFb+M9g9fO5RCC0?= =?iso-8859-1?Q?jOG67bYbjxIpFKRmpGuEe8DvOQyRNuiSxSvgt/3YHWH0pOdJiMvJcHHGXi?= =?iso-8859-1?Q?27E97xOMAH6lz6+GzTh84YGEhCycGkdFrgIP4U+jMaTycFPqDF8wJW5T7H?= =?iso-8859-1?Q?9cz4Up1+xB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-1?Q?EzOEb/nNadXIWPy/rswe891SFtdIj0vukDFKFFM0Y/0eC1CbcYdToIXbzM?= =?iso-8859-1?Q?3fq5QRfusVmTL9RAa26akEmwAMcSmPZ4B3Zg/IMJUGOahkVZS0Zl3VXwkd?= =?iso-8859-1?Q?HWlhysxGSCpXX8aj6GPPFiz1XgQtO5gixtnUQAoFjMnMNBeCoJdv8scXpJ?= =?iso-8859-1?Q?zgZFXkd9XK/R4kHw1AapIs654tk51ryXwwPGqHdojMrq4rYBMM4V52dEcG?= =?iso-8859-1?Q?eeO4/CxJxI3PFJtguKTML825B6pjsheQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.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: =?iso-8859-1?Q?NvbmPM7pNavZalgvKzpz+DLejvo3oY3Sw5rE+hvS0iAUAFUJTHH96X2/Zt?= =?iso-8859-1?Q?E03xSvA5dQSj1XCZQe3EfgBe6Hagr6c3WexKRf1RThj0gbzdUqAuMbv6lV?= =?iso-8859-1?Q?rp1LN7ISTH8tpiFVZHNUHTXlBROraU9OJY9pgPFWT+3qSQ4ClSbo1tJiUP?= =?iso-8859-1?Q?cX6H8uDMdmwpFHJ3z/jc5sp9pO1mJ07gCiOiEujUYlKS+5V+rzkpWecxOZ?= =?iso-8859-1?Q?AVi3i95AoxxzMyW9lvnPjnDSMvg+FldBlYcK3Wmc520TaCCYQLFI5+wLTD?= =?iso-8859-1?Q?0Qj10J0FX+3JT3Nh+ZTAGvZ3KF6ngT5TzMIgkqlXH5yIzXLpUSIKEOD+Ou?= =?iso-8859-1?Q?a+4NIlTqy7EMgFfnoOmX5TpZB9XAZvD252GCLQ+kQnSKpJdIZWYclAAsvQ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cJWp7t5BYrIW/aHueh6?= =?iso-8859-1?Q?9C5SwcQ5QXt/+CtMx8uHi0Cag/rC0iqGtgzQyPQIv8jiGjeJWzyDIDYIME?= =?iso-8859-1?Q?mfgzvKRSkFLbsA6ZvPZ3M3x8S7F9kC/8qMBBuXCHZ7YpwtrkmNk2SGZhQA?= =?iso-8859-1?Q?ckFVk4OHDC0ooB/HdcZsfoFlwBRlnaUZPwC5QZnSDuibtRipDTWfaQwoBm?= =?iso-8859-1?Q?fU+z3B8RN5p/8IitbGfbedrsaSFQ4YWdlHZn8cgUqh5sUKUXWOAuUwX6pY?= =?iso-8859-1?Q?BISsxsdeSCmx3/AwS8EGs7AQCdQPJkarcvO8UyPVUvntAVM1wdaSM/zthV?= =?iso-8859-1?Q?86AtPuxEVAh0vEB3UiCu48F2pMGad44YfdAzybT8j2rcTmEh6XaaptOA?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0e530286-c4d4-4548-5cea-08dcd3e2d8e5 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2024 10:57:23.6260 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zdlnaGKtGgWrP4fG+bjuhW8f/+dygmRtDAhTIm4x8mlJnYgZYDEKsuDqy3Rap7XFlQBg4cn7leAwDQH4w6a83JSFxUTvY0cj4i70ntj2ggo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB7344 X-OriginatorOrg: intel.com 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 Fri, Sep 13, 2024 at 02:15:37PM +0800, Zhichao Zeng wrote: > This patch adds support for customizing firmware search path for > DDP package like the kernel behavior, it will read the search path > from "/sys/module/firmware_class/parameters/path", and try to load > DDP package. > > Also, updates documentation for loading the DDP package in ice.rst. > > Signed-off-by: Zhichao Zeng > > --- > v4: fix CI error > v3: update doc, fix code error > v2: separate the patch and rewrite the log > --- > doc/guides/nics/ice.rst | 63 +++++++++++++++++++----------------- > drivers/net/ice/ice_ethdev.c | 44 +++++++++++++++++++++++++ > drivers/net/ice/ice_ethdev.h | 1 + > 3 files changed, 79 insertions(+), 29 deletions(-) > > diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst > index ae975d19ad..7f347684e7 100644 > --- a/doc/guides/nics/ice.rst > +++ b/doc/guides/nics/ice.rst > @@ -80,6 +80,40 @@ are listed in the Tested Platforms section of the Release Notes for each release > | 24.03 | 1.13.7 | 1.3.35 | 1.3.45 | 1.3.13 | 4.4 | > +-----------+---------------+-----------------+-----------+--------------+-----------+ > > +Dynamic Device Personalization (DDP) package loading > +---------------------------------------------------- > + > +The Intel E810 requires a programmable pipeline package be downloaded > +by the driver to support normal operations. The E810 has a limited > +functionality built in to allow PXE boot and other use cases, but the > +driver must download a package file during the driver initialization > +stage. Hi Zhichao, I realise that this text above is not written by you, but when moving this text we can update it a little. * in second sentence, drop the word "a" before "limited functionality". * I feel we are missing a few words in the second sentence to clarify the need for DDP support. For example, after the word "but" we could clarify with "for normal use" or "for DPDK use" or some similar phrase. > + > +The default DDP package file name is ice.pkg. For a specific NIC, the > +DDP package supposed to be loaded can have a filename: ice-xxxxxx.pkg, For the filenames: ice.pkg and ice-xxxxxx.pkg, put them in `` quotes to make them monospaced/literal text. Same for filenames below. > +where 'xxxxxx' is the 64-bit PCIe Device Serial Number of the NIC. For > +example, if the NIC's device serial number is 00-CC-BB-FF-FF-AA-05-68, > +the device-specific DDP package filename is ice-00ccbbffffaa0568.pkg > +(in hex and all low case), please review README from > +`Intel® Ethernet 800 Series Dynamic Device Personalization (DDP) for Telecommunication (Comms) Package > +`_ > +for more information. A symbolic link to the DDP package file is also ok. > +The same package file is used by both the kernel driver and the ICE PMD. > + > +ICE PMD support customized DDP search path, driver will read search path "support" -> "supports using a" ", driver" -> ". The driver" "search path" -> "the search path" > +from '/sys/module/firmware_class/parameters/path' as CUSTOMIZED_PATH. > +During initialization, the driver searches in the following paths in order: > +CUSTOMIZED_PATH(mentioned above), /lib/firmware/updates/intel/ice/ddp and you can drop "(mentioned above)". > +/lib/firmware/intel/ice/ddp. The corresponding device-specific DDP > +package will be downloaded first if the file exists. If not, then the > +driver tries to load the default package. The type of loaded package > +is stored in ``ice_adapter->active_pkg_type``. The behaviour is not exactly clear here. The text seems to imply (at least ot me) that the search order is to check each directory first for the serial-number package and then for ice.pkg, before moving on to the next directory. However, the actual search pattern in the code is to check each directory in turn for a serial number package, and then scan each directory in turn for an ice.pkg file. Consider the case of having two files: $CUSTOMIZED_PATH/ice.pkg /lib/firmware/intel/ice/ddp/ice-xxxxxxx.pkg As described in the doc text above, I would expect the first of these two packages to be used, since it's in the customized path, but in fact the second will be used by the code since it has a serial number on it so is found in the initial scan for a numbered-package. > + > + .. Note:: > + > + Windows support: The DDP package is not supported on Windows so, > + loading of the package is disabled on Windows. I notice that the comma "," is in the wrong place in the original text - it should come before the "so" not after it - but overall the whole line can just be shortened to: "Windows support: DDP packages are not supported on Windows" Thanks, /Bruce