Skip to content

modemmanager: suppress hotplug noise without breaking QMAP/QMI/MBIM mux - #30571

Merged
feckert merged 1 commit into
openwrt:masterfrom
micpf:modemmanager-mux-hotplug
Sep 22, 2026
Merged

feckert merged 1 commit into
openwrt:masterfrom
micpf:modemmanager-mux-hotplug

Conversation

@micpf

@micpf micpf commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Follow-up to 7885dff ("modemmanager: skip virtual net devices in hotplug script"), addressing the regression reported in the post-merge review comment.

The regression

That commit exited 25-modemmanager-net for every device under /devices/virtual/* to stop the per-device "event processed" line from spamming daemon.info on every boot and hotplug replay. But the blanket exit also dropped the QMAP/QMI/MBIM multiplexing netdevices (qmapmux*, qmimux*, mbimmux*). Those live under /devices/virtual too, but they are real modem data ports that mm_report_event() deliberately keeps (ModemManager then resolves their lower_* link back to the physical modem). Skipping them broke multiplexed data connections.

The fix

Rather than duplicating the qmapmux/qmimux/mbimmux allow-list in the hotplug script — where it would drift out of sync with the copy in mm_report_event() — keep the filter in one place:

  • mm_report_event() now returns non-zero only when it drops a virtual device.
  • The hotplug scripts (net, tty, wwan) emit their "event processed" info log only when the event was actually reported (mm_report_event ... || exit).

Result: the noisy daemon.info lines are gone for dropped devices (they log only at debug, silent on a normal boot), the allow-list lives in exactly one place, and the mux data ports still reach ModemManager. The "MM not up, cached" path keeps returning success so cached events are still logged/tracked and replayed by the wrapper.

Maintainer checklist

  • The PR title includes a proper package title modemmanager:
  • I tested the code in this PR
  • PKG_RELEASE bumped

Fixes: 7885dff ("modemmanager: skip virtual net devices in hotplug script")

micpf referenced this pull request Sep 21, 2026
Every net uevent - eth ports, USB hubs, bridges, taps, SQM IFB,
GRE tunnels, veth, tun/tap - is handed to mmcli via
25-modemmanager-net's mm_report_event call, so ModemManager logs a
'not supported by any plugin' notice per device on every boot and
hotplug replay:

  ModemManager[15132]: <msg> [base-manager] couldn't check support
    for device '.../fsl-ehci.0/usb1/1-1/1-1.1':
    not supported by any plugin

mm_report_event() already discards virtual devices internally, but
only after mm_log "info" has written a "hotplug: add network
interface XXX: event processed" line to daemon.info for every one
of them.

Mirror the same guard in the hotplug script by exiting early when
DEVPATH points under /devices/virtual/*, which covers SQM IFB, GRE,
bridges, veth, tun/tap.  This never rejects a physical modem port
(kernel wwan, MHI, USB CDC/RNDIS/QMI/MBIM are all under real bus
subtrees).

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
openwrt-ai

This comment was marked as resolved.

Commit 7885dff ("modemmanager: skip virtual net devices in hotplug
script") exited 25-modemmanager-net for every device under
/devices/virtual/* to stop the per-device "event processed" line from
spamming daemon.info on every boot and hotplug replay.

That blanket exit also dropped the QMAP/QMI/MBIM multiplexing netdevices
(qmapmux*, qmimux*, mbimmux*).  Those live under /devices/virtual too,
but they are real modem data ports and mm_report_event() deliberately
keeps them (ModemManager then resolves their lower_* link back to the
physical modem).  Skipping them in the hotplug script broke multiplexed
data connections.

Rather than duplicating that qmapmux/qmimux/mbimmux allow-list in the
hotplug script -- where it would drift out of sync with the copy in
mm_report_event() -- keep the filter in one place.  mm_report_event()
now returns non-zero when it drops a virtual device, and the hotplug
scripts only emit their "event processed" info log when the event was
actually reported.  The noisy log lines are gone for the dropped
devices, and the mux ports still reach ModemManager.

Fixes: 7885dff ("modemmanager: skip virtual net devices in hotplug script")
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
@micpf
micpf force-pushed the modemmanager-mux-hotplug branch from e012fd4 to 0e1dc26 Compare September 21, 2026 10:31
openwrt-ai

This comment was marked as resolved.

@feckert

feckert commented Sep 22, 2026

Copy link
Copy Markdown
Member

@micpf LGTM
Thanks merged.
Can you check if we should also backport this to openwrt-25.12?

@feckert
feckert merged commit f094afb into openwrt:master Sep 22, 2026
14 checks passed
@micpf

micpf commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @feckert! Backport opened as #30578 against openwrt-25.12.

One note: the QMAP/QMI/MBIM regression this PR fixes never existed on 25.12, because the commit that introduced it (7885dff, the blanket /devices/virtual/* exit) was never backported there. So #30578 brings only the log-noise reduction (the daemon.info "event processed" spam and the daemon.err from the live mmcli call before MM is up), in its final mux-safe form. I squashed it into a single commit so the intermediate buggy 7885dff step doesn't land on the release branch; the resulting net/modemmanager files are identical to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants