diff options
| author | Grissiom <[email protected]> | 2021-09-11 13:11:57 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2021-09-11 13:11:57 +0800 |
| commit | 1ebf7b5196b069c9efefe558d5b5abf492244511 (patch) | |
| tree | cd3eaf02e65c859f49ea77afa6f3c2882ab350fa /components/drivers/include | |
| parent | 6af6a88d33546b097b6103dc8250f6f7c8d417b9 (diff) | |
[Netif] Fix the eth_tx_msg protection
The ethernetif use semaphore netif->tx_ack to protect the local variable
`struct eth_tx_msg msg` in function `ethernetif_linkoutput`. But the
function could be called in multiple context: LwIP "tcpip" thread, "erx"
thread(on linkup) and any user thread that call `udp_sendto`. So the
global semaphore protection is not sufficient. It could only wakeup the
top priority waiting thread instead of the thread that owns the `msg`
and may result the `msg` next in the mailbox got destructed.
So to use a `rt_completion` within the `struct eth_tx_msg` and
synchronize on that. This could deal the ownership issue in an easy way.
Diffstat (limited to 'components/drivers/include')
0 files changed, 0 insertions, 0 deletions
