Linux bluetooth development
 help / color / mirror / Atom feed
From: "Gix, Brian" <brian.gix@intel.com>
To: "michal.lowas-rzechonek@silvair.com" 
	<michal.lowas-rzechonek@silvair.com>
Cc: "jakub.witowski@silvair.com" <jakub.witowski@silvair.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Stotland, Inga" <inga.stotland@intel.com>
Subject: Re: [PATCH 1/2] mesh: Add sequence nr getter to the doc
Date: Tue, 14 Jan 2020 16:39:51 +0000	[thread overview]
Message-ID: <73e50268c7a5289a20adc8cffc3de2e04ef93acd.camel@intel.com> (raw)
In-Reply-To: <20200114154012.gixnyhceabg2lrsp@mlowasrzechonek2133>

Hi Michał & Jakub,

On Tue, 2020-01-14 at 16:40 +0100, Michał Lowas-Rzechonek wrote:
> Hi Brian,
> 
> On 01/14, Gix, Brian wrote:
> > > +	uint32 SequenceNumber [read-only]
> > > +
> > > +		This property may be read at any time to determine the
> > > +		sequence number.
> > > +
> > 
> > Is there a use case justification for exposing this value?  Why an Application would need this?
> 
> There are 2 use cases:
>  - debugging and monitoring RPL behaviour

I need to think about this a bit and discuss with Inga

>  - we'd like to add another API to increase the sequence number - this
>    is useful when you Import() a node from another database and would
>    like to bump its sequence number up to a previously known value, so
>    that the rest of the network can talk to it

I have some serious discomfort with an API to increase sequence numbers.  On import,
the sequence number should be part of the data being imported, so I don't see a
direct need there to bump up the value afterwards.

Plus, we handle sequence numbers differently than many other settings in the
system.  To prevent storage thrashing, we "Pre-Reserve" a chunk of sequence
numbers that we store in node.json, and then real-time use these sequence
numbers for outbound packets without having to write to storage each time
(a power failure or other reset would then pick up after the reserved chunk).
And then it also feeds into the IV Index update feature as well.

Giving an App the ability to arbitrarily increase it's sequence number puts
it into conflict with the natural usage of sequence numbers, and when we request
the IV Index Update.



  reply	other threads:[~2020-01-14 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 11:49 [PATCH 1/2] mesh: Add sequence nr getter to the doc Jakub Witowski
2020-01-14 11:49 ` [PATCH 2/2] mesh: Add sequence nr getter code Jakub Witowski
2020-01-14 14:50 ` [PATCH 1/2] mesh: Add sequence nr getter to the doc Gix, Brian
2020-01-14 15:40   ` Michał Lowas-Rzechonek
2020-01-14 16:39     ` Gix, Brian [this message]
2020-01-14 16:53       ` michal.lowas-rzechonek

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=73e50268c7a5289a20adc8cffc3de2e04ef93acd.camel@intel.com \
    --to=brian.gix@intel.com \
    --cc=inga.stotland@intel.com \
    --cc=jakub.witowski@silvair.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=michal.lowas-rzechonek@silvair.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox