]> git.itanic.dy.fi Git - linux-stable/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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Apr 2024 07:56:36 +0000 (08:56 +0100)
commitd59cf049c8378677053703e724808836f180888e
tree95592655444d94cb22858efb4cc1dc9f63225f4f
parentf8bbc07ac535593139c875ffa19af924b1084540
net: dsa: mt7530: fix mirroring frames received on local port

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>
drivers/net/dsa/mt7530.c
drivers/net/dsa/mt7530.h