Vladimir Oltean and David S. Miller
38b5beeae7
net: dsa: sja1105: prepare tagger for handling DSA tags and VLAN simultaneously
...
In VLAN-unaware mode, sja1105 uses VLAN tags with a custom TPID of
0xdadb. While in the yet-to-be introduced best_effort_vlan_filtering
mode, it needs to work with normal VLAN TPID values.
A complication arises when we must transmit a VLAN-tagged packet to the
switch when it's in VLAN-aware mode. We need to construct a packet with
2 VLAN tags, and the switch will use the outer header for routing and
pop it on egress. But sadly, here the 2 hardware generations don't
behave the same:
- E/T switches won't pop an ETH_P_8021AD tag on egress, it seems
(packets will remain double-tagged).
- P/Q/R/S switches will drop a packet with 2 ETH_P_8021Q tags (it looks
like it tries to prevent VLAN hopping).
But looks like the reverse is also true:
- E/T switches have no problem popping the outer tag from packets with
2 ETH_P_8021Q tags.
- P/Q/R/S will have no problem popping a single tag even if that is
ETH_P_8021AD.
So it is clear that if we want the hardware to work with dsa_8021q
tagging in VLAN-aware mode, we need to send different TPIDs depending on
revision. Keep that information in priv->info->qinq_tpid.
The per-port tagger structure will hold an xmit_tpid value that depends
not only upon the qinq_tpid, but also upon the VLAN awareness state
itself (in case we must transmit using 0xdadb).
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com >
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2020-05-12 13:08:08 -07:00
..
2020-04-01 08:03:28 +02:00
2020-04-18 15:44:54 -05:00
2020-03-30 12:42:42 +02:00
2020-05-12 13:08:08 -07:00
2020-04-03 15:05:35 -07:00
2020-04-30 20:25:37 -07:00
2020-03-31 21:29:04 +02:00
2020-04-20 14:07:00 +02:00
2020-04-16 10:28:12 +01:00
2020-04-08 21:29:10 -07:00
2020-05-09 20:49:13 -07:00
2020-05-09 01:05:30 -07:00
2020-03-30 10:14:19 +02:00
2020-03-31 22:08:54 +02:00
2020-05-06 16:40:14 -07:00
2020-04-10 15:36:22 -07:00
2020-03-30 11:45:18 -07:00
2020-04-28 21:23:38 +02:00
2020-04-03 15:05:35 -07:00
2020-04-07 19:44:52 -07:00
2020-05-02 11:24:01 -07:00
2020-04-02 15:50:04 -07:00
2020-04-08 21:03:40 -07:00
2020-03-31 10:05:01 -07:00
2020-04-17 21:38:11 -06:00
2020-04-18 15:44:54 -05:00
2020-04-07 10:43:42 -07:00
2020-04-07 10:43:43 -07:00
2020-04-18 15:44:54 -05:00
2020-04-01 14:56:44 -06:00
2020-04-18 15:44:54 -05:00
2020-03-30 11:43:51 -07:00
2020-03-30 01:34:00 +02:00
2020-04-28 17:27:08 -07:00
2020-03-30 14:59:53 -07:00
2020-04-28 17:27:08 -07:00
2020-05-01 10:36:32 -07:00
2020-04-30 20:55:49 -07:00
2020-04-15 23:58:48 -04:00
2020-04-03 11:30:20 -07:00
2020-04-10 15:36:21 -07:00
2020-04-27 02:07:40 -04:00
2020-03-31 11:04:05 -07:00
2020-04-07 10:43:42 -07:00
2020-04-07 10:43:42 -07:00
2020-04-27 02:06:53 -04:00
2020-04-18 15:44:55 -05:00
2020-04-03 11:32:13 -04:00
2020-04-02 19:15:03 -07:00
2020-04-17 17:08:50 +02:00
2020-05-06 17:03:34 -07:00
2020-04-07 10:45:15 +02:00
2020-04-02 19:15:03 -07:00
2020-04-08 11:00:00 -07:00
2020-04-18 15:44:54 -05:00
2020-04-18 15:44:54 -05:00
2020-04-30 19:47:39 +05:30
2020-04-27 21:26:23 +05:30
2020-03-31 11:04:05 -07:00
2020-04-18 15:44:54 -05:00
2020-04-18 15:44:54 -05:00
2020-05-04 11:19:58 -07:00
2020-05-10 12:28:41 -07:00
2020-04-18 15:44:54 -05:00
2020-04-27 02:06:53 -04:00
2020-04-26 08:53:13 -07:00
2020-05-06 22:10:13 -07:00
2020-04-27 02:07:40 -04:00
2020-04-18 15:44:54 -05:00
2020-03-30 11:20:13 -07:00
2020-04-07 10:43:38 -07:00
2020-04-07 10:43:39 -07:00
2020-04-02 09:35:32 -07:00
2020-04-27 02:07:40 -04:00
2020-04-15 11:48:21 +02:00
2020-03-29 21:25:29 -07:00
2020-04-27 11:40:25 -07:00
2020-05-11 13:19:00 -07:00
2020-04-18 15:44:55 -05:00
2020-04-18 15:44:55 -05:00
2020-04-30 12:54:01 -07:00
2020-05-06 11:29:25 +03:00
2020-03-29 22:30:57 -07:00
2020-04-19 11:23:33 -07:00
2020-04-01 13:20:14 +02:00
2020-04-02 09:35:30 -07:00
2020-04-27 02:07:40 -04:00
2020-04-02 09:35:25 -07:00
2020-03-30 18:51:47 -07:00
2020-04-14 10:39:56 -04:00
2020-04-27 02:07:40 -04:00
2020-04-06 22:55:27 +02:00
2020-03-31 17:29:33 -07:00
2020-04-18 15:44:55 -05:00
2020-03-30 01:34:00 +02:00
2020-03-31 17:29:33 -07:00
2020-04-10 15:36:21 -07:00
2020-04-18 15:44:55 -05:00
2020-04-10 15:36:21 -07:00
2020-04-07 10:43:40 -07:00
2020-04-02 09:35:31 -07:00
2020-04-08 21:03:40 -07:00
2020-04-07 10:43:38 -07:00
2020-04-07 10:43:41 -07:00
2020-04-27 02:07:40 -04:00
2020-04-27 02:07:40 -04:00
2020-04-03 13:22:40 -07:00
2020-04-30 12:56:36 -07:00
2020-05-09 01:05:30 -07:00
2020-05-07 18:11:07 -07:00
2020-04-06 13:56:33 -04:00
2020-04-01 13:37:57 -04:00
2020-04-28 15:58:38 -04:00
2020-04-27 02:07:40 -04:00
2020-04-04 09:09:39 +02:00
2020-04-22 19:41:26 -07:00
2020-04-02 09:35:27 -07:00
2020-04-07 10:43:39 -07:00
2020-04-07 10:43:38 -07:00
2020-04-07 10:43:38 -07:00
2020-04-03 14:25:02 -07:00
2020-04-02 17:57:10 +01:00
2020-04-02 17:57:10 +01:00
2020-04-03 14:25:02 -07:00
2020-04-07 10:43:43 -07:00
2020-04-27 02:07:40 -04:00
2020-05-10 12:28:41 -07:00
2020-04-24 16:45:37 -07:00
2020-04-27 02:06:53 -04:00
2020-04-01 08:06:54 +02:00
2020-04-22 11:36:11 +02:00
2020-04-18 15:44:55 -05:00
2020-04-27 02:07:40 -04:00
2020-04-07 10:43:42 -07:00
2020-04-02 11:22:17 -07:00
2020-05-02 16:31:44 -07:00
2020-03-30 16:55:26 +02:00
2020-04-08 12:05:07 +02:00
2020-04-18 15:44:56 -05:00
2020-04-18 15:44:56 -05:00
2020-04-02 18:47:30 +02:00
2020-04-02 11:22:17 -07:00
2020-04-27 02:07:40 -04:00
2020-04-07 10:43:42 -07:00
2020-04-07 10:43:38 -07:00
2020-04-18 15:44:56 -05:00
2020-04-10 15:36:20 -07:00
2020-05-11 16:59:16 -07:00
2020-04-07 10:43:43 -07:00
2020-04-21 15:54:45 -07:00
2020-04-18 15:44:56 -05:00
2020-04-07 10:43:41 -07:00
2020-04-27 02:07:40 -04:00
2020-04-05 11:34:35 -07:00
2020-05-06 22:10:13 -07:00
2020-04-18 15:44:56 -05:00
2020-03-30 18:51:47 -07:00
2020-04-27 02:07:40 -04:00
2020-03-30 14:59:53 -07:00
2020-04-02 09:35:26 -07:00
2020-04-18 15:44:56 -05:00
2020-04-22 22:06:35 -04:00
2020-05-04 09:16:37 -07:00
2020-04-07 10:43:39 -07:00
2020-04-17 06:05:30 -04:00
2020-04-25 20:18:53 -07:00
2020-04-01 12:06:26 -04:00
2020-05-06 17:23:06 -07:00
2020-04-27 10:18:01 -07:00
2020-04-17 06:05:30 -04:00
2020-04-07 10:43:38 -07:00
2020-04-21 11:11:56 -07:00
2020-04-27 02:07:40 -04:00
2020-04-16 18:31:08 -04:00
2020-04-03 12:27:36 -07:00
2020-04-27 02:07:40 -04:00
2020-04-18 15:44:56 -05:00