Port mirroring does not work
The performed test had the following setup:
--a traffic running on port 1 (PTP, LLDP and application)
--sniffer connected to the port 2
Expected result was that all the traffic will be redirected from port 1
to port 2.
Configuration of a switch:
# disable port mirroring in case it was enabled
# read RX_CTR register
devmem 0x10060014 32
# remove flag 0x20 (MR_ENA) from the given result (0x19 & ~0x20 = 0x30)
devmem 0x10060014 32 0x19
# Configure destination port to port 2
devmem 0x10060024 32 0
devmem 0x10060028 32 0x2
# Configure reception traffic mirror source to port 1
devmem 0x10060024 32 2
devmem 0x10060028 32 0x1
# Configure transmission traffic mirror source
devmem 0x10060024 32 3
devmem 0x10060028 32 0x1
# Enable port mirroring in case it was enabled
# read RX_CTR register
devmem 0x10060014 32
# add flag 0x20 (MR_ENA) to the given result (0x19 | 0x20 = 0x30)
devmem 0x10060014 32 0x39
Additional observations:
--on a port 2, LLDP packets were transmitted from CPU (should not
happen)