[dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loading

Wang, Haiyue haiyue.wang at intel.com
Mon Jul 5 13:44:45 CEST 2021


> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Monday, July 5, 2021 16:34
> To: Wang, Haiyue <haiyue.wang at intel.com>
> Cc: dev at dpdk.org; Yang, Qiming <qiming.yang at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loading
> 
> On Mon, Jul 5, 2021 at 10:02 AM Wang, Haiyue <haiyue.wang at intel.com> wrote:
> > > > 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:
> > > 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



More information about the dev mailing list