Skip to content

Conversation

@jhedberg
Copy link
Member

@jhedberg jhedberg commented Aug 19, 2019

Backport #18479 and #18528

These two backports are in a single PR since the patch from #18528 depends on (or actually fixes) an earlier patch in this PR.

Johan Hedberg added 3 commits August 19, 2019 15:29
When sent solely to the Friend Queue the send callbacks were not
getting called for unsegmented messages.

Signed-off-by: Johan Hedberg <[email protected]>
The bt_mesh_trans_resend() function had no users, and had in fact not
even a prototype in a header file. Just remove it.

Signed-off-by: Johan Hedberg <[email protected]>
Qualification test case MESH/NODE/FRND/FN/BV-08-C requires that we do
not store more messages than the reported Friend Queue size. The
implementation was so far opportunistic and stored more if it could
(it would later discard if necessary to make sure all queues can store
the required amount). The spec also requires the queues to have new
messages overwrite old ones (in the style of a circular buffer), so we
have to keep track of which buffers are part of the same segmented
message (so we discard all buffers belonging to the same message).

To pass the test case, add APIs to check for space in the Friend
queue, and track the number of buffers for each incoming segmented
message.

Fixes zephyrproject-rtos#18090

Signed-off-by: Johan Hedberg <[email protected]>
@jhedberg jhedberg added bug The issue is a bug, or the PR is fixing a bug area: Bluetooth area: Bluetooth Mesh area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests labels Aug 19, 2019
@jhedberg jhedberg requested a review from trond-snekvik August 19, 2019 13:32
@jhedberg jhedberg requested review from Vudentz and sjanc as code owners August 19, 2019 13:32
The code for checking space in the Friend queue was faulty in the case
that we receive a message with more segments than the configure Friend
Queue size. This is not an issue for the default configuration but
still a possible one. Move the check for exceeding Friend Queue Size
to the per-LPN function, so that bt_mesh_friend_queue_has_space()
iterates all LPNs before delivering its verdict. This allows us to
return success in case no LPN matched (which is how the code was
intended to work).

Fixes zephyrproject-rtos#18522

Signed-off-by: Johan Hedberg <[email protected]>
@nashif nashif merged commit 0d5640e into zephyrproject-rtos:v1.14-branch Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Mesh area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Bluetooth bug The issue is a bug, or the PR is fixing a bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants