From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: patrick.mahan@hpe.com,
Bruce Richardson <bruce.richardson@intel.com>,
Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH] net/ice: improve log messages for DDP loading
Date: Sat, 16 May 2026 12:19:41 +0200 [thread overview]
Message-ID: <20260516101942.443871-1-david.marchand@redhat.com> (raw)
Some nics may not provide a serial number (PCI capability
RTE_PCI_EXT_CAP_ID_DSN).
This results in a confusing ERROR log:
ICE_INIT: ice_dev_init(): Failed to read device serial number
This is confusing as DDP loading does *not* require the serial number to
be present for the port to be functional afterwards.
Besides, after trying various path, if the default DDP is not present on
the runtime system, the port initialisation ends up with a vague error:
ICE_INIT: ice_load_pkg(): failed to search file path
Improve the situation with adjusting the log level when reading the
SN fails, then add more debug context to DDP file loading and end up
with a ERROR log mentioning the expected file.
ICE_INIT: ice_firmware_read(): Cannot read DDP file
/lib/firmware/updates/intel/ice/ddp/ice-b49691ffffe6e69c.pkg
ICE_INIT: ice_firmware_read(): Cannot read DDP file
/lib/firmware/intel/ice/ddp/ice-b49691ffffe6e69c.pkg
ICE_INIT: ice_firmware_read(): Cannot read DDP file
/lib/firmware/updates/intel/ice/ddp/ice.pkg
ICE_INIT: ice_firmware_read(): Cannot read DDP file
/lib/firmware/intel/ice/ddp/ice.pkg
ICE_INIT: ice_load_pkg(): Failed to load default DDP package
/lib/firmware/intel/ice/ddp/ice.pkg
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/intel/ice/ice_ethdev.c | 31 ++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 0f2e7aee14..e065581ccf 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -2003,6 +2003,17 @@ static int ice_read_customized_path(char *pkg_file, uint16_t buff_len)
return n;
}
+static int
+ice_firmware_read(const char *file, void *buf, size_t *bufsz)
+{
+ int ret = rte_firmware_read(file, buf, bufsz);
+
+ if (ret < 0)
+ PMD_INIT_LOG(DEBUG, "Cannot read DDP file %s", file);
+
+ return ret;
+}
+
int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn)
{
struct ice_hw *hw = &adapter->hw;
@@ -2016,7 +2027,7 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn)
/* first read any explicitly referenced DDP file*/
if (adapter->devargs.ddp_filename != NULL) {
strlcpy(pkg_file, adapter->devargs.ddp_filename, sizeof(pkg_file));
- if (rte_firmware_read(pkg_file, &buf, &bufsz) == 0) {
+ if (ice_firmware_read(pkg_file, &buf, &bufsz) == 0) {
goto load_fw;
} else {
PMD_INIT_LOG(ERR, "Cannot load DDP file: %s", pkg_file);
@@ -2032,11 +2043,11 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn)
if (use_dsn) {
snprintf(pkg_file, RTE_DIM(pkg_file), "%s/%s",
customized_path, opt_ddp_filename);
- if (rte_firmware_read(pkg_file, &buf, &bufsz) == 0)
+ if (ice_firmware_read(pkg_file, &buf, &bufsz) == 0)
goto load_fw;
}
snprintf(pkg_file, RTE_DIM(pkg_file), "%s/%s", customized_path, "ice.pkg");
- if (rte_firmware_read(pkg_file, &buf, &bufsz) == 0)
+ if (ice_firmware_read(pkg_file, &buf, &bufsz) == 0)
goto load_fw;
}
@@ -2046,23 +2057,23 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn)
strncpy(pkg_file, ICE_PKG_FILE_SEARCH_PATH_UPDATES,
ICE_MAX_PKG_FILENAME_SIZE);
strcat(pkg_file, opt_ddp_filename);
- if (rte_firmware_read(pkg_file, &buf, &bufsz) == 0)
+ if (ice_firmware_read(pkg_file, &buf, &bufsz) == 0)
goto load_fw;
strncpy(pkg_file, ICE_PKG_FILE_SEARCH_PATH_DEFAULT,
ICE_MAX_PKG_FILENAME_SIZE);
strcat(pkg_file, opt_ddp_filename);
- if (rte_firmware_read(pkg_file, &buf, &bufsz) == 0)
+ if (ice_firmware_read(pkg_file, &buf, &bufsz) == 0)
goto load_fw;
no_dsn:
strncpy(pkg_file, ICE_PKG_FILE_UPDATES, ICE_MAX_PKG_FILENAME_SIZE);
- if (rte_firmware_read(pkg_file, &buf, &bufsz) == 0)
+ if (ice_firmware_read(pkg_file, &buf, &bufsz) == 0)
goto load_fw;
strncpy(pkg_file, ICE_PKG_FILE_DEFAULT, ICE_MAX_PKG_FILENAME_SIZE);
- if (rte_firmware_read(pkg_file, &buf, &bufsz) < 0) {
- PMD_INIT_LOG(ERR, "failed to search file path");
+ if (ice_firmware_read(pkg_file, &buf, &bufsz) < 0) {
+ PMD_INIT_LOG(ERR, "Failed to load default DDP package " ICE_PKG_FILE_DEFAULT);
return -1;
}
@@ -2658,13 +2669,13 @@ ice_dev_init(struct rte_eth_dev *dev)
if (pos) {
if (rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4) < 0 ||
rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8) < 0) {
- PMD_INIT_LOG(ERR, "Failed to read pci config space");
+ PMD_INIT_LOG(WARNING, "Failed to read pci config space");
} else {
use_dsn = true;
dsn = (uint64_t)dsn_high << 32 | dsn_low;
}
} else {
- PMD_INIT_LOG(ERR, "Failed to read device serial number");
+ PMD_INIT_LOG(INFO, "Failed to read device serial number");
}
ret = ice_load_pkg(pf->adapter, use_dsn, dsn);
--
2.53.0
next reply other threads:[~2026-05-16 10:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-16 10:19 David Marchand [this message]
2026-05-19 17:58 ` [PATCH] net/ice: improve log messages for DDP loading Bruce Richardson
2026-05-20 15:44 ` David Marchand
2026-05-20 15:52 ` Bruce Richardson
2026-05-20 15:52 ` Bruce Richardson
2026-05-22 14:53 ` Bruce Richardson
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=20260516101942.443871-1-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=patrick.mahan@hpe.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