Repository navigation
Conversation
vDorst
left a comment
There was a problem hiding this comment.
I am not sure if this patch helps.
It seems that by default mt7530 EEE is disabled.
Ethtool output on my PC.
#ethtool --show-eee enp3s0
EEE Settings for enp3s0:
EEE status: enabled - inactive
Tx LPI: disabled
Supported EEE link modes: 100baseT/Full
1000baseT/Full
Advertised EEE link modes: 100baseT/Full
1000baseT/Full
Link partner advertised EEE link modes: Not reported
I have a WIP patch vDorst/linux-1@9cfb2d4 that you can enable EEE if you want with ethtool.
On the OpenWRT device.
ethtool --set-eee lan0 eee on
Ethtool output on my PC.
EEE Settings for enp3s0:
EEE status: enabled - active
Tx LPI: disabled
Supported EEE link modes: 100baseT/Full
1000baseT/Full
Advertised EEE link modes: 100baseT/Full
1000baseT/Full
Link partner advertised EEE link modes: 100baseT/Full
1000baseT/Full
|
@vDorst for test in my case it works on connecting to 100Mbit port device( about the link down/up issue) |
I am not happy about that we just disable EEE for all the devices. So users with dodgy devices can turn it EEE off per port. |
|
Updated roaming patch |
|
I'd like to wait for upstream response for mt7530 cpu port mac learning patch. Marked this PR as blocked for that. |
1c7a2ac to
915c18d
Compare
|
I have built the freifunk firmware based on this branch (915c18dbec2bdd9de0a4ccdf93a4a59cb406131d) . At startup there is a kernel warning. But the system seems to be running fine. One question though. With these changes, should I be setting up the VLANs differently than how I solved it as described here https://forum.openwrt.org/t/er-x-sfp-vlans-not-working-properly-with-kernel-5-4/60002/29?u=pmelange |
|
@pmelange |
|
I have 3 bridges. One bridge with all the vlans and filtering enabled. From the bridge with all the vlans (spanning eth0, eth1, and eth2) I create multiple links, one for each vlan-id (vlan5, vlan10, vlan11, vlan12, vlan...). The other two brides are connecting a particular vlan and a raw eth port, for example vlan10 and eth3. eth3 is in the case like an access port. How would you do it? |
|
@pmelange |
|
@pmelange Is your setup like this?
|
|
Yes, your table is quite accurate. And eth0, eth1, and eth2 are all connected to switches. |
|
@pmelange #!/bin/sh
[ $INTERFACE = lan -a $ACTION = ifup ] || exit 0
# enable VLAN filtering
ip link set dev br-lan type bridge vlan_filtering 1
# clear out vlan 1
bridge v del dev eth0 vid 1
bridge v del dev eth1 vid 1
bridge v del dev eth2 vid 1
bridge v del dev eth3 vid 1
bridge v del dev eth4 vid 1
bridge v del dev eth5 vid 1
bridge v del dev br-lan self vid 1
# set vlans eth0
bridge v add dev eth0 vid 5
bridge v add dev eth0 vid 10
bridge v add dev eth0 vid 50
bridge v add dev eth0 vid 201
bridge v add dev eth0 vid 202
bridge v add dev eth0 vid 203
bridge v add dev eth0 vid 204
bridge v add dev eth0 vid 205
bridge v add dev eth0 vid 206
# set vlans eth1
bridge v add dev eth1 vid 5
bridge v add dev eth1 vid 10
bridge v add dev eth1 vid 11
bridge v add dev eth1 vid 12
bridge v add dev eth1 vid 211
bridge v add dev eth1 vid 300
bridge v add dev eth1 vid 400
bridge v add dev eth1 vid 500
bridge v add dev eth1 vid 501
bridge v add dev eth1 vid 1000
# set vlans eth2
bridge v add dev eth2 vid 5
bridge v add dev eth2 vid 10
bridge v add dev eth2 vid 11
bridge v add dev eth2 vid 12
bridge v add dev eth2 vid 50
bridge v add dev eth2 vid 211
bridge v add dev eth2 vid 300
bridge v add dev eth2 vid 400
bridge v add dev eth2 vid 500
bridge v add dev eth2 vid 501
bridge v add dev eth2 vid 1000
# set vlans eth3
bridge v add dev eth3 vid 10 pvid untagged
# set vlans eth4
bridge v add dev eth4 vid 5 pvid untagged
# set vlans eth5
bridge v add dev eth5 vid 5 pvid untagged
# set vlans cpu port
bridge v add dev br-lan self vid 5 pvid untagged
bridge v add dev br-lan self vid 10
bridge v add dev br-lan self vid 201
bridge v add dev br-lan self vid 202
bridge v add dev br-lan self vid 203
bridge v add dev br-lan self vid 204
bridge v add dev br-lan self vid 205
bridge v add dev br-lan self vid 206
bridge v add dev br-lan self vid 211
|
|
@dengqf6 I have taken your example, modified it a little bit, and it works. The changes I made was to have an unmanaged bridge interface to put all the vlans in. I named it "switch" which makes far sense to me than "lan". Also, just so that people reading this can understand, I don't have vlans 11, 12, 50, 300, 400, 500, 501, and 1000 on the cpu port, and the switching works fine. As long as the router itself is not doing anything more than switching on a particular vlan, than the cpu port can be left off. There was no kernel warning this time. I see you force-pushed some changes. Can you describe what is different now? Also, how about @vDorst's comment about disabling EEE? |
|
Small update. Now that the system has been online for a bit, I have gotten an error in /proc/interrupts. Unfortunately there is nothing in dmesg about it. |
|
After leaving the system run for a bit longer, I am getting the following group of messages in dmesg. The above group of messages I have received 120 times, with an uptime of 20360 seconds. It is always eth1 (which makes me wonder if the HP switch attached to this port or possibly the cable are to blame). But otherwise, everything seems to be running quite stable still. |
Currently, setting a bridge's self PVID to other value and deleting the default VID 1 renders untagged ports of that VLAN unable to talk to the CPU port: bridge vlan add dev br0 vid 2 pvid untagged self bridge vlan del dev br0 vid 1 self bridge vlan add dev sw0p0 vid 2 pvid untagged bridge vlan del dev sw0p0 vid 1 # br0 cannot send untagged frames out of sw0p0 anymore That is because the CPU port is set to security mode and its PVID is still 1, and untagged frames are dropped due to VLAN member violation. Set the CPU port to fallback mode so untagged frames can pass through. Signed-off-by: DENG Qingfang <[email protected]>
Currently enabling VLAN filtering blocks all traffic in the bridge immediately. That is because DSA ignores all VLAN setup when VLAN filtering is disabled, and when it is enabled, there is no VLAN entry in the VLAN table, causing all traffic to be blocked. Add patches to allow VLAN setup even if VLAN filtering is disabled. Signed-off-by: DENG Qingfang <[email protected]>
When a client moves from a DSA user port to a software port in a bridge, it cannot reach any other clients that connected to the DSA user ports. That is because SA learning on the CPU port is disabled, so the switch ignores the client's frames from the CPU port and still thinks it is at the user port. Fix it by enabling SA learning on the CPU port. To prevent the switch from learning from flooding frames from the CPU port, set skb->offload_fwd_mark to 1 for unicast and broadcast frames, and let the switch flood them instead of trapping to the CPU port. Multicast frames still need to be trapped to the CPU port for snooping, so set the SA_DIS bit of the MTK tag to 1 when transmitting those frames to disable SA learning. Signed-off-by: DENG Qingfang <[email protected]>
f5a997d to
f32e14b
Compare
Add support for adjusting EEE with ethtool Signed-off-by: DENG Qingfang <[email protected]>
|
I'm struggling to transition my setup from The layout when configured with
The setup itself is not complicated. What I've relied on before is assigning each vlan interface a different MAC address. This way I've tried doing the same with DSA without any VLAN tagging, for example making What was happening is I tried to disable "bring up on boot" option in Finally, I've tried something similar to what @dengqf6 suggested earlier - and it didnt work either.
The fact that I'm pretty much a noob in ip-utils doesn't help because I don't have a good picture of how to do this without UCI. Appreciate any and all feedback. My main question is - in DSA every eth port should be a separate broadcast domain, shouldn't it? I couldn't comprehend why |
|
hello @SirToffski , The first thing that comes to mind is that there can only be one default route with a metric of 0 in the main table. When a second interface declares a default route in the main table with metric 0, it will overwrite the first one. But it also looks like there is no reason to have a default gateway for the mgmt interface. It should only be static routes. You also have the option of creating a separate routing table and using ip rules to tell which table to use to do routing lookups. In this case, there wouldn't be any conflicts because of the metric. Instead you will have to use Since nothing it tagged on any of the ports, you don't need the hotplug script or to use the "bridge" utility. One last thing that comes to mind is that setting the macaddr in the interface section has long been deprecated. Instead you should have a I hope I'm not confusing you too much. And next time, it would be helpful to have the working config which used swconfig to base any assumptions off of. Good luck, |
|
I've tried doing the same with DSA without any VLAN tagging, for example making
eth0 a DHCP client and adding to WAN FW zone. Making eth1 a static IP
192.168.2.2/24 interface and assigning a different firewall zone to it.
Something like this:
What are you interfaces? Is eth0 the DSA master? eth1, eth2, .. eth4
slaves?
The master interface needs to be up, but otherwise unused.
The slave interfaces are individual interfaces, unless you add them to
a bridge. Just think of them as normal Linux interfaces. Add them to a
bridge, a bond/team, dhclient, etc.
Andrew
|
|
@pmelange I will totally provide the working @lunn The master interface from what I could tell from Appreciate the answers, will supply more info shortly. |
|
On Tue, Jun 02, 2020 at 02:21:26PM -0700, SirToffski wrote:
@pmelange I will totally provide the working swconfig config - I wrote the
original post during lunch break at work and didnt have access to the backups.
😳
@lunn The master interface from what I could tell from ip a and ip link is
called dsa, then the rest are named ***@***.***; ***@***.***, etc.
O.K, that is unusual. If this board ever gets into the mainline
kernel, the names are likely to change. Having said that, it is
actually a reasonable naming convention.
Now that you mention it - I do remember noticing ***@***.*** and dsa
had the same mac addresses, whether relevant or now.
That is normal. DSA takes the MAC address from the master interface
and uses it on all slave interfaces. But you can change the slave MAC
addresses in the usual way.
Andrew
|
|
@dengqf6 Just an update. The build I made 17 days ago is still running (uptime 16d 23h) , no kernel errors, no errors in /proc/interrupts. Device rb750gr3. |
|
@pmelange edit: creating separate routing tables sounds like a very clean solution, I will try it definitely. And thanks for letting me know macaddr is deprecated, makes sense why it didn't work as I intended it to,
|
|
@lunn This is how the interfaces look. Presuming
Right now with DSA upstream LAN management for 192.168.2.0/24 network and WAN traffic are both passing via |
|
I believe that with your old setup, the default gateway set up for interface "ros" is being overwritten by the default gateway provided by dhcp when wan goes us. But since you have set up some ip-rules, it doesn't hinder sending traffic to the correct place. Do you have the ability to flash an older firmware to confirm this? Additionally, I don't see any static routes in your old /etc/config/network. That would be a clean way designate which networks are reachable via "ros". But doing it all with rules is totally fine. But back to the main topic. Setting up bridges with the ethX devices should be fine in your situation. There is no need to use the hotplug script or to set any kind of vid on any of the ports since everything is untagged. |
|
Merged (with renumbered patches to avoid conflicts), thanks. |
|
One of my friend still has the link up / link down issue on a MIR 3G, and I want to try your patch to disable flow control completely. With your patch this is possible via ethtool I assume? |
|
I've finally managed to duplicate my old setup with DSA. It's a bit messy but gets the job done. This is what it looks like:
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
ip link set dev br-wan type bridge vlan_filtering 1
bridge v del dev eth3 vid 1
bridge v del dev eth4 vid 1
bridge v del dev br-wan self vid 1
bridge v add dev eth3 vid 20 pvid untagged
bridge v add dev eth4 vid 50 pvid untagged
bridge v add dev br-wan self vid 50
bridge v add dev br-wan self vid 20
ip link set dev br-wan.50 address ff:ff:ff:ff:ff:67
exit 0
|
|
Seems like a good start. I would highly recommend doing the hotplug script variation. Then, if /etc/init.d/network restart is called, then everything gets set up again. Having it in rc.local means that it will only ever get run once. |
|
Sorry for posting into a closed PR... Adding the ip link and bridge commands to /etc/rc.local shouldn't work, because the bridge isn't created yet at rc.local execution time - in my case at least (tested on two different MT7621 units). Might be a race condition and therefore work on other devices? I'd also recommend using a hotplug script instead. Which brings us to one more issue I noticed - a pretty major one at that: I have a similar setup as pmelange, just with more than only one untagged VLAN. Creating the bridge in /etc/config/network like in the above examples causes the bridge to come up with all ports set to VLAN 1 untagged. This causes leakage between all untagged VLANs during boot time. After the hotplug script runs and VLAN 1 is removed from all ports, everything is fine again - but the damage is already done, e.g. clients being unreachable because they received DHCP IP addresses from the wrong VLAN. I do understand that using the ip link and bridge commands in a hotplug script is only a dirty workaround until DSA switches are fully supported for configuration by UCI. Does anybody have an idea how to prevent the leakage between VLANs in the meantime? Thanks! |
|
@SirToffski |
In theory it should be as simple as that, but in practice it doesn't work :( It's not that the traffic separation is my main issue. Here's the problem - without using VLANs and simply using This could be bug on the ISP's gateway for all I know.. doesn't matter much what exactly is causing the problem as long as I've got a solution to it.. If you're interested I can provide some more info later today; could revert to using plain eth3/eth4 and get some info like |
|
@SirToffski |
|
@SirToffski |
|
@dengqf6 I'm not actually using The reason I do not want to use ^ I could only allow specific destination ports to very specific destination addresses, however like as I've said I would like to keep WAN "martian-free" |

While testing DSA driver in #2798, some users (including myself) found some issues related to DSA, so this pull request is to address those issues.
Fixed: