-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Labels
area: Bluetooth HostBluetooth Host (excluding BR/EDR)Bluetooth Host (excluding BR/EDR)bugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Reporting just so I don't forget about it.
Both iso_tx[] and conn_tx[] arrays end up in the free_tx fifo.
This fifo is then used indiscriminately by conn_tx_alloc() to allocate a TX context for a given buffer. That buffer can be for an ACL or ISO link.
This means an ACL link can starve an ISO link.
Env
Zephyr @
zephyr/subsys/bluetooth/host/conn.c
Lines 427 to 449 in 78150c8
| static struct bt_conn_tx *conn_tx_alloc(void) | |
| { | |
| /* The TX context always get freed in the system workqueue, | |
| * so if we're in the same workqueue but there are no immediate | |
| * contexts available, there's no chance we'll get one by waiting. | |
| */ | |
| if (k_current_get() == &k_sys_work_q.thread) { | |
| return k_fifo_get(&free_tx, K_NO_WAIT); | |
| } | |
| if (IS_ENABLED(CONFIG_BT_CONN_LOG_LEVEL_DBG)) { | |
| struct bt_conn_tx *tx = k_fifo_get(&free_tx, K_NO_WAIT); | |
| if (tx) { | |
| return tx; | |
| } | |
| LOG_WRN("Unable to get an immediate free conn_tx"); | |
| } | |
| return k_fifo_get(&free_tx, K_FOREVER); | |
| } | |
Metadata
Metadata
Assignees
Labels
area: Bluetooth HostBluetooth Host (excluding BR/EDR)Bluetooth Host (excluding BR/EDR)bugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug