-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bluetooth: att: use a dedicated metadata struct for RSP PDUs
The ATT module has provisions to queue a packet/buffer for sending later if it can't send it right away. For example if the conn.c tx context allocation fails. This unfortunately doesn't work if the buffer can't get allocated in the first place, or if the ATT metadata can't also be allocated. The metadata is allocated from a global pool set to the same number as conn.c TX contexts. That can lead to a situation where other users of ATT manage to queue a bunch of buffers (e.g. the app spamming GATT notifications), depleting the number of ATT metadata slots so that none are available. When none are available, and we receive an ATT REQ, we try to allocate one, fail, and drop the buffer (!). That pretty much guarantees an ATT timeout. As a workaround for this, use a per-channel metadata slot, that is only used for completing transactions. Signed-off-by: Jonathan Rico <[email protected]>
- Loading branch information
1 parent
ad36d0d
commit 828be80
Showing
1 changed file
with
55 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters