Skip to content

Make Notify Multiple timeout configurable

Luiz Augusto von Dentz linux-bluetooth 1 version Applied

Status from this message: This series was applied to bluetooth/bluez.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5shared/mainloop: Free removed idles without waiting for eventssrc/shared/mainloop.c+4 -11 reply
2/5shared/mainloop: Fix idle ID overflowsrc/shared/mainloop.c+30 -40 replies
3/5shared/gatt-server: Add bt_gatt_server_set_mnotify_timeoutsrc/shared/gatt-server.c src/shared/gatt-server.h+58 -320 replies
4/5unit/test-gatt: Add Notify Multiple server testsunit/test-gatt.c+99 -00 replies
5/5main.conf: Add NotifyMultiple option to GATT sectionsrc/btd.h src/device.c src/main.c +1 more+47 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH BlueZ v1 0/5] Make Notify Multiple timeout configurable

From: Luiz Augusto von Dentz <[email protected]>

When acting as a HID device, GATT Notify Multiple adds up to 10 ms of latency to notifications since they are buffered to be aggregated into a single PDU. This set makes the timeout configurable with the new [GATT] NotifyMultiple option in main.conf:

false: Disable Notify Multiple, always send regular notifications.
true: Enable Notify Multiple with 0 ms timeout (default), so only the
notifications queued in the same mainloop cycle are aggregated.
<ms>: Enable Notify Multiple with the given timeout in milliseconds.

Since timeouts of 0 are run as mainloop idle callbacks, these are also fixed to free removed idles without waiting for other events, and to not overflow their IDs.

Note that with the lower timeout the ASE Control Point and ASE state notifications of BAP are no longer aggregated, which exposes a race on BAP clients, so the BAP enhancements set should be applied first.

Luiz Augusto von Dentz (5):
shared/mainloop: Free removed idles without waiting for events shared/mainloop: Fix idle ID overflow shared/gatt-server: Add bt_gatt_server_set_mnotify_timeout unit/test-gatt: Add Notify Multiple server tests main.conf: Add NotifyMultiple option to GATT section

 src/btd.h                |  1 +
 src/device.c             |  2 +
 src/main.c               | 32 +++++++++++++
 src/main.conf            | 12 +++++
 src/shared/gatt-server.c | 87 ++++++++++++++++++++++-------------
 src/shared/gatt-server.h |  3 ++
 src/shared/mainloop.c    | 39 ++++++++++++++--
 unit/test-gatt.c         | 99 ++++++++++++++++++++++++++++++++++++++++
 8 files changed, 238 insertions(+), 37 deletions(-)
Signature · 1 line
2.56.0