linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
	andrew+netdev@lunn.ch, netdev@vger.kernel.org,
	Jedrzej Jagielski <jedrzej.jagielski@intel.com>,
	przemyslaw.kitszel@intel.com, jiri@resnulli.us, horms@kernel.org,
	corbet@lwn.net, linux-doc@vger.kernel.org,
	Mateusz Polchlopek <mateusz.polchlopek@intel.com>,
	Bharath R <bharath.r@intel.com>,
	Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>,
	Piotr Kwapulinski <piotr.kwapulinski@intel.com>
Subject: Re: [PATCH net-next 10/15] ixgbe: extend .info_get with() stored versions
Date: Tue, 8 Apr 2025 19:31:24 -0700	[thread overview]
Message-ID: <20250408193124.37f37f7c@kernel.org> (raw)
In-Reply-To: <20250407215122.609521-11-anthony.l.nguyen@intel.com>

On Mon,  7 Apr 2025 14:51:14 -0700 Tony Nguyen wrote:
> From: Jedrzej Jagielski <jedrzej.jagielski@intel.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

  reply	other threads:[~2025-04-09  2:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 21:51 [PATCH net-next 00/15][pull request] ixgbe: Add basic devlink support Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 01/15] devlink: add value check to devlink_info_version_put() Tony Nguyen
2025-04-08  0:31   ` Nelson, Shannon
2025-04-08 11:00     ` Jagielski, Jedrzej
2025-04-08 16:24       ` Nelson, Shannon
2025-04-09 14:14         ` Jagielski, Jedrzej
2025-04-09 14:39           ` Jakub Kicinski
2025-04-09 17:25             ` Nelson, Shannon
2025-04-11 11:11               ` Edward Cree
2025-04-14 12:28                 ` Przemek Kitszel
2025-04-14 16:33                   ` Jakub Kicinski
2025-04-15  7:53                     ` Przemek Kitszel
2025-04-07 21:51 ` [PATCH net-next 02/15] ixgbe: wrap netdev_priv() usage Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 03/15] ixgbe: add initial devlink support Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 04/15] ixgbe: add handler for devlink .info_get() Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 05/15] ixgbe: add E610 functions for acquiring flash data Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 06/15] ixgbe: read the OROM version information Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 07/15] ixgbe: read the netlist " Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 08/15] ixgbe: add .info_get extension specific for E610 devices Tony Nguyen
2025-04-09  2:28   ` Jakub Kicinski
2025-04-07 21:51 ` [PATCH net-next 09/15] ixgbe: add E610 functions getting PBA and FW ver info Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 10/15] ixgbe: extend .info_get with() stored versions Tony Nguyen
2025-04-09  2:31   ` Jakub Kicinski [this message]
2025-04-09 10:50     ` Jagielski, Jedrzej
2025-04-09 14:38       ` Jakub Kicinski
2025-04-10 12:49         ` Jagielski, Jedrzej
2025-04-07 21:51 ` [PATCH net-next 11/15] ixgbe: add device flash update via devlink Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 12/15] ixgbe: add support for devlink reload Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 13/15] ixgbe: add FW API version check Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 14/15] ixgbe: add E610 implementation of FW recovery mode Tony Nguyen
2025-04-07 21:51 ` [PATCH net-next 15/15] ixgbe: add support for FW rollback mode Tony Nguyen

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=20250408193124.37f37f7c@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=bharath.r@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jedrzej.jagielski@intel.com \
    --cc=jiri@resnulli.us \
    --cc=linux-doc@vger.kernel.org \
    --cc=mateusz.polchlopek@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=piotr.kwapulinski@intel.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=slawomirx.mrozowicz@intel.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;
as well as URLs for NNTP newsgroup(s).