Commit Graph

12 Commits

Author SHA1 Message Date
Grissiom 1ebf7b5196 [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.
2021-09-11 13:11:57 +08:00
Meco Man 396297a993 [ethernetif] replace rt_memcpy with SMEMCPY 2021-08-03 10:33:17 +08:00
liuxianliang 962a97b683 [restore] Restore format 2021-04-15 12:50:54 +08:00
liuxianliang ad9c4ea15b [restore] Restore format 2021-04-15 12:43:56 +08:00
liuxianliang 3db7a98a18 [update] change the file encoding to UTF-8. 2021-04-06 11:41:14 +08:00
liuxianliang 2b549d93c8 [fix] change from enter critical area into disable interrupt. 2021-04-06 10:46:31 +08:00
liuxianliang 4431c4796f [fix] remove the possible critical zone risk 2021-03-31 14:59:12 +08:00
liuxianliang 154d73a4e7 [fix] iperf speed test have been stable. 2021-03-31 13:37:19 +08:00
liuxianliang adaa45eebe [fix] the overflow problem of lwip rx thread mailbox. 2021-03-26 10:04:37 +08:00
David Lin 4f99d988d9
Update ethernetif.c 2020-11-21 12:35:19 +08:00
liuduanfei 13e768203d
delete duplicate header files 2020-06-28 23:20:31 +08:00
liuxianliang de1fd2bfc4 [add] lwIP 2.1.2 transplantation on RT-Thread.
Signed-off-by: liuxianliang <liuxianliang@rt-thread.com>
2020-06-20 14:01:09 +08:00