LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: f.fainelli@gmail.com, vivien.didelot@gmail.com, andrew@lunn.ch,
	davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vladimir Oltean <olteanv@gmail.com>
Subject: [PATCH v4 net-next 05/12] ether: Add dedicated Ethertype for pseudo-802.1Q DSA tagging
Date: Mon, 29 Apr 2019 03:16:59 +0300	[thread overview]
Message-ID: <20190429001706.7449-6-olteanv@gmail.com> (raw)
In-Reply-To: <20190429001706.7449-1-olteanv@gmail.com>

There are two possible utilizations so far:

- Switch devices that don't support a native insertion/extraction header
  on the CPU port may still enjoy the benefits of port isolation with a
  custom VLAN tag.

  For this, they need to have a customizable TPID in hardware and a new
  Ethertype to distinguish between real 802.1Q traffic and the private
  tags used for port separation.

- Switches that don't support the deactivation of VLAN awareness, but
  still want to have a mode in which they accept all traffic, including
  frames that are tagged with a VLAN not configured on their ports, may
  use this as a fake to trick the hardware into thinking that the TPID
  for VLAN is something other than 0x8100.

What follows after the ETH_P_DSA_8021Q EtherType is a regular VLAN
header (TCI), however there is no other EtherType that can be used for
this purpose and doesn't already have a well-defined meaning.
ETH_P_8021AD, ETH_P_QINQ1, ETH_P_QINQ2 and ETH_P_QINQ3 expect that
another follow-up VLAN tag is present, which is not the case here.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Suggested-by: Andrew Lunn <andrew@lunn.ch>
---
Changes in v4:
Patch was reintroduced at Andrew's request.

Changes in v3:
Patch was removed.

Changes in v2:
Patch is new.

 include/uapi/linux/if_ether.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index 3a45b4ad71a3..3158ba672b72 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -109,6 +109,7 @@
 #define ETH_P_QINQ2	0x9200		/* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_QINQ3	0x9300		/* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_EDSA	0xDADA		/* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
+#define ETH_P_DSA_8021Q	0xDADB		/* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_IFE	0xED3E		/* ForCES inter-FE LFB type */
 #define ETH_P_AF_IUCV   0xFBFB		/* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
 
-- 
2.17.1


  parent reply	other threads:[~2019-04-29  0:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  0:16 [PATCH v4 net-next 00/12] NXP SJA1105 DSA driver Vladimir Oltean
2019-04-29  0:16 ` [PATCH v4 net-next 01/12] lib: Add support for generic packing operations Vladimir Oltean
2019-04-29  0:16 ` [PATCH v4 net-next 02/12] net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch Vladimir Oltean
2019-04-29  0:16 ` [PATCH v4 net-next 03/12] net: dsa: sja1105: Add support for FDB and MDB management Vladimir Oltean
2019-04-29  0:16 ` [PATCH v4 net-next 04/12] net: dsa: sja1105: Error out if RGMII delays are requested in DT Vladimir Oltean
2019-04-29  0:16 ` Vladimir Oltean [this message]
2019-04-29 22:18   ` [PATCH v4 net-next 05/12] ether: Add dedicated Ethertype for pseudo-802.1Q DSA tagging Andrew Lunn
2019-04-29  0:17 ` [PATCH v4 net-next 06/12] net: dsa: sja1105: Add support for VLAN operations Vladimir Oltean
2019-04-29  0:17 ` [PATCH v4 net-next 07/12] net: dsa: sja1105: Add support for ethtool port counters Vladimir Oltean
2019-04-29  0:17 ` [PATCH v4 net-next 08/12] net: dsa: sja1105: Add support for configuring address aging time Vladimir Oltean
2019-04-29 22:21   ` Andrew Lunn
2019-04-29  0:17 ` [PATCH v4 net-next 09/12] net: dsa: sja1105: Prevent PHY jabbering during switch reset Vladimir Oltean
2019-04-29  0:17 ` [PATCH v4 net-next 10/12] net: dsa: sja1105: Reject unsupported link modes for AN Vladimir Oltean
2019-04-29  0:17 ` [PATCH v4 net-next 11/12] Documentation: net: dsa: Add details about NXP SJA1105 driver Vladimir Oltean
2019-04-29  0:17 ` [PATCH v4 net-next 12/12] dt-bindings: net: dsa: Add documentation for " Vladimir Oltean
2019-05-01  3:44 ` [PATCH v4 net-next 00/12] NXP SJA1105 DSA driver David Miller
2019-05-02 16:31   ` Vladimir Oltean
2019-05-02 16:55     ` Andrew Lunn
2019-05-02 17:05       ` Vladimir Oltean
2019-05-02 19:44     ` David Miller
2019-05-02 16:25 ` Vladimir Oltean

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=20190429001706.7449-6-olteanv@gmail.com \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --subject='Re: [PATCH v4 net-next 05/12] ether: Add dedicated Ethertype for pseudo-802.1Q DSA tagging' \
    /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

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).