Re: [PATCH net-next 10/15] ixgbe: extend .info_get with() stored versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon,  7 Apr 2025 14:51:14 -0700 Tony Nguyen wrote:
> From: Jedrzej Jagielski <jedrzej.jagielski@xxxxxxxxx>
> 
> Add functions reading inactive versions from the inactive flash
> bank.

Just to be crystal clear -- could you share the outputs for dev info:
 - before update
 - after update, before reboot/reload
 - after update, after activation (/reboot/reload)
?

AFAICT the code is fine but talking about the "inactive versions"
is not exactly in line with the uAPI expectations. 

> +static int ixgbe_set_ctx_dev_caps(struct ixgbe_hw *hw,
> +				  struct ixgbe_info_ctx *ctx,
> +				  struct netlink_ext_ack *extack)
> +{
> +	int err = ixgbe_discover_dev_caps(hw, &ctx->dev_caps);
> +
> +	if (err) {

Don't call functions which need error checking as part of variable init.

> +		NL_SET_ERR_MSG_MOD(extack,
> +				   "Unable to discover device capabilities");
> +		return err;
> +	}
> +
> +	if (ctx->dev_caps.common_cap.nvm_update_pending_orom) {
> +		err = ixgbe_get_inactive_orom_ver(hw, &ctx->pending_orom);
> +		if (err)
> +			ctx->dev_caps.common_cap.nvm_update_pending_orom =
> +				false;

This function would benefit from having ctx->dev_caps.common_cap
stored to a local variable with a shorter name :S

> +	}
> +
> +	if (ctx->dev_caps.common_cap.nvm_update_pending_nvm) {
> +		err = ixgbe_get_inactive_nvm_ver(hw, &ctx->pending_nvm);
> +		if (err)
> +			ctx->dev_caps.common_cap.nvm_update_pending_nvm = false;
> +	}
> +
> +	if (ctx->dev_caps.common_cap.nvm_update_pending_netlist) {
> +		err = ixgbe_get_inactive_netlist_ver(hw, &ctx->pending_netlist);
> +		if (err)
> +			ctx->dev_caps.common_cap.nvm_update_pending_netlist =
> +				false;
> +	}
-- 
pw-bot: cr




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux