[BPI-R2] promiscuous mode for MT7623 switch and Open vSwitch

Hello,

it seems that the MT7623 switch driver (or the dsa-driver) does not support promiscuous mode. No unicast packet with a non-local MAC address is forwarded to the userspace. Therefor, using the lan0-lan3 ports in a openvswitch bridge is not possible.

Is there a way to enable the promiscuous mode in the dsa driver, or is there another way to get openvswitch working?

Thanks, Marco

as wrote on github, i guess promiscious mode is broken on mt753x (says it set it, but not really active).

@Ryder.Lee / @moore can you help here ?

i see a patch today for port-morroring on mt7530. maybe he can help you with this

https://patchwork.kernel.org/patch/11423789/

maybe ask landen chao, who wrote the dsa-driver for mt7531 (used on r64)

got an answer…promiscous mode should work in current codebase (5.7, maybe earlier)

can anybody help to verify it is working? got these commands to create static arp entry for non-existent device routed to r2 (pc is connected directly to r2-lan1 here)

on router:
# assign an IP
ip addr add 10.10.10.1/24 dev lan1
# capture traffic, note that tcpdump will automatically set lan1 to promisc mode
tcpdump -nei lan1

On PC:
# assign an IP
ip addr add 10.10.10.2/24 dev enp3s0f1
# set static ARP entry for 10.10.10.3
ip neigh add 10.10.10.3 dev enp3s0f1 lladdr <some other mac addr>
# ping
ping 10.10.10.3

tcpdump on r2 should capture the ICMP echo request to the mac addr