Message ID | 20190429001706.7449-6-olteanv@gmail.com |
---|---|
State | Superseded |
Delegated to: | David Miller |
Headers | show |
Series | NXP SJA1105 DSA driver | expand |
On Mon, Apr 29, 2019 at 03:16:59AM +0300, Vladimir Oltean wrote: > 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> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
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 ] */
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(+)