[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Interrupt-driven NIC driver with a Multi-threaded version
From: |
Dan Lewis |
Subject: |
[lwip-users] Interrupt-driven NIC driver with a Multi-threaded version of lwip |
Date: |
Wed, 08 Jan 2003 17:27:57 -0800 |
Hopefully someone can give me a bit of insight here. I've got lwip running
(multithreaded with uC/OS-II), but it seems to occassionally hang if a packet
arrives while another is being transmitted. My intuition tells me that the
cause is an unprotected critical section, and I'm not certain that my software
organization is compatible with the way lwip was intended to be used:
My Realtek RT8019AS Ethernet driver uses interrupts and uC/OS mailboxes for
synchronization: The packet write routine (within lwip) pends waiting for an
interrupt service routine to post to a mailbox when transmission of the
previous packet is complete. Incoming packets are handled by a separate thread
containing an infinite loop that pends waiting for the interrupt service
routine to post to a mailbox when a new packet arrives. Note that the interrupt
service routine only provides signaling; all transfer of data to/from the NIC
is done in threads. To prevent interference between the packet read and packet
write routines, each disables task switching (but not interrupts) while it is
talking to the NIC.
Some details: 386EX cpu running in protected mode with a flat memory model. NIC
is a RealTek RT8019AS. Using version 0.6 of lwip.
Basic question: Does lwip support this interrupt-driven approach in a
multi-threaded context?
Thanks in advance!
Dan Lewis, Chair
Computer Engineering
Santa Clara University
Email: address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] Interrupt-driven NIC driver with a Multi-threaded version of lwip,
Dan Lewis <=