From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>,
Long Wu <long.wu@corigine.com>,
Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH 2/2] net/nfp: support new firmware name scheme
Date: Tue, 28 May 2024 09:29:33 +0800 [thread overview]
Message-ID: <20240528012933.2345436-3-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20240528012933.2345436-1-chaoyong.he@corigine.com>
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(+)
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
prev parent reply other threads:[~2024-05-28 1:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 1:29 [PATCH 0/2] " Chaoyong He
2024-05-28 1:29 ` [PATCH 1/2] net/nfp: refactor the firmware load logic Chaoyong He
2024-05-28 1:29 ` Chaoyong He [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240528012933.2345436-3-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=long.wu@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=peng.zhang@corigine.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).