netplan-developers team mailing list archive
-
netplan-developers team
-
Mailing list archive
-
Message #00015
Re: [Merge] ~jocave/netplan/+git/netplan:dont-rebind-mwifiex into netplan:master
I'm fine with applying this patch, but note that mac80211_hwsim is a bit special: it genuinely doesn't even advertise rebinding, but it's also just being used for testing so it doesn't matter much.
OTOH mwifiex_pcie actually controls real hardware, and with that "netplan apply" would stop working for renames. Obviously you do call netplan apply (otherwise you wouldn't run into the crash), so I figure you do want it to actually apply.
Can you please file a bug against the kernel with the logs and traces so that this gets fixed properly eventually?
I also have an inline comment, see below.
Diff comments:
> diff --git a/src/netplan b/src/netplan
> index bdef802..403a5d1 100755
> --- a/src/netplan
> +++ b/src/netplan
> @@ -103,8 +103,10 @@ def replug(device): # pragma: nocover (covered in autopkgtest)
> try:
> # we must resolve symlinks here as the device dir will be gone after unbind
> driver = os.path.realpath(os.path.join(devdir, 'device', 'driver'))
> - if os.path.basename(driver) == 'mac80211_hwsim':
> - logging.debug('replug %s: mac80211_hwsim does not support rebinding, ignoring', device)
> + driver_name = os.path.basename(driver)
> + if driver_name in ('mac80211_hwsim', 'mwifiex_pcie'):
> + logging.debug('replug %s: %s does not support rebinding, ignoring',
> + device, driver_name)
Please keep the original check for mac80211_hwsim only, as "does not support rebinding" is not actually true for mwifiex_pcie. For this one, rather log something like "crashes on rebind".
> return False
> logging.debug('replug %s: unbinding %s from %s', device, devname, driver)
> with open(os.path.join(driver, 'unbind'), 'w') as f:
--
https://code.launchpad.net/~jocave/netplan/+git/netplan/+merge/307531
Your team Developers of netplan is requested to review the proposed merge of ~jocave/netplan/+git/netplan:dont-rebind-mwifiex into netplan:master.
References