All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, petrm@nvidia.com, amcohen@nvidia.com,
	mlxsw@nvidia.com, Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 01/13] mlxsw: spectrum: Add a temporary variable to indicate bridge model
Date: Mon, 27 Jun 2022 10:06:09 +0300	[thread overview]
Message-ID: <20220627070621.648499-2-idosch@nvidia.com> (raw)
In-Reply-To: <20220627070621.648499-1-idosch@nvidia.com>

From: Amit Cohen <amcohen@nvidia.com>

As part of transition to unified bridge model, many different firmware
configurations are done.

Some of the configuration that needs to be done for the unified bridge
model is not valid under the legacy model, and would be rejected by the
firmware. At the same time, the driver cannot switch to the unified bridge
model until all of the code has been converted.

To allow breaking the change into patches, and to not break driver
behavior during the transition, add a boolean variable to indicate bridge
model. Then, forbidden configurations will be skipped using the check -
"if (!mlxsw_sp->ubridge)".

The new variable is temporary for several sets, it will be removed when
firmware will be configured to work with unified bridge model.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index e58acd397edf..6b17fa9ab9c7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3155,6 +3155,7 @@ static int mlxsw_sp_init(struct mlxsw_core *mlxsw_core,
 		goto err_ports_create;
 	}
 
+	mlxsw_sp->ubridge = false;
 	return 0;
 
 err_ports_create:
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 80006a631333..828d5a265157 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -216,6 +216,7 @@ struct mlxsw_sp {
 	u32 lowest_shaper_bs;
 	struct rhashtable ipv6_addr_ht;
 	struct mutex ipv6_addr_ht_lock; /* Protects ipv6_addr_ht */
+	bool ubridge;
 };
 
 struct mlxsw_sp_ptp_ops {
-- 
2.36.1


  reply	other threads:[~2022-06-27  7:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27  7:06 [PATCH net-next 00/13] mlxsw: Unified bridge conversion - part 4/6 Ido Schimmel
2022-06-27  7:06 ` Ido Schimmel [this message]
2022-06-27  7:06 ` [PATCH net-next 02/13] mlxsw: spectrum_fid: Configure flooding table type for rFID Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 03/13] mlxsw: Prepare 'bridge_type' field for SFMR usage Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 04/13] mlxsw: spectrum_fid: Store 'bridge_type' as part of FID family Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 05/13] mlxsw: Set flood bridge type for FIDs Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 06/13] mlxsw: spectrum_fid: Configure egress VID classification for multicast Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 07/13] mlxsw: Add an initial PGT table support Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 08/13] mlxsw: Add an indication of SMPE index validity for PGT table Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 09/13] mlxsw: Add a dedicated structure for bitmap of ports Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 10/13] mlxsw: Extend PGT APIs to support maintaining list of ports per entry Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 11/13] mlxsw: spectrum: Initialize PGT table Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 12/13] mlxsw: spectrum_fid: Set 'mid_base' as part of flood tables initialization Ido Schimmel
2022-06-27  7:06 ` [PATCH net-next 13/13] mlxsw: spectrum_fid: Configure flooding entries using PGT APIs Ido Schimmel
2022-06-28 13:00 ` [PATCH net-next 00/13] mlxsw: Unified bridge conversion - part 4/6 patchwork-bot+netdevbpf

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=20220627070621.648499-2-idosch@nvidia.com \
    --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 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.