[2/2] net/nfp: support new firmware name scheme
Checks
Commit Message
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@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_ethdev.c | 7 +++++++
1 file changed, 7 insertions(+)
@@ -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,