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: Fix various deadlock issues when running low on buffers #16870

Closed
wants to merge 3 commits into from

Commits on Jun 19, 2019

  1. Bluetooth: Add dedicated pool for HCI_Num_Completed_Packets HCI event

    This event is a priority one, so it's not safe to have it use the RX
    buffer pool which may be depleted due to non-priority events (e.g.
    advertising events). Since the event is consumed synchronously it's
    safe to have a single-buffer pool for it. Also introduce a new
    bt_buf_get_evt() API for HCI drivers to simplify the driver-side code,
    this effectively also deprecates bt_buf_get_cmd_complete() which now
    has no in-tree HCI driver users anymore.
    
    Fixes zephyrproject-rtos#16864
    
    Signed-off-by: Johan Hedberg <[email protected]>
    Johan Hedberg committed Jun 19, 2019
    Configuration menu
    Copy the full SHA
    e93cce2 View commit details
    Browse the repository at this point in the history
  2. net: buf: Reserve upper 3 bits of flags for external use

    Currently net_buf only needs the lower two bits. It may be useful to
    let users of the API take advantage of some bits as a form of extended
    user data (if using user data isn't appropriate or there's no space
    there).
    
    Signed-off-by: Johan Hedberg <[email protected]>
    Johan Hedberg committed Jun 19, 2019
    Configuration menu
    Copy the full SHA
    e24e87f View commit details
    Browse the repository at this point in the history
  3. Bluetooth: drivers/h4: Add support to discard packets from RX queue

    Add support to iterate the RX queue and discard (discardable) packets
    in case the RX buffer pool is empty. This will make potential deadlock
    scenarios less likely.
    
    Signed-off-by: Johan Hedberg <[email protected]>
    Johan Hedberg committed Jun 19, 2019
    Configuration menu
    Copy the full SHA
    be91f0f View commit details
    Browse the repository at this point in the history