netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, pabeni@redhat.com,
	edumazet@google.com, petrm@nvidia.com, amcohen@nvidia.com,
	mlxsw@nvidia.com
Subject: Re: [PATCH net-next 01/13] mlxsw: Configure egress VID for unicast FDB entries
Date: Fri, 1 Jul 2022 18:23:26 +0300	[thread overview]
Message-ID: <Yr8Rbo0R3GrxFSYH@shredder> (raw)
In-Reply-To: <20220630201709.6e66a1bb@kernel.org>

On Thu, Jun 30, 2022 at 08:17:09PM -0700, Jakub Kicinski wrote:
> On Thu, 30 Jun 2022 11:22:45 +0300 Ido Schimmel wrote:
> > From: Amit Cohen <amcohen@nvidia.com>
> > 
> > Using unified bridge model, firmware no longer configures the egress VID
> > "under the hood" and moves this responsibility to software.
> > 
> > For layer 2, this means that software needs to determine the egress VID
> > for both unicast (i.e., FDB) and multicast (i.e., MDB and flooding) flows.
> > 
> > Unicast FDB records and unicast LAG FDB records have new fields - "set_vid"
> > and "vid", set them. For records which point to router port, do not set
> > these fields.
> 
> clang seems to have a legitimate complaint:

Yes, thanks. Need something like the below. Will add clang to my build
scripts and see if I can get nipa working with our internal patchwork.

```
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 6fb7fafdd2dc..352998d8e56d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -2931,10 +2931,9 @@ static void mlxsw_sp_fdb_notify_mac_process(struct mlxsw_sp *mlxsw_sp,
 	struct mlxsw_sp_bridge_device *bridge_device;
 	struct mlxsw_sp_bridge_port *bridge_port;
 	struct mlxsw_sp_port *mlxsw_sp_port;
+	u16 local_port, vid, fid, evid = 0;
 	enum switchdev_notifier_type type;
 	char mac[ETH_ALEN];
-	u16 local_port;
-	u16 vid, fid;
 	bool do_notification = true;
 	int err;
 
@@ -2965,10 +2964,11 @@ static void mlxsw_sp_fdb_notify_mac_process(struct mlxsw_sp *mlxsw_sp,
 
 	bridge_device = bridge_port->bridge_device;
 	vid = bridge_device->vlan_enabled ? mlxsw_sp_port_vlan->vid : 0;
+	evid = mlxsw_sp_port_vlan->vid;
 
 do_fdb_op:
-	err = mlxsw_sp_port_fdb_uc_op(mlxsw_sp, local_port, mac, fid,
-				      mlxsw_sp_port_vlan->vid, adding, true);
+	err = mlxsw_sp_port_fdb_uc_op(mlxsw_sp, local_port, mac, fid, evid,
+				      adding, true);
 	if (err) {
 		dev_err_ratelimited(mlxsw_sp->bus_info->dev, "Failed to set FDB entry\n");
 		return;
```

  reply	other threads:[~2022-07-01 15:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  8:22 [PATCH net-next 00/13] mlxsw: Unified bridge conversion - part 6/6 Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 01/13] mlxsw: Configure egress VID for unicast FDB entries Ido Schimmel
2022-07-01  3:17   ` Jakub Kicinski
2022-07-01 15:23     ` Ido Schimmel [this message]
2022-06-30  8:22 ` [PATCH net-next 02/13] mlxsw: spectrum_fid: Configure VNI to FID classification Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 03/13] mlxsw: Configure ingress RIF classification Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 04/13] mlxsw: spectrum_fid: Configure layer 3 egress VID classification Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 05/13] mlxsw: spectrum_router: Do not configure VID for sub-port RIFs Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 06/13] mlxsw: Configure egress FID classification after routing Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 07/13] mlxsw: Add support for VLAN RIFs Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 08/13] mlxsw: Add new FID families for unified bridge model Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 09/13] mlxsw: Add support for 802.1Q FID family Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 10/13] mlxsw: Add ubridge to config profile Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 11/13] mlxsw: Enable unified bridge model Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 12/13] mlxsw: spectrum_fid: Remove flood_index() from FID operation structure Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 13/13] mlxsw: spectrum_fid: Remove '_ub_' indication from structures and defines Ido Schimmel

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=Yr8Rbo0R3GrxFSYH@shredder \
    --to=idosch@nvidia.com \
    --cc=amcohen@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@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;
as well as URLs for NNTP newsgroup(s).