lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] RFC: tcpip thread and ethernet network driver


From: Atte Kojo
Subject: [lwip-devel] RFC: tcpip thread and ethernet network driver
Date: Fri, 11 Mar 2005 10:56:32 +0200
User-agent: KMail/1.7.1

I am usig lwIP with multithreading OS which means that I need to have to 
separate threads for lwIP: one for sending data out (the tcpip_thread) and 
one for receiving data from the ethernet interface (and then passing it to 
tcpip_thread).

Is there any reason why tcpip_thread couldn't use the ethernet driver 
directly?

 I changed my tcpip_thread and ethernetif implementations so that ethernet 
driver interrupt calls tcpip_input when a packet has arrived (posting a 
message to tcpip_thread) and tcpip_thread then calls ethernetif_input to 
handle the incoming packet. Now I have one thread less to worry about and 
this change also should remedy the concurrency problems with the arp module 
mentioned in the changelog (provided that arp timer is also called from 
tcpip_thread's context).

To me calling all the TCP/IP/Ethernet related code from the context of one 
thread seems much more logical than the current approach (which, by the way, 
seems to be a source of confusion to many starters, myself included)

Any comments?

 - Atte




reply via email to

[Prev in Thread] Current Thread [Next in Thread]