Re: [dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loading
From: Wang, Haiyue <hidden>
Date: 2021-07-05 11:44:58
-----Original Message----- From: David Marchand <redacted> Sent: Monday, July 5, 2021 16:34 To: Wang, Haiyue <redacted> Cc: dev@dpdk.org; Yang, Qiming <redacted>; Zhang, Qi Z <redacted> Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loading On Mon, Jul 5, 2021 at 10:02 AM Wang, Haiyue [off-list ref] wrote:quoted
quoted
quoted
I'm wondering what's full name for ice firmware in F34, has any *.xz postfix ? If so, the search method will also needs to be updated, since we will check each file can be accessed: #define ICE_PKG_FILE_DEFAULT "/lib/firmware/intel/ice/ddp/ice.pkg" #define ICE_PKG_FILE_UPDATES "/lib/firmware/updates/intel/ice/ddp/ice.pkg"This first patch is a preparation to have a single helper to select/open the firmware. I don't get what you mean.Since the pkg file has the *.xz, now the search method doesn't work. You fix the read only. ;-)This patch fixes nothing wrt to F34. It simply prepares for the next patch, because I did not want to fix in two places with the same change. I can squash everything in a single patch if you prefer. In the end, I end up with the same question, but for the whole series:quoted
quoted
Is there a change in behavior with this patch?
Sorry, after applied the whole patch to read the change, I get the real
design.
Looks like one patch is clear, since I'm lost in Patch#1, I thought it used
'*.pkg' to get the pkg name.... after applied, I read the source code directly,
yes, it’s clear in ice_load_pkg: the rte_firmware_read has handled "*.xz" right.
static int
ice_dcf_load_pkg(struct ice_adapter *adapter)
{
struct ice_dcf_adapter *dcf_adapter =
container_of(&adapter->hw, struct ice_dcf_adapter, parent.hw);
struct virtchnl_pkg_info pkg_info;
struct dcf_virtchnl_cmd vc_cmd;
bool use_dsn;
uint64_t dsn = 0;
vc_cmd.v_op = VIRTCHNL_OP_DCF_GET_PKG_INFO;
vc_cmd.req_msglen = 0;
vc_cmd.req_msg = NULL;
vc_cmd.rsp_buflen = sizeof(pkg_info);
vc_cmd.rsp_msgbuf = (uint8_t *)&pkg_info;
use_dsn = ice_dcf_execute_virtchnl_cmd(&dcf_adapter->real_hw, &vc_cmd) == 0;
if (use_dsn)
rte_memcpy(&dsn, pkg_info.dsn, sizeof(dsn));
return ice_load_pkg(adapter, use_dsn, dsn);
}
-- David Marchand