public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: netdev@vger.kernel.org, bridge@lists.linux-foundation.org
Cc: davem@davemloft.net, kuba@kernel.org, jiri@nvidia.com,
	ivecera@redhat.com, roopa@nvidia.com, nikolay@nvidia.com,
	amcohen@nvidia.com, danieller@nvidia.com, petrm@nvidia.com,
	mlxsw@nvidia.com, Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 2/9] mlxsw: reg: Add et_vlan field to SPVID register
Date: Sun, 29 Nov 2020 14:54:00 +0200	[thread overview]
Message-ID: <20201129125407.1391557-3-idosch@idosch.org> (raw)
In-Reply-To: <20201129125407.1391557-1-idosch@idosch.org>

From: Amit Cohen <amcohen@nvidia.com>

et_vlan field is used to configure which EtherType is used when VLAN is
pushed at ingress (for untagged packets or for QinQ push mode).

It will be used to configure tagging with ether_type1 (i.e., 0x88A8) for
QinQ mode.

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/reg.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index 5248532c3999..bea919b92f76 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -834,6 +834,17 @@ MLXSW_ITEM32(reg, spvid, local_port, 0x00, 16, 8);
  */
 MLXSW_ITEM32(reg, spvid, sub_port, 0x00, 8, 8);
 
+/* reg_spvid_et_vlan
+ * EtherType used for when VLAN is pushed at ingress (for untagged
+ * packets or for QinQ push mode).
+ * 0: ether_type0 - (default)
+ * 1: ether_type1
+ * 2: ether_type2 - Reserved when Spectrum-1, supported by Spectrum-2
+ * Ethertype IDs are configured by SVER.
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, spvid, et_vlan, 0x04, 16, 2);
+
 /* reg_spvid_pvid
  * Port default VID
  * Access: RW
-- 
2.28.0


  parent reply	other threads:[~2020-11-29 12:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 12:53 [PATCH net-next 0/9] mlxsw: Add support for 802.1ad bridging Ido Schimmel
2020-11-29 12:53 ` [PATCH net-next 1/9] mlxsw: reg: Add Switch Port VLAN Classification Register Ido Schimmel
2020-11-29 12:54 ` Ido Schimmel [this message]
2020-11-29 12:54 ` [PATCH net-next 3/9] mlxsw: spectrum: Only treat 802.1q packets as tagged packets Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 4/9] mlxsw: Make EtherType configurable when pushing VLAN at ingress Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 5/9] mlxsw: spectrum_switchdev: Create common functions for VLAN-aware bridge Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 6/9] mlxsw: spectrum_switchdev: Add support of QinQ traffic Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 7/9] bridge: switchdev: Notify about VLAN protocol changes Ido Schimmel
2020-11-30 15:43   ` Ivan Vecera
2020-11-29 12:54 ` [PATCH net-next 8/9] mlxsw: Add QinQ configuration vetoes Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 9/9] selftests: forwarding: Add QinQ veto testing Ido Schimmel
2020-12-01 23:40 ` [PATCH net-next 0/9] mlxsw: Add support for 802.1ad bridging 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=20201129125407.1391557-3-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=amcohen@nvidia.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=idosch@nvidia.com \
    --cc=ivecera@redhat.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=petrm@nvidia.com \
    --cc=roopa@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