[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250408193124.37f37f7c@kernel.org>
Date: Tue, 8 Apr 2025 19:31:24 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com,
andrew+netdev@...n.ch, netdev@...r.kernel.org, Jedrzej Jagielski
<jedrzej.jagielski@...el.com>, przemyslaw.kitszel@...el.com,
jiri@...nulli.us, horms@...nel.org, corbet@....net,
linux-doc@...r.kernel.org, Mateusz Polchlopek
<mateusz.polchlopek@...el.com>, Bharath R <bharath.r@...el.com>, Slawomir
Mrozowicz <slawomirx.mrozowicz@...el.com>, Piotr Kwapulinski
<piotr.kwapulinski@...el.com>
Subject: Re: [PATCH net-next 10/15] ixgbe: extend .info_get with() stored
versions
On Mon, 7 Apr 2025 14:51:14 -0700 Tony Nguyen wrote:
> From: Jedrzej Jagielski <jedrzej.jagielski@...el.com>
>
> 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
Powered by blists - more mailing lists