]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: mt7530: fix mirroring frames received on local port
authorArınç ÜNAL <arinc.unal@arinc9.com>
Sat, 13 Apr 2024 13:01:39 +0000 (16:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Apr 2024 15:07:08 +0000 (17:07 +0200)
commite86c9db58eba290e858e2bb80efcde9e3973a5ef
tree3de37f4af453e37e6c44421c851210c5834396b4
parent62e27ef18eb4f0d33bbae8e9ef56b99696a74713
net: dsa: mt7530: fix mirroring frames received on local port

[ Upstream commit d59cf049c8378677053703e724808836f180888e ]

This switch intellectual property provides a bit on the ARL global control
register which controls allowing mirroring frames which are received on the
local port (monitor port). This bit is unset after reset.

This ability must be enabled to fully support the port mirroring feature on
this switch intellectual property.

Therefore, this patch fixes the traffic not being reflected on a port,
which would be configured like below:

  tc qdisc add dev swp0 clsact

  tc filter add dev swp0 ingress matchall skip_sw \
  action mirred egress mirror dev swp0

As a side note, this configuration provides the hairpinning feature for a
single port.

Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring")
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mt7530.c
drivers/net/dsa/mt7530.h