Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: anthony.l.nguyen@intel.com
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@kernel.org, andrew+netdev@lunn.ch, willemb@google.com,
	netdev@vger.kernel.org, adiyenga@cisco.com,
	jedrzej.jagielski@intel.com, jacob.e.keller@intel.com,
	aleksandr.loktionov@intel.com, rafal.romanowski@intel.com
Subject: Re: [PATCH net-next 5/5] ixgbevf: Warn when mailbox API negotiation fails
Date: Sat, 05 Dec 2026 22:47:39 +0000	[thread overview]
Message-ID: <179651085969.3148.7211491571062117923@kernel.org> (raw)
In-Reply-To: <20261204223807.3920143-6-anthony.l.nguyen@intel.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message repeats itself.
- [Low] The new warning in ixgbevf_negotiate_api()
  (drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c) has two…

--

ixgbevf: Warn when mailbox API negotiation fails

This patch adds a netdev_warn() to ixgbevf_negotiate_api() for the case
where every mailbox API version from ixgbe_mbox_api_17 down to
ixgbe_mbox_api_10 is rejected. The warning includes the error from the
last attempt. Negotiation and fallback behavior are unchanged.

> This is a diagnostic improvement only; negotiation, fallback and recovery
> behavior remain unchanged.
>
> This is a diagnostic improvement only.

[Severity: Low]
This isn't a bug, but the second sentence repeats the first paragraph and
looks like an editing leftover. Could it be dropped?

> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> index 7eb4acf59dab6..52670b616abc2 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> @@ -2344,6 +2344,10 @@ static void ixgbevf_negotiate_api(struct ixgbevf_adapter *adapter)
>  		idx++;
>  	}
>  
> +	if (api[idx] == ixgbe_mbox_api_unknown)
> +		netdev_warn(adapter->netdev,
> +			    "Mailbox API negotiation with PF failed: %d\n", err);

[Severity: Low]
Will this printed value be misleading?

The err value never holds a kernel errno. It comes from
ixgbevf_negotiate_api_version_vf() in vf.c, which returns either the
mailbox result or IXGBE_ERR_INVALID_ARGUMENT:

drivers/net/ethernet/intel/ixgbevf/vf.c:ixgbevf_negotiate_api_version_vf() {
    ...
	err = ixgbevf_write_msg_read_ack(hw, msg, msg, ARRAY_SIZE(msg));
	if (!err) {
		...
		err = IXGBE_ERR_INVALID_ARGUMENT;
	}

	return err;
}

These private codes in defines.h use the same numbers as errno values:

#define IXGBE_ERR_INVALID_ARGUMENT	-3
#define IXGBE_ERR_CONFIG		-4
#define IXGBE_ERR_MBX			-5
#define IXGBE_ERR_TIMEOUT		-6

So "failed: -5" reads like -EIO but means IXGBE_ERR_MBX. Similarly, -3 reads
like -ESRCH but means the PF rejected every version.

Since the goal of the patch is easier diagnosis, could the message say that
this is a driver code, or translate it to an errno or a string?

The first call comes from probe, before the netdev has a name:

ixgbevf_probe()
    ixgbevf_sw_init()
        ixgbevf_negotiate_api()
            netdev_warn(adapter->netdev, ...)
    ...
    strcpy(netdev->name, "eth%d");
    err = register_netdev(netdev);

At that point netdev_warn() prints the device as "(unnamed net_device)
(uninitialized)". The PCI device is still shown because SET_NETDEV_DEV()
has already run.

The other messages in ixgbevf_sw_init() use dev_info(&pdev->dev, ...).
Would dev_warn(&adapter->pdev->dev, ...) give clearer output here, including
on the later ixgbevf_reset() path?

> +
>  	ixgbevf_set_features(adapter);
>  
>  	if (adapter->pf_features & IXGBEVF_PF_SUP_ESX_MBX) {

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204223807.3920143-1-anthony.l.nguyen%40intel.com

      reply	other threads:[~2026-12-05 22:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 22:38 [PATCH net-next 0/5][pull request] Intel Wired LAN Driver Updates 2026-12-04 (ixgbe, ixgbevf) Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 1/5] ixgbe: E610: force phy link to get down when interface is down Tony Nguyen
2026-12-05 22:47   ` netdev-bot+sashiko
2026-12-04 22:38 ` [PATCH net-next 2/5] ixgbe: use ktime_get_real_ns() in ixgbe_ptp_reset() Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 3/5] ixgbe: use int instead of u32 for error code variables Tony Nguyen
2026-12-05 22:47   ` netdev-bot+sashiko
2026-12-04 22:38 ` [PATCH net-next 4/5] ixgbe: LinkSec deprecated macros cleanup Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 5/5] ixgbevf: Warn when mailbox API negotiation fails Tony Nguyen
2026-12-05 22:47   ` netdev-bot+sashiko [this message]

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=179651085969.3148.7211491571062117923@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=adiyenga@cisco.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jedrzej.jagielski@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafal.romanowski@intel.com \
    --cc=willemb@google.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