From: "Michał Lowas-Rzechonek" <michal.lowas-rzechonek@silvair.com>
To: "Stotland, Inga" <inga.stotland@intel.com>
Cc: "jakub.witowski@silvair.com" <jakub.witowski@silvair.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
"Gix, Brian" <brian.gix@intel.com>
Subject: Re: [RFC BlueZ 0/1] Validate element indexation
Date: Mon, 8 Jul 2019 20:22:11 +0200 [thread overview]
Message-ID: <20190708182211.yxkucondnw5x6ay7@kynes> (raw)
In-Reply-To: <65651744c67ae13bd95ffac88fae42f0f6c16c61.camel@intel.com>
Inga, Jakub,
On 07/08, Stotland, Inga wrote:
> I agree that the validation for the gaps is needed. Interesting point
> about max number of elements...
>
> I wonder if a better check woul be to we to add to construct
> composition data as a validation point to make sure it fits in mesh
> message. Plus, an additional strict check can be done when Attach
> method is called: stored composition can be byte compared to the one
> dynamically generated from collected properties...
If I read that correctly, this means we would need a way to build
Composition Data on the fly, during get_manager_object_cb processing.
I think it would be possible to get rid of validate_model_property
function - instead, we could build a temporary mesh_node instance
using information provided by the application as-is, and then:
- in case of existing nodes, generate Composition Data from both
existing and temporary instances, and byte-compare the two
- in case of new nodes, simply save the temporary instace to 'nodes'
list
All of that assumes that Composition Data generationchecks that:
- everything fits into a buffer (this is already done)
- mandatory models are present
- indexation is OK
I think this would make things slightly more consistent, and we would
get rid of most "is_new" checks during attach/join/create/import.
regard
--
Michał Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND
next prev parent reply other threads:[~2019-07-08 18:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 14:13 [RFC BlueZ 0/1] Validate element indexation Jakub Witowski
2019-07-08 14:13 ` [RFC BlueZ 1/1] mesh: " Jakub Witowski
2019-07-08 16:53 ` [RFC BlueZ 0/1] " Stotland, Inga
2019-07-08 18:22 ` Michał Lowas-Rzechonek [this message]
2019-07-09 6:36 ` Stotland, Inga
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=20190708182211.yxkucondnw5x6ay7@kynes \
--to=michal.lowas-rzechonek@silvair.com \
--cc=brian.gix@intel.com \
--cc=inga.stotland@intel.com \
--cc=jakub.witowski@silvair.com \
--cc=linux-bluetooth@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox