When to allocate client IDs

Bjørn Mork bjorn at mork.no
Mon Mar 26 04:37:12 PDT 2012


Hello,

I'm looking at this:
http://git.chromium.org/gitweb/?p=chromiumos/platform/libqmi.git;a=commitdiff;h=a98ef3917ce8b94b253db73a28a99fcbae67c247
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.


Bjørn


More information about the libqmi-devel mailing list