Proper way to enable EEE with DSA?

I'd like to enable EEE on all copper ports on my realtek target switches. I know I can do this manually using

ethtool --set-eee lan1 eee on

etc. And I could of course just drop that into /etc/rc.local. But it seems to me there should be a way to configure this in UCI, similar to the old swconfig enable_eee option.

Any hints? Or not implemented yet?

UCI does seem to have an option for this, see the very bottom of ("enable_eee")

The only experience with EEE I have was in a workshop/presentation by D-Link where they specifically told me to turn it off in their devices because customers complain it causes reliability/compatibility issues. Albeit this was years ago and we're talking about D-Link :stuck_out_tongue: so take with a grain of salt.

My gut questions whether or not EEE/Green Ethernet actually has a notable effect on the power budget or if it's just marketing ("reduces power draw only in X very specific scenario"). Good chipsets already enter power-saving modes internally and transparently to the OS. The ethernet peripherals in SoC or dedicated chipsets are unlikely to be the largest power draws on a router, unless the router has a lot of NICs (eg 24 ports). This probably changes quite a bit once you get above a Gigabit, however.

Yes, but switch_port isn't relevant for DSA, is it? That's why I asked for the DSA alternative.

BTE; grepping for that option it looks like it was only implemented in the target/linux/generic/files/drivers/net/phy/ar8327.c driver. Or am I missing something somewhere.

It most definitely has. This is a plot of the PoE power delivered from a ZyXEL GS1900-10HP where I enabled EEE on all copper ports yesterday at around 19:00:


This switch is powering two idle Unifi U6 Lites on port 6 and 7, and a RPi4 (with 5 powered USB devices) on port 8. You can see a noticeable drop in the power delivered to all three devices when EEE was enabled. And this is only measuring the power saved on the remote end! I don't have any measurement of the GS1900-10HP itself. But I believe it's safe to assume that the savings are in the same order.

Anyway, using 10% less power on each of those devices is enough for me to justify EEE. I don't think I'll notice it on the bill, but it is important wrt heat dissipation. Especially for the RPi4.

1 Like