lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Timing problem on UDP sending


From: address@hidden
Subject: Re: [lwip-users] Timing problem on UDP sending
Date: Wed, 01 Oct 2008 16:40:52 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

I'm sorry to say that this is a known issue and we have an open task for this: http://savannah.nongnu.org/task/?7896
The two possible workaraounds for now are.
a) block until the packet is sent
b) do a memcpy into non-volatile memory before enqueueing in the MAC

This problem currently only affects UDP (with ALL APIs - raw API as well) since TCP must preserve data much longer.
A solution for this is not yet found :-(

Simon



Muhamad Ikhwan Ismail wrote:


Hi guys,

I have observed the following :

1.I do send() on a UDP socket, which then post the reference to data into the socket layer.
The application thread then blocks on the semaphore op_completed.

2.The TCPIP thread then checks the mailbox and starts preparing the packet and queue the reference in the Ethernet buffer descriptor ring for transmission.Since the ring buffer descriptor is rather full the packet
cannot be transmitted at that exact moment by the MAC.

3. The TCPIP thread returns to the point where the semaphore is triggered. It then blocks and there
is a task change and the application thread is now running.

4. The application thread now rewrites the same data which was not yet sent. Hence the previous data packet are corrupted.

This only happens when we have high frequency sending and only with UDP since TCP copies all the data into the TCPIP stack. I dont know if this qualifies as a bug, I just wanted to point it out to you guys that this could happen. The workaround can easily
be done on the application layer of course.

My implementation is lwip1.3.0 on PowerPC processor

M Ikhwan Ismail


------------------------------------------------------------------------
See how Windows Mobile brings your life together—at home, work, or on the go. See Now <http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/>
------------------------------------------------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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