you most certainly want to do this in userspace I think.
One of the biggest problems is that link negotiation can take a significant amount
of time, well over several seconds (1 to 3 seconds typical) with gigabit, and
having your ethernet connection go offline for 3 seconds may not be the desired
effect for when you want to get more bandwidth in the first place.
However, when a laptop is in battery mode, switching down from gigabit to 100mbit
makes a lot more sense, so this is something I would recommend. This can be as
easy as changing the advertisement mask of the interface and renegotiating the
link. Userspace could handle that very easily.
Auke
-