Commit 7c6593d
committed
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]>1 parent 684fe9d commit 7c6593d
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 | | |
| |||
3150 | 3170 | | |
3151 | 3171 | | |
3152 | 3172 | | |
| 3173 | + | |
| 3174 | + | |
3153 | 3175 | | |
3154 | 3176 | | |
3155 | 3177 | | |
| |||
3169 | 3191 | | |
3170 | 3192 | | |
3171 | 3193 | | |
| 3194 | + | |
| 3195 | + | |
3172 | 3196 | | |
3173 | 3197 | | |
3174 | 3198 | | |
| |||
3185 | 3209 | | |
3186 | 3210 | | |
3187 | 3211 | | |
| 3212 | + | |
| 3213 | + | |
3188 | 3214 | | |
3189 | 3215 | | |
3190 | 3216 | | |
| |||
0 commit comments