Re: CSME integration - next steps, network selection

On Tue, 2022-03-08 at 08:35 +0200, Emmanuel Grumbach via
networkmanager-list wrote:
I realized I am missing a piece before this.
I need to be able to get and handle nl80211 events, which means that
need a thread or event loop or something that listens to the nl80211
channel and parses events. The event I need is the end of the
connection from the CSME side. This brings to the fundamental
of the threading model in NetworkManager.
Do we have a sort of event loop? Looks like the NetworkManager runs
an event loop and very few things run in a different thread, but I
couldn't really see any clear information about it.


we use a glib mainloop. Read

There is only one thread (except, that GDBus spawns a worker thread
internally and that we might do a blocking write to sysctl on a thread,
but NM itself is for the most case single threadded).

In this case, you would poll on the file descriptor. So use

I looked into this and basically I'd have to reimplement
event_handler_read_netlink which reads from priv->nlh where I need to
read from genl...
The pick of priv->nlh and very deep in the code.
I guess I could add DELAYED_ACTION_TYPE_READ_NL80211 just like we have
event_handler_read_nl80211 which would set a parameter in the platform
so that event_handler_read_netlink will read from genl instead of
priv->nlh? Since everything is single thread, that could work?
OTOH, it'd mean that the handling of the nl82011 messages would be in
nm-linux-platform which isn't desirable either.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]