[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] asynchronous transmissions
From: |
Adrian Godwin |
Subject: |
[lwip-users] asynchronous transmissions |
Date: |
Thu, 16 Jun 2005 15:02:35 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Lwip expects pbufs to have been used when the ip output routine
has completed, so that they can be freed if necessary. The ARP
mechanism, which might delay transmission while an ARP response
is obtained, copies the pbuf in order to achieve this.
I'm using lwip with an ethernet driver that accepts a chain of
buffers and executes a callback when the last has been sent.
I could either :
1. Copy the pbufs with pbuf_take and then transmit the copies
2. Wait for completion of transmission (a semaphore on
the callback) before returning from the output routine.
Either of these is less efficient than the driver allows,
which seems a shame. I'd prefer to :
3. Increase the reference count to the pbuf chain and
free it in the callback. But presumably if this were
possible, the ARP queue would do it, too.
Can anyone suggest a better method, please ?
-adrian