Page MenuHomeFreeBSD

iflib: Stop interface for media change
AbandonedPublic

Authored by kbowling on Jul 14 2021, 12:21 AM.

Details

Reviewers
markj
grehan
shurd
Group Reviewers
iflib
Summary

Prevent interface stalls when media is changed by stopping the interface during a media change.

Author: jcaplan@blackberry.com
PR: 253172
MFC: 3 weeks

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

iflib_stop() is pretty heavy-weight -- is this needed for all devices? Maybe add a flag to do this only on devices where its needed, or have the device do the disabling itself?

iflib_stop() is pretty heavy-weight -- is this needed for all devices? Maybe add a flag to do this only on devices where its needed, or have the device do the disabling itself?

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.

iflib_stop() is pretty heavy-weight -- is this needed for all devices? Maybe add a flag to do this only on devices where its needed, or have the device do the disabling itself?

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()

iflib_stop() is pretty heavy-weight -- is this needed for all devices? Maybe add a flag to do this only on devices where its needed, or have the device do the disabling itself?

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.