Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 0/5] Make Notify Multiple timeout configurable
@ 2026-11-03 20:30 Luiz Augusto von Dentz
  2026-11-03 20:30 ` [PATCH BlueZ v1 1/5] shared/mainloop: Free removed idles without waiting for events Luiz Augusto von Dentz
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-03 20:30 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-04 19:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 20:30 [PATCH BlueZ v1 0/5] Make Notify Multiple timeout configurable Luiz Augusto von Dentz
2026-11-03 20:30 ` [PATCH BlueZ v1 1/5] shared/mainloop: Free removed idles without waiting for events Luiz Augusto von Dentz
2026-11-03 22:42   ` Make Notify Multiple timeout configurable bluez.test.bot
2026-11-03 20:30 ` [PATCH BlueZ v1 2/5] shared/mainloop: Fix idle ID overflow Luiz Augusto von Dentz
2026-11-03 20:30 ` [PATCH BlueZ v1 3/5] shared/gatt-server: Add bt_gatt_server_set_mnotify_timeout Luiz Augusto von Dentz
2026-11-03 20:30 ` [PATCH BlueZ v1 4/5] unit/test-gatt: Add Notify Multiple server tests Luiz Augusto von Dentz
2026-11-03 20:30 ` [PATCH BlueZ v1 5/5] main.conf: Add NotifyMultiple option to GATT section Luiz Augusto von Dentz
2026-11-04 19:10 ` [PATCH BlueZ v1 0/5] Make Notify Multiple timeout configurable patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox