Implicit master interface setup when creating new links?

Aleksander Morgado aleksander at aleksander.es
Mon Feb 15 20:40:08 UTC 2021


Hey all,

In addition to creating the new links (either with qmi_wwan/add_mux or with rmnet), the logic to setup the connection requires that the master interface (e.g. wwan0) is UP before the links can be brought up as well. In the normal NetworkManager integration, it's NM the one bringing the data interface up before configuring the IP settings, and if we want to keep the logic the same, it looks like it should be MM the one bringing the master interface up before NM brings up the link interface. Does this make sense?

And related to this, to maximize performance, Daniele suggested we configure the maximum data aggregation size reported by the modem in WDA Get Data Format as MTU of the master interface. I assume I could do this at the same time as bringing it up in the previous logic.

Now, would it make sense to add the logic to implicitly bring up the master interface and setup the master MTU as part of the qmi_device_add_link() method? E.g. As soon as the first link is created, we bring up the master and configure the MTU. After that, any additional link created would not require to repeat that process. And once we qmi_device_delete_link() all links, we could bring down the master interface as well.

Is this implicit logic too much? Or should we have a separate e.g. qmi_device_setup_master()/cleanup_master() to do that separately? Or nothing like that and just let ModemManager do that via custom methods implemented only in MM? It is true that these two operations (ifup and MTU setup) can be quickly done with iproute2 commands, so for setups using qmicli maybe it doesn't make much sense to have it in libqmi, but for MM we need something done, and don't really care much if it's in libqmi or MM itself.

Suggestions?


-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list