Edgerouter ER-X: can eth0 be put back on the hardware switch?

Well, in your initial post you were correct..... Remove those and attach eth0 to the switch, for time of testing add high-traffic device there.

1 Like

Got it. Sorry for the miscommunication and the back and forth. And thank you for your help :+1:

1 Like

You really need to test and measure if there is any difference between eth0 and the other ports before endeavoring to modify the dts.

The ER-X is slow and outdated by modern standards, but should be more than adequate for simple switching at line speed.

I highly doubt any modification will result in a perceptible difference.

I think the author of the topic wants all ports to be on the switch. Currently, eth0 for the er-x is connected to the CPU, which means that for example, a dumb AP with a simple switch, packets pass through the CPU. Then, instead of the CPU being at 99% idle (as is the case for the other ports), it's at about 77% idle, meaning the CPU is at 23%. This isn't just a problem with the er-x, but with the entire MT7621 family since the patch was introduced. There was a request to try creating an option in LuCI to choose whether the router should work with the patch and the switch without it. Then the CPU would be at 99% idle for all ports. This topic has been dormant for a while now. It's a shame.
Patch:

2 Likes

I understand the issue; I just don't think it is relevant outside of some highly artificial benchmarks.

1 Like

You are right, in practice I can just put a device on eth0 that sees very little traffic, e.g. a printer.

But I was also interested in learning how it all works and whether there are any easy config changes that can be made, without building a custom image. TIL bridger could be a useful package.

Confirming bridger works to reduce CPU usage.

Test system: ER-X configured as switch with eth0 through eth4 bridged to br-lan. Hardware flow offloading enabled.

When I do a file copy between between any of the ports eth1-4, there is no CPU usage when monitored by Realtime Graphs. On the other hand, a file copy involving eth0 results in significant CPU usage.

After installing bridger, a file copy involving eth0 also has no CPU usage.

Now my contention is who cares that there is a big CPU load when you saturate eth0. Most non-Openwrt switches, you can't easily monitor CPU usage, and you don't care.

Nonetheless, bridger clearly improves CPU efficiency for eth0 and it is worthwhile to install it, even if the real world benefits are rather minimal.

3 Likes

Does it do wifi roaming between ports? (I dont know the answer)

There is no wifi on the ER-X, it’s a wired only router.

And if you are a bit careful and put a low traffic device on eth0, it doesn’t matter at all in practice.

Whatever way you manage to move MAC address from one brodge port to another.
nftables has problems thete.

I do not understand what this means. Is nftables involved in what bridger does?

It uses same "PPE" interface to copy packets from a to b...