All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: thnkslprpt@gmail.com
Cc: Simon Horman <horms@kernel.org>,
	ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] be2net: propagate bridge config query errors
Date: Tue, 11 Aug 2026 09:52:57 +0100	[thread overview]
Message-ID: <20260811085257.814556-1-horms@kernel.org> (raw)
In-Reply-To: <20260809071725.944734-1-thnkslprpt@gmail.com>

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://sashiko.dev/#/patchset/20260809071725.944734-1-thnkslprpt@gmail.com?part=1
---
--- Patch [1]: [PATCH net] be2net: propagate bridge config query errors ---
commit 7ca874943675f3c258ffbdac77a92f7564cc5f1a
Author: Avi Weiss <thnkslprpt@gmail.com>

be2net: propagate bridge config query errors

This patch modifies be_ndo_bridge_getlink to return a normalized error code
when be_cmd_get_hsw_config fails. The goal is to propagate the hardware or
firmware error to rtnetlink users instead of silently masking it with a
success return code.

> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -5028,7 +5028,7 @@ static int be_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
>  					       adapter->if_handle, &hsw_mode,
>  					       NULL);
>  		if (status)
> -			return 0;
> +			return be_cmd_status(status);

[Severity: High]
Will returning a hard error here abort the system-wide rtnetlink bridge dump?

Looking at how the netlink core handles the return value from
ndo_bridge_getlink:

net/core/rtnetlink.c:rtnl_bridge_getlink() {
...
                err = ops->ndo_bridge_getlink(skb, portid,
                                              seq, dev,
                                              filter_mask,
                                              NLM_F_MULTI);
                if (err < 0 && err != -EOPNOTSUPP) {
                        if (likely(skb->len))
                                break;
                        goto out_err;
                }
...
}

If a localized firmware failure causes the be2net driver to return an error
like -EIO, it appears this will terminate the global netlink dump. Could this
cause system management tools like 'bridge link' to fail to list all the
other unrelated network interfaces on the system?

>  
>  		if (hsw_mode == PORT_FWD_TYPE_PASSTHRU)
>  			return 0;

      reply	other threads:[~2026-08-11  8:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-09  7:17 [PATCH net] be2net: propagate bridge config query errors Avi Weiss
2026-08-11  8:52 ` Simon Horman [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=20260811085257.814556-1-horms@kernel.org \
    --to=horms@kernel.org \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sriharsha.basavapatna@broadcom.com \
    --cc=thnkslprpt@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.