Netdev List
 help / color / mirror / Atom feed
From: Jianbo Liu <jianbol@nvidia.com>
To: netdev-bot+sashiko@kernel.org, tariqt@nvidia.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com,
	alazar@nvidia.com, bsoares.it@gmail.com, cratiu@nvidia.com,
	gal@nvidia.com, kees@kernel.org, leon@kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	maord@nvidia.com, mbloch@nvidia.com, roid@nvidia.com,
	saeedm@nvidia.com, vladbu@nvidia.com
Subject: Re: [PATCH net] net/mlx5: Bridge, fix bogus MDB offload errors
Date: Tue, 27 Oct 2026 14:24:53 +0800	[thread overview]
Message-ID: <8dd825ca-3f23-41d0-994e-430e6642cc7f@nvidia.com> (raw)
In-Reply-To: <179279457212.3134.243255340288032723@kernel.org>



On 10/24/2026 6:29 AM, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue(s) to consider.
> 
> Critical: 0 · High: 0 · Medium: 1 · Low: 0
> 
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
> 
> - [Medium] In drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c,
>    mlx5_esw_bridge_port_mdb_add() now returns 0 when the bridge port…
> 
> --
> 
> net/mlx5: Bridge, fix bogus MDB offload errors
> 
> This patch changes mlx5_esw_bridge_port_mdb_add() so that it returns 0
> instead of -EINVAL when the bridge port or the port vlan cannot be found.
> It also lowers the log level from warn to info. The goal is to stop the
> error messages that appear when a 'bridge vlan del' overtakes a deferred
> MDB add.
> 
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
>> index b4cf3c5ac0dde..7c32dc9db098e 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
>> @@ -1867,26 +1867,27 @@ int mlx5_esw_bridge_port_mdb_add(struct net_device *dev, u16 vport_num, u16 esw_
>>  
>>  	port = mlx5_esw_bridge_port_lookup(vport_num, esw_owner_vhca_id, br_offloads);
>>  	if (!port) {
>> -		esw_warn(br_offloads->esw->dev,
>> +		/* MDB is added asynchronously from the switchdev deferred
>> +		 * queue while port might have been deleted concurrently.
>> +		 */
>> +		esw_info(br_offloads->esw->dev,
>>  			 "Failed to lookup bridge port to add MDB (MAC=%pM,vport=%u)\n",
>>  			 addr, vport_num);
>> -		NL_SET_ERR_MSG_FMT_MOD(extack,
>> -				       "Failed to lookup bridge port to add MDB (MAC=%pM,vport=%u)",
>> -				       addr, vport_num);
>> -		return -EINVAL;
>> +		return 0;
>>  	}
>>  
>>  	bridge = port->bridge;
>>  	if (bridge->flags & MLX5_ESW_BRIDGE_VLAN_FILTERING_FLAG && vid) {
>>  		vlan = mlx5_esw_bridge_vlan_lookup(vid, port);
>>  		if (!vlan) {
>> -			esw_warn(br_offloads->esw->dev,
>> +			/* MDB is added asynchronously from the switchdev
>> +			 * deferred queue while vlan might have been deleted
>> +			 * concurrently.
>> +			 */
>> +			esw_info(br_offloads->esw->dev,
>>  				 "Failed to lookup bridge port vlan metadata to create MDB (MAC=%pM,vid=%u,vport=%u)\n",
>>  				 addr, vid, vport_num);
>> -			NL_SET_ERR_MSG_FMT_MOD(extack,
>> -					       "Failed to lookup vlan metadata for MDB (MAC=%pM,vid=%u,vport=%u)",
>> -					       addr, vid, vport_num);
>> -			return -EINVAL;
>> +			return 0;
>>  		}
>>  	}
> 
> [Severity: Medium]
> Both of these early exits now return 0. Will the bridge then report the
> MDB entry as offloaded, even though nothing was programmed in the
> eswitch?
> 
[...]
> Would returning -EOPNOTSUPP here work instead?

Right, the entry ends up flagged as offloaded without a hardware rule.
Will respin with -EOPNOTSUPP.



      reply	other threads:[~2026-10-27  6:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 12:21 [PATCH net] net/mlx5: Bridge, fix bogus MDB offload errors Tariq Toukan
2026-10-23 22:29 ` netdev-bot+sashiko
2026-10-27  6:24   ` Jianbo Liu [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=8dd825ca-3f23-41d0-994e-430e6642cc7f@nvidia.com \
    --to=jianbol@nvidia.com \
    --cc=alazar@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bsoares.it@gmail.com \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=gal@nvidia.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maord@nvidia.com \
    --cc=mbloch@nvidia.com \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=roid@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=vladbu@nvidia.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