Commit 18f031a
committed
[nrf fromtree] bluetooth: host: Add a check for num of bt_conn_tx and ACL/ISO bufs
After zephyrproject-rtos/zephyr#72090, each
packet to be sent (wether ACL or ISO data) has a corresponding
`bt_conn_tx` object, regardless of whether a callback is used.
This means that number of packets Host can send to Controller is limited
by the smaller of two values: ACL/ISO packets Controller can receive,
and the number of `bt_conn_tx` objects allocated by Host.
A mismatch between these numbers may lead to inefficient resource usage
on either Host or Controller side. If Host allocates fewer `bt_conn_tx`
objects than the number of buffers available on Controller for a given
data type, some Controller buffers may go unused. Conversely, if Host
allocates more `bt_conn_tx` objects than Controller can consume, the
excess objects remain unused.
This commit adds a check and issues a warning if the number of
`bt_conn_tx` objects is not aligned with the number of ACL/ISO buffers
reported by Controller via the LE Read Buffer Size v1 or v2 command.
Signed-off-by: Pavel Vasilyev <[email protected]>
(cherry picked from commit ddeeecd)1 parent 085b8ea commit 18f031a
1 file changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
95 | 115 | | |
96 | 116 | | |
97 | 117 | | |
| |||
3159 | 3179 | | |
3160 | 3180 | | |
3161 | 3181 | | |
| 3182 | + | |
| 3183 | + | |
3162 | 3184 | | |
3163 | 3185 | | |
3164 | 3186 | | |
| |||
3178 | 3200 | | |
3179 | 3201 | | |
3180 | 3202 | | |
| 3203 | + | |
| 3204 | + | |
3181 | 3205 | | |
3182 | 3206 | | |
3183 | 3207 | | |
| |||
3194 | 3218 | | |
3195 | 3219 | | |
3196 | 3220 | | |
| 3221 | + | |
| 3222 | + | |
3197 | 3223 | | |
3198 | 3224 | | |
3199 | 3225 | | |
| |||
0 commit comments