Commit 54ee939
arch/espressif: serialize Wi-Fi RX queue access.
Protect the common Espressif Wi-Fi netdev RX queue with a spinlock. The Wi-Fi RX callback enqueues packets while the netdev upper-half RX thread dequeues them, and the IOB queue helpers are not internally serialized.
Under sustained receive traffic that race can corrupt the queue state, strand IOBs, and degrade throughput over time as reported in issue #16915.
Initialize the lock during device setup and use it when clearing the queue on ifup, enqueueing received packets, and dequeuing them for the upper half.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>1 parent 92b8bc1 commit 54ee939
2 files changed
Lines changed: 30 additions & 2 deletions
File tree
- arch
- risc-v/src/common/espressif
- xtensa/src/common/espressif
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| 216 | + | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| |||
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
| 233 | + | |
231 | 234 | | |
| 235 | + | |
232 | 236 | | |
233 | 237 | | |
234 | 238 | | |
| |||
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
352 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
353 | 363 | | |
354 | 364 | | |
355 | 365 | | |
| |||
1008 | 1018 | | |
1009 | 1019 | | |
1010 | 1020 | | |
| 1021 | + | |
1011 | 1022 | | |
1012 | 1023 | | |
1013 | 1024 | | |
| |||
1025 | 1036 | | |
1026 | 1037 | | |
1027 | 1038 | | |
| 1039 | + | |
1028 | 1040 | | |
| 1041 | + | |
1029 | 1042 | | |
1030 | 1043 | | |
1031 | 1044 | | |
| |||
1221 | 1234 | | |
1222 | 1235 | | |
1223 | 1236 | | |
| 1237 | + | |
1224 | 1238 | | |
1225 | 1239 | | |
1226 | 1240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| 216 | + | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| |||
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
| 233 | + | |
231 | 234 | | |
| 235 | + | |
232 | 236 | | |
233 | 237 | | |
234 | 238 | | |
| |||
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
352 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
353 | 363 | | |
354 | 364 | | |
355 | 365 | | |
| |||
1008 | 1018 | | |
1009 | 1019 | | |
1010 | 1020 | | |
| 1021 | + | |
1011 | 1022 | | |
1012 | 1023 | | |
1013 | 1024 | | |
| |||
1025 | 1036 | | |
1026 | 1037 | | |
1027 | 1038 | | |
| 1039 | + | |
1028 | 1040 | | |
| 1041 | + | |
1029 | 1042 | | |
1030 | 1043 | | |
1031 | 1044 | | |
| |||
1224 | 1237 | | |
1225 | 1238 | | |
1226 | 1239 | | |
| 1240 | + | |
1227 | 1241 | | |
1228 | 1242 | | |
1229 | 1243 | | |
| |||
0 commit comments