Files
rockchip-kernel/include/linux
Vladimir Oltean 8ded916092 net: dsa: tag_sja1105: stop asking the sja1105 driver in sja1105_xmit_tpid
Introduced in commit 38b5beeae7 ("net: dsa: sja1105: prepare tagger
for handling DSA tags and VLAN simultaneously"), the sja1105_xmit_tpid
function solved quite a different problem than our needs are now.

Then, we used best-effort VLAN filtering and we were using the xmit_tpid
to tunnel packets coming from an 8021q upper through the TX VLAN allocated
by tag_8021q to that egress port. The need for a different VLAN protocol
depending on switch revision came from the fact that this in itself was
more of a hack to trick the hardware into accepting tunneled VLANs in
the first place.

Right now, we deny 8021q uppers (see sja1105_prechangeupper). Even if we
supported them again, we would not do that using the same method of
{tunneling the VLAN on egress, retagging the VLAN on ingress} that we
had in the best-effort VLAN filtering mode. It seems rather simpler that
we just allocate a VLAN in the VLAN table that is simply not used by the
bridge at all, or by any other port.

Anyway, I have 2 gripes with the current sja1105_xmit_tpid:

1. When sending packets on behalf of a VLAN-aware bridge (with the new
   TX forwarding offload framework) plus untagged (with the tag_8021q
   VLAN added by the tagger) packets, we can see that on SJA1105P/Q/R/S
   and later (which have a qinq_tpid of ETH_P_8021AD), some packets sent
   through the DSA master have a VLAN protocol of 0x8100 and others of
   0x88a8. This is strange and there is no reason for it now. If we have
   a bridge and are therefore forced to send using that bridge's TPID,
   we can as well blend with that bridge's VLAN protocol for all packets.

2. The sja1105_xmit_tpid introduces a dependency on the sja1105 driver,
   because it looks inside dp->priv. It is desirable to keep as much
   separation between taggers and switch drivers as possible. Now it
   doesn't do that anymore.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25 11:14:34 +01:00
..
2021-07-06 20:14:42 -04:00
2021-06-03 18:40:15 +02:00
2021-06-03 14:04:18 -07:00
2021-05-06 19:24:11 -07:00
2021-04-14 16:30:30 +03:00
2021-05-24 21:13:05 -07:00
2021-04-08 16:04:20 -07:00
2021-06-30 19:45:42 +02:00
2021-04-12 15:04:23 +02:00
2021-06-25 19:57:01 -04:00
2021-07-27 20:11:45 +01:00
2021-07-27 20:11:44 +01:00
2021-08-05 11:46:42 +01:00
2021-04-30 11:20:40 -07:00
2021-06-29 10:53:48 -07:00
2021-07-15 10:13:49 -07:00
2021-06-01 10:29:21 +01:00
2021-05-12 20:11:17 +02:00
2021-06-17 13:09:27 -04:00
2021-06-15 17:46:57 +02:00
2021-07-01 11:06:02 -07:00
2021-06-29 10:53:53 -07:00
2021-07-01 11:06:05 -07:00
2021-08-08 13:00:20 +01:00
2021-07-06 10:37:46 -05:00
2021-06-16 17:20:40 -05:00
2021-07-06 10:37:46 -05:00
2021-07-06 10:37:46 -05:00
2021-07-06 10:37:46 -05:00
2021-08-24 11:36:13 -07:00
2021-07-20 06:55:20 -07:00
2021-06-07 14:11:47 -07:00
2021-06-30 19:12:19 +02:00
2021-07-29 15:06:49 +01:00
2021-05-10 16:03:35 -07:00
2021-06-24 15:49:32 +02:00
2021-07-01 11:06:03 -07:00
2021-07-01 11:06:03 -07:00
2021-05-21 22:13:13 +02:00
2021-05-13 18:29:11 +02:00
2021-05-13 16:57:17 +02:00
2021-03-30 17:06:49 -07:00
2021-08-10 11:50:55 -04:00
2021-08-11 06:44:24 -04:00
2021-03-30 13:42:33 -04:00