
Dear Ben Warren,
In message 48DC7CAD.9040502@gmail.com you wrote:
Am I reading this correctly that we eth_halt() and eth_init() the network interface for each and every call to NetLoop?
Yes, it looks that way. Ripe for gutting.
I didn't have much time to look into the code, so I'm just speculating - maybe this is needed for switching interfaces in case of errors?
This looks terribly inefficient to me - is there any rationale behind this?
Probably, but it escapes me. It most certainly predates my involvement in this project.
I should know, but if I ever understood that part of the code, I have completely forgotten about it ;-)
Also, the eth_set_current() checking should IMHO be done just once, before we start a network transfer, or when we actually switch interfaces, but not for each and every call to NetLoop() ?
Maybe, but eth_set_current() is pretty lightweight. NetLoop is only called when we start a network transfer, so this doesn't seem too egregious. It could definitely stand to be refactored.
Do you plan to have a closer look on this in some near future?
Best regards,
Wolfgang Denk