Netdev List
 help / color / mirror / Atom feed
* [PATCH net] be2net: propagate bridge config query errors
@ 2026-08-09  7:17 Avi Weiss
  2026-08-11  8:52 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Avi Weiss @ 2026-08-09  7:17 UTC (permalink / raw)
  To: Ajit Khaparde
  Cc: Sriharsha Basavapatna, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel, Avi Weiss

be_ndo_bridge_getlink() returns success when be_cmd_get_hsw_config()
fails, hiding the error from rtnetlink users.

Return the normalized command status instead.

Fixes: a77dcb8c8ff0 ("be2net: set and query VEB/VEPA mode of the PF interface")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
 drivers/net/ethernet/emulex/benet/be_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index ed302f5ec476..49646e4eeaa9 100644
--- 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);
 
 		if (hsw_mode == PORT_FWD_TYPE_PASSTHRU)
 			return 0;

base-commit: dd057113ac7ba5bdd2aed3d9405305911152f911
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] be2net: propagate bridge config query errors
  2026-08-09  7:17 [PATCH net] be2net: propagate bridge config query errors Avi Weiss
@ 2026-08-11  8:52 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2026-08-11  8:52 UTC (permalink / raw)
  To: thnkslprpt
  Cc: Simon Horman, ajit.khaparde, sriharsha.basavapatna, andrew+netdev,
	davem, edumazet, kuba, pabeni, netdev, linux-kernel

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-11  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-09  7:17 [PATCH net] be2net: propagate bridge config query errors Avi Weiss
2026-08-11  8:52 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox