Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: Mesh: Remove extra rescheduling and ADV_FLAG_SCHEDULED flag in the extended advertiser #68558

Conversation

PavelVPV
Copy link
Collaborator

@PavelVPV PavelVPV commented Feb 5, 2024

This PR removes extra rescheduling in the extended advertiser after the last advertising has been finished. This commit also removes the ADV_FLAG_SCHEDULED flag as not needed anymore.

This extra rescheduling and the flag were needed to delay the next advertisement by 20ms. Now, when the delay is removed the advertiser can pick the next advertisement from the pool and push to the host right away.

Andrewpini
Andrewpini previously approved these changes Feb 5, 2024
akredalen
akredalen previously approved these changes Feb 5, 2024
@PavelVPV PavelVPV dismissed stale reviews from akredalen and Andrewpini via eca0712 February 6, 2024 06:37
@PavelVPV PavelVPV force-pushed the remove_extra_resched_in_ext_adv branch from 560da2f to eca0712 Compare February 6, 2024 06:37
This commit removes extra rescheduling in the extended advertiser after
the last advertising has been finished. This commit also removes the
`ADV_FLAG_SCHEDULED` flag as not needed anymore.

This extra rescheduling and the flag were needed to delay the next
advertisement by 20ms. Now, when the delay is removed the advertiser can
pick the next advertisement from the pool and push to the host right
away.

Signed-off-by: Pavel Vasilyev <[email protected]>
@PavelVPV PavelVPV force-pushed the remove_extra_resched_in_ext_adv branch from eca0712 to 582f914 Compare February 6, 2024 06:58
@PavelVPV PavelVPV requested a review from LingaoM February 6, 2024 07:01
@alxelax alxelax added the DNM This PR should not be merged (Do Not Merge) label Feb 6, 2024
@alxelax alxelax removed the DNM This PR should not be merged (Do Not Merge) label Feb 6, 2024
@fabiobaltieri fabiobaltieri added this to the v3.7.0 milestone Feb 8, 2024
@fabiobaltieri fabiobaltieri merged commit c601c15 into zephyrproject-rtos:main Feb 26, 2024
21 of 22 checks passed
LingaoM added a commit to LingaoM/zephyr that referenced this pull request Oct 15, 2024
When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after zephyrproject-rtos#68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <[email protected]>
henrikbrixandersen pushed a commit that referenced this pull request Oct 16, 2024
When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after #68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <[email protected]>
HaavardRei pushed a commit to HaavardRei/sdk-zephyr that referenced this pull request Oct 21, 2024
…to send messages

When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after zephyrproject-rtos/zephyr#68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <[email protected]>
(cherry picked from commit 537d215)
Signed-off-by: Håvard Reierstad <[email protected]>
coreboot-org-bot pushed a commit to coreboot/zephyr-cros that referenced this pull request Oct 22, 2024
When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after zephyrproject-rtos/zephyr#68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

(cherry picked from commit 537d215)

Original-Signed-off-by: Lingao Meng <[email protected]>
GitOrigin-RevId: 537d215
Cr-Build-Id: 8733565196572304993
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8733565196572304993
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I94956c624381163d4e77709858bf90cdb7bab7b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5937740
Reviewed-by: Jeremy Bettis <[email protected]>
Commit-Queue: Eric Yilun Lin <[email protected]>
Reviewed-by: Fabio Baltieri <[email protected]>
Tested-by: Dawid Niedźwiecki <[email protected]>
Reviewed-by: Dawid Niedźwiecki <[email protected]>
HaavardRei pushed a commit to HaavardRei/sdk-zephyr that referenced this pull request Oct 23, 2024
…to send messages

When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after zephyrproject-rtos/zephyr#68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <[email protected]>
(cherry picked from commit 537d215)
Signed-off-by: Håvard Reierstad <[email protected]>
rlubos pushed a commit to nrfconnect/sdk-zephyr that referenced this pull request Oct 23, 2024
…to send messages

When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after zephyrproject-rtos/zephyr#68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <[email protected]>
(cherry picked from commit 537d215)
Signed-off-by: Håvard Reierstad <[email protected]>
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 24, 2024
…to send messages

When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after zephyrproject-rtos/zephyr#68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <[email protected]>
(cherry picked from commit 537d215)
Signed-off-by: Håvard Reierstad <[email protected]>
jukkar pushed a commit to jukkar/sdk-zephyr that referenced this pull request Dec 5, 2024
…to send messages

When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after zephyrproject-rtos/zephyr#68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <[email protected]>
(cherry picked from commit 537d215)
Signed-off-by: Håvard Reierstad <[email protected]>
(cherry picked from commit ebc473f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants