Mt7621 DSA igmp_snooping not working

Hi all,

I have xiaomi-r3gv1 running a master build.

The router is serving as my Internet gateway and is supposed to also serve as my ISP's IPTV router.
In Openwrt-19.03 all works.

The MT7621 is using the newer DSA switch architecture.
My ISP provides Internet and IPTV services via VLAN 12.

My previous config is

igmpproxy

config igmpproxy
    option quickleave 1

config phyint
    option network wan
    option zone wan
    option direction upstream
    list altnet 0.0.0.0/0

config phyint
    option network lan
    option zone lan
    option direction downstream

network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.2.1'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option igmp_snooping '1'

config device 'lan_dev'
	option name 'eth0.12'
	option macaddr '---'

config interface 'wan'
	option proto 'dhcp'
	option ifname 'eth0.12'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqprefix 'auto'
	option reqaddress 'try'
	option ifname 'eth0.12'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option ports '6t 3 2'

config switch_vlan
	option device 'switch0'
	option vlan '12'
	option vid '12'
	option ports '6t 1t'

I try setup in the dsa but i enable igmp_snooping router crash and reboot ...
I'm think need manual setup via ip and bridge setup.

Tanks for your time.

anything

is not applicable to DSA and thus obsolete.


is set for a bridge and therefore is DSA unrelated since it is leveraging a different driver:

ethtool -i br-lan
driver: bridge

New /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option packet_steering '1'

config interface 'lan'
        option ifname 'lan1 lan2'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option ip6assign '64'

config interface 'wan'
        option ifname 'wan.12'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'wan.12'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'

but i'm enable igmp snooping this crash.
if its no possible with dsa?

igmp snooping work in what situations?

What I am trying to say is that pinning it on DSA does not sound viable, there are significant changes in kernel code between OpenWrt 19.x and Master branch, notwithstanding in OpenWrt's own code base (netifd | UCI | rcpd etc).

Your node may encounter a bug of sorts that needs fixing. But there is little to go on from your report, e.g. a crash log to start with, kernel | snapshot version.

Thus this previous swconfig based config was not tagging any packets on the external WAN port (1), only internally on the CPU port (6). Are you sure that you need to tag packets to the modem?

sorry it is my error on copy.
i fix the previous config.
the ISP use VLAN 12 Tagged

Not very in line with the topic, but sort of, I have a similar issue with IGMP snooping crashing my DSA router with the QCA8K driver. Maybe these issues are related so I'll leave here a link to the crash log (the output of the serial connection):

2 Likes

At a first glance it seems indeed to be an issue with switchdev related operations. Any chance to try with a more recent snapshot from Master?


Tried to reproduce the issue, though unsuccessfully, with:

{"kernel":"5.4.48","hostname":"OpenWrt","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"OpenWrt","version":"SNAPSHOT","revision":"r13672-263f7e5bbd","target":"mvebu/cortexa9","description":"OpenWrt SNAPSHOT r13672-263f7e5bbd"}}

config interface 'lan'
	option ifname 'lan0 lan1 lan2'
	option type 'bridge'
	option bridge_empty '1'
	option stp '1'
	option multicast_querier '1'
	option igmp_snooping '1'

If it makes a difference that is without


N.B. Not sure if developers will take notice here, might be better to post on the mailing list.

If you do need vlan 12 tagged on eth0 - there isn't a way currently to do this with UCI as far as I am aware.

You could add the following to /etc/rc.local like this:

#!/bin/sh
[ $INTERFACE = wan -a $ACTION = ifup ] || exit 0

ip link add link eth0 name eth0.12 type vlan id 12

exit 0

Your new /etc/config/network would then look like this:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1 eth2'
	option proto 'static'
	option ipaddr '192.168.2.1'
	option netmask '255.255.255.0'
	option ip6assign '64'
    option igmp_snooping '1'

config interface 'wan'
	option proto 'dhcp'
	option ifname 'eth0.12'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqprefix 'auto'
	option reqaddress 'try'
	option ifname 'eth0.12'

There is.

Just remove your rc.local, and OpenWrt will handle ethx.y automatically.

With DSA? I wasn't aware of this.. I thought UCI hasn't implemented support for vlan tagging on DSA as of yet. Good to know.

eth0, here being the WAN port, is not driven by DSA and therefore unrelated.

Depends on a device.

On EdgeRouter X for example the interfaces are labeled eth0-eth4 by default, not wan, lan1-lan4. Master interface aka CPU is called dsa and ports are labeled like eth0@dsa, eth1@dsa, etc. So in a case of ERX eth0 refers to a physical port.

Here’s an example:


# ip -br link
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> 
dsa              UP             ff:ff:ff:ff:ff:7a <BROADCAST,MULTICAST,UP,LOWER_UP> 
eth0@dsa         UP             ff:ff:ff:ff:ff:7a <BROADCAST,MULTICAST,UP,LOWER_UP> 
eth1@dsa         LOWERLAYERDOWN ff:ff:ff:ff:ff:7b <NO-CARRIER,BROADCAST,MULTICAST,UP> 
eth2@dsa         UP             ff:ff:ff:ff:ff:7c <BROADCAST,MULTICAST,UP,LOWER_UP> 
eth3@dsa         UP             ff:ff:ff:ff:ff:7d <BROADCAST,MULTICAST,UP,LOWER_UP> 
eth4@dsa         DOWN           ff:ff:ff:ff:ff:7e <BROADCAST,MULTICAST> 
br-iso           UP             ff:ff:ff:ff:ff:19 <BROADCAST,MULTICAST,UP,LOWER_UP> 

With DSA - there will be a master interface which wouldn’t be used in your /etc/config/network. The rest of the interfaces are “slave” interfaces - they are all individual interfaces unless added to a bridge. On your device it looks like there is a lan bridge br-lan with interfaces lan1 lan2 and a single unbridged wan interface which nevertheless is still a part of the master DSA interface.

If VLAN tagging doesn’t work as expected on WAN interface - you can consider adding all three interfaces to a single bridge, enable vlan filtering on that bridge, and add the vlans both to the bridge and to single interfaces. Last I’ve heard though IGMP snooping and bridge vlan filtering was causing kernel crashes with mt7621 + DSA. Not sure if this had been already patched tbh.

See this thread - it will have some good info relevant to your device.

My bad, missed that the MT7621 is router on chip design and apparently all its ethernet ports are DSA driven.

Same problem in recent build. If I enable igmp_snooping in br-lan, the router constantly reboots.
It doesn't matter if there is one interface on the bridge (eth1) or several (eth1, eth2, eth3).

1 Like

It seems that igmp_snooping works and not breaking layer 2 switching's hardware offload after upgrading to latest snapshot. Welcome more feedback.

i test several days.
not problem with igmp_snooping now.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.