All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC PATCH] gprs: add function to handle activated context
Date: Fri, 07 Jan 2011 15:01:31 -0600	[thread overview]
Message-ID: <4D277F2B.8070102@gmail.com> (raw)
In-Reply-To: <129600E5E5FB004392DDC3FB599660D70106E1003E@irsmsx504.ger.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2624 bytes --]

Hi Fred,

>>> The collision can only occur if the +CGDCONT (or +CGDSCONT) command  from Ofono is sent at the same time as PDP >>context activation URC from the modem, and both use the same CID.
>>>
>>> But in that case, the modem should not reply "OK" to the PDP context configuration command, but "ERROR".
>>> And Ofono should not consider that the PDP configuration command as successful.
>>> Moreover, the "OK" for the context configuration and the context activation URC are sent of the same control
>>> channel so they cannot be sent in parallel but only in sequence.
>>>
>>> Sjur, is that a correct assumption?
>>
>> Yes, this sounds about right.
>> But I think Denis' proposal for using ofono_gprs_set_cid_range(gprs,
>> <min>, <max>) pretty much solves this issue,
>> We can use this to reserve the CID used for Initial PDN, and void this
>> race condition.
> I have to admit that I'm not yet fully comfortable with the solution proposed by Denis. 
> At least as long as we want to keep a on 1:1 mapping between the Ofono CID and the AT CID.
> If I have understood correctly, the Ofono Core is "chosing" a CID 
> and the modem plugin is trying to use the same CID on the AT interface. 
> The way to resolve the race condition as proposed by Denis is to "reserve" a range of CIDs
>  for the modem and another range for ofono.
> 
> My concern is that I don't know if this will work for all the modem implementations.
> My understanding is that an AT+CGDCONT=? should return you the list of supported CID 
> and not the list of CID that the user/Ofono can use. 

It is up to the driver to set the ranges appropriately based upon its
much more intimate knowledge of the modem firmware.  The drivers that do
not support LTE / network activated contexts can ignore this magic.

> 
> Considering that from a modem standpoint the CID race condition can be resolved, 
> some modem implementation may not have reserved a range of CID for their own purpose,
> or may not provide a mechanism to reserve a range of CID.
> 

If the CGDCONT race is guaranteed to be solved by the modem
manufacturers, great.  Unfortunately that is not the only race present.
 Hint: The gatchat implementation uses non-blocking IO, select and a
command queue.  So it is fully possible for oFono to reserve a CID, send
out a driver activation request, but receive a network initiated context
activation / default bearer activation before the CGDCONT was even sent.

Having cid ranges that do not overlap seems the safest approach to me
right now.  Unless someone has a better idea...

Regards,
-Denis

  reply	other threads:[~2011-01-07 21:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 17:25 [RFC PATCH] gprs: add function to handle activated context Soum, RedouaneX
2011-01-06  0:12 ` Marcel Holtmann
2011-01-06  0:17   ` Denis Kenzior
2011-01-07  8:52     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 15:45       ` Joly, Frederic
2011-01-07 21:07       ` Denis Kenzior
2011-01-06 13:28   ` Soum, RedouaneX
2011-01-07  8:50   ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 10:38     ` Aki Niemi
2011-01-06 12:02 ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2011-01-06 14:59   ` Soum, RedouaneX
2011-01-06 16:47     ` Denis Kenzior
2011-01-06 17:14     ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2011-01-06 16:37   ` Denis Kenzior
2011-01-06 17:39   ` Marcel Holtmann
2011-01-06 17:45     ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2011-01-06 17:53       ` Marcel Holtmann
2011-01-06 18:10       ` Denis Kenzior
2011-01-07 15:14         ` Joly, Frederic
2011-01-07 15:38           ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2011-01-07 17:52             ` Joly, Frederic
2011-01-07 21:01               ` Denis Kenzior [this message]
2011-01-11 12:46                 ` Soum, RedouaneX
2011-01-17 14:21                 ` Pekka Pessi
2011-01-17 18:39                   ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2011-01-17 18:51                     ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2011-01-17 22:39                     ` Pekka Pessi
2011-01-17 23:15                       ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D277F2B.8070102@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.