[PATCH] libmbim: Add mbim-proxy support

Greg Suarez gpsuarez2512 at gmail.com
Sat May 24 12:26:00 PDT 2014


On May 24, 2014 4:52 AM, "Aleksander Morgado" <aleksander at aleksander.es>
wrote:
>
> Hey Greg,
>
> Just reviewing your mbim-proxy work. I made some more commits on top
> of yours, changing some defaults and fixing some missing docs; it's
> all in the 'greg/proxy' branch in upstream git.
>
ok, thanks.

> Got a question, though:
>
> On Thu, Apr 17, 2014 at 12:48 AM, Greg Suarez <gpsuarez2512 at gmail.com>
wrote:
> > +    gboolean forward_indication = FALSE;
> > +
> > +    if (mbim_message_indicate_status_get_service (message) ==
MBIM_SERVICE_INVALID) {
> > +        for (i = 0; i < client->mbim_client_info_array->len; i++) {
> > +            MbimClientInfo *info;
> > +
> > +            info = &g_array_index (client->mbim_client_info_array,
MbimClientInfo, i);
> > +            /* If service UUID match, forward to the remote client */
> > +            if
(mbim_uuid_cmp(mbim_message_indicate_status_get_service_id (message),
&info->uuid)) {
> > +                forward_indication = TRUE;
> > +                break;
> > +            }
> > +        }
> > +    } else
> > +        forward_indication = TRUE;
>
> I see that indications for known services are forwarded to all clients
> by default, while indications for unknown services are only forwarded
> if they are 'tracked' (i.e. if the client actually used that service
> before explicitly). Not sure if that is the right approach as the
> device may send indications of an unknown service even before the user
> has used it... I believe that for now we should stick to sending all
> indications to every client, as that is what a client not using the
> proxy would expect, and the proxy aims to be transparent. Sure,
> clients will get indications for services they may not be able to use,
> but that is anyway the case when the proxy is not used.
>
> What do you think?
>
The issue is that one of the OEMs that I'm working with implements a "debug
trace" service and once it's turned on generates megabytes of data through
indications in just a few seconds.  So I think it would be too much of a
performance hit to forward so much data to clients that are just going to
ignore it.

And I also believe that the MBIM spec specifies that devices are not
supposed to send non standard indications unless first requested. Of course
I could be wrong on this since it's been a while since I've read the spec.
At least I know the spec for this OEM specifies that.

Thanks,

Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20140524/df0835c4/attachment.html>


More information about the libmbim-devel mailing list