[PATCH 2/2] net/nfp: support new firmware name scheme
Chaoyong He
chaoyong.he at corigine.com
Tue May 28 03:29:33 CEST 2024
Now all application firmware is indifferent of port speed, so do not
bother to compose the firmware name with media info. This will reduce
a number of symlinks for firmware files.
The logic of firmware name with media info still kept for compatibility.
Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
drivers/net/nfp/nfp_ethdev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 771137db92..74d4a726df 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1130,6 +1130,13 @@ nfp_fw_get_name(struct rte_pci_device *dev,
}
}
+ /* And then try the model name */
+ snprintf(card_desc, sizeof(card_desc), "%s.nffw", nfp_fw_model);
+ snprintf(fw_name, fw_size, "%s/%s", DEFAULT_FW_PATH, card_desc);
+ PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
+ if (access(fw_name, F_OK) == 0)
+ return 0;
+
/* Finally try the card type and media */
snprintf(card_desc, sizeof(card_desc), "nic_%s_%dx%d.nffw",
nfp_fw_model, nfp_eth_table->count,
--
2.39.1
More information about the dev
mailing list