When to allocate client IDs
bjorn at mork.no
Mon Mar 26 04:37:12 PDT 2012
I'm looking at this:
and wonder if it wouldn't be better to do on-demand client ID
allocations? I think it's safe to assume that not all applications will
need all subsystems. And we know for sure that not all devices support
all subsystems. So attempting to allocate IDs for all of them is
guaranteed to create unnecessary overhead.
And then there is the weird device issue. I've already seen one example
of a device supporting some of these systems, but failing (modeswitching
and thereby disappearing) when attempting any QMI_WDS commands. This
device did survive the QMI_WDS client ID allocation, so all this may be
totally irrelevant. But still, I wouldn't be surprised if some other
device went bananas when it got a request for an unsupported client ID.
The point is that an application may have a lot more knowlegde about a
particular device, such as supported subsystems, and if you allocate the
IDs on-demand then the application can work around any issues by just
avoiding the known unsupported ones.
Another point is that most subsystems will start sending you unsolicted
notifications once you allocate a client ID. That's of course nice as
long as you are prepared to handle them, but useless noise if no
application is interested.
More information about the libqmi-devel