Prevent interface stalls when media is changed by stopping the interface during a media change.
MFC: 3 weeks
kbowling on Jul 14 2021, 12:21 AM.Authored by
I'm not super familiar with this area, is there something that would cause media changes to be "common" like EEE or something? I'm trying to imagine a situation where it wouldn't be as drastic as a link flap already which would justify spending more time thinking about this.
I'm not sure what EEE is.
My point was that there are NICs where the whole thing does not need to be shut down and re-started to change media types, and the iflib_stop() is pretty heavy (2 DELAY(1000), interrupt disable, callout disable, etc.
Now that I'm thinking about this, it came up before with vlans. See IFLIB_RESTART_VLAN_CONFIG. I think we should add an IFLIB_RESTART_MEDIA_CONFIG and wrap the restart in iflib_media_change() in IFDI_NEEDS_RESTART(ctx, IFLIB_RESTART_MEDIA_CONFIG) like in iflib_vlan_register()
I'd like to understand the issue more before doing it, for instance the VLAN case looks to me to be completely unnecessary for e1000 and is in effect a heavy handed way to re-program the filter because the driver didn't do that at the right spots.