DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] net/nfp: compose firmware file name with new hwinfo
@ 2022-08-02  7:55 Chaoyong He
  2022-08-31  8:17 ` Niklas Söderlund
  2022-08-31 10:29 ` Ferruh Yigit
  0 siblings, 2 replies; 3+ messages in thread
From: Chaoyong He @ 2022-08-02  7:55 UTC (permalink / raw)
  To: dev; +Cc: oss-drivers, niklas.soderlund, Peng Zhang, stable

From: Peng Zhang <peng.zhang@corigine.com>

During initialization of the NFP driver, a file name for loading
application firmware is composed using the NIC's AMDA information and port
type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw".

In practice there may be many variants for each NIC type, and many of the
variants relate to assembly components which do not concern the driver and
application firmware implementation. Yet the current scheme leads to a
different application firmware file name for each variant, because they
have different AMDA information.

To reduce proliferation of content-duplicated application firmware images
or symlinks, the NIC's management firmware will only expose differences
between variants that need different application firmware via a newly
introduced hwinfo, "nffw.partno".

Use of the existing hwinfo, "assembly.partno", is maintained in order to
support for NICs with management firmware that does not expose
"nffw.partno".

Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")
Cc: stable@dpdk.org

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 5cdd34e588..e9d01f4414 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -680,7 +680,9 @@ nfp_fw_setup(struct rte_pci_device *dev,
 	char card_desc[100];
 	int err = 0;
 
-	nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "assembly.partno");
+	nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "nffw.partno");
+	if (nfp_fw_model == NULL)
+		nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "assembly.partno");
 
 	if (nfp_fw_model) {
 		PMD_DRV_LOG(INFO, "firmware model found: %s", nfp_fw_model);
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] net/nfp: compose firmware file name with new hwinfo
  2022-08-02  7:55 [PATCH v1] net/nfp: compose firmware file name with new hwinfo Chaoyong He
@ 2022-08-31  8:17 ` Niklas Söderlund
  2022-08-31 10:29 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2022-08-31  8:17 UTC (permalink / raw)
  To: Chaoyong He; +Cc: dev, oss-drivers, Peng Zhang, stable

Hi all,

A gentle ping on this patch.

On 2022-08-02 15:55:03 +0800, Chaoyong He wrote:
> From: Peng Zhang <peng.zhang@corigine.com>
> 
> During initialization of the NFP driver, a file name for loading
> application firmware is composed using the NIC's AMDA information and port
> type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw".
> 
> In practice there may be many variants for each NIC type, and many of the
> variants relate to assembly components which do not concern the driver and
> application firmware implementation. Yet the current scheme leads to a
> different application firmware file name for each variant, because they
> have different AMDA information.
> 
> To reduce proliferation of content-duplicated application firmware images
> or symlinks, the NIC's management firmware will only expose differences
> between variants that need different application firmware via a newly
> introduced hwinfo, "nffw.partno".
> 
> Use of the existing hwinfo, "assembly.partno", is maintained in order to
> support for NICs with management firmware that does not expose
> "nffw.partno".
> 
> Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
> ---
>  drivers/net/nfp/nfp_ethdev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
> index 5cdd34e588..e9d01f4414 100644
> --- a/drivers/net/nfp/nfp_ethdev.c
> +++ b/drivers/net/nfp/nfp_ethdev.c
> @@ -680,7 +680,9 @@ nfp_fw_setup(struct rte_pci_device *dev,
>  	char card_desc[100];
>  	int err = 0;
>  
> -	nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "assembly.partno");
> +	nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "nffw.partno");
> +	if (nfp_fw_model == NULL)
> +		nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "assembly.partno");
>  
>  	if (nfp_fw_model) {
>  		PMD_DRV_LOG(INFO, "firmware model found: %s", nfp_fw_model);
> -- 
> 2.27.0
> 

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] net/nfp: compose firmware file name with new hwinfo
  2022-08-02  7:55 [PATCH v1] net/nfp: compose firmware file name with new hwinfo Chaoyong He
  2022-08-31  8:17 ` Niklas Söderlund
@ 2022-08-31 10:29 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2022-08-31 10:29 UTC (permalink / raw)
  To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund, Peng Zhang, stable

On 8/2/2022 8:55 AM, Chaoyong He wrote:
> From: Peng Zhang <peng.zhang@corigine.com>
> 
> During initialization of the NFP driver, a file name for loading
> application firmware is composed using the NIC's AMDA information and port
> type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw".
> 
> In practice there may be many variants for each NIC type, and many of the
> variants relate to assembly components which do not concern the driver and
> application firmware implementation. Yet the current scheme leads to a
> different application firmware file name for each variant, because they
> have different AMDA information.
> 
> To reduce proliferation of content-duplicated application firmware images
> or symlinks, the NIC's management firmware will only expose differences
> between variants that need different application firmware via a newly
> introduced hwinfo, "nffw.partno".
> 
> Use of the existing hwinfo, "assembly.partno", is maintained in order to
> support for NICs with management firmware that does not expose
> "nffw.partno".
> 
> Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>

Applied to dpdk-next-net/main, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-31 10:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02  7:55 [PATCH v1] net/nfp: compose firmware file name with new hwinfo Chaoyong He
2022-08-31  8:17 ` Niklas Söderlund
2022-08-31 10:29 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).