lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Problems with sending UDP packets in FreeRTOS


From: Mike Fleetwood
Subject: Re: [lwip-users] Problems with sending UDP packets in FreeRTOS
Date: Thu, 28 Jul 2016 11:27:24 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Simon + Noam,

There is no ARP activity after the first packet is sent. The current software sends to IP_ADDR_BROADCAST, so presumably doesn't generate any ARP anyway?

I'm sending data packets every 4mS, so certainly won't be able to queue 5 seconds-worth.

My software checks for success in buffer creation and allocation before continuing, so should not get to the send function if there was not enough memory left for the packet buffer. I would get warnings on my "status page" (if HTTP was enabled), but this is not happening. Also, the GPIO toggle markers would indicate if the send was skipped due to lack of memory etc.

Many thanks,

Mike.


On 28/07/2016 10:56, Noam Weissman wrote:
Hi Simon,

I had this problem long ago and as far as I remember packets were not freed
Or that the sending rate was high and eventually it got into no memory.

As you wrote unsent UDP packets will be freed after 5 seconds but if you send a 
packet
every 100ms or so and only have 20-30 buffers 5 seconds will not solve the 
error.

BR,
Noam.

-----Original Message-----
From: lwip-users [mailto:address@hidden On Behalf Of Simon Goldschmidt
Sent: Thursday, July 28, 2016 12:22 PM
To: address@hidden
Subject: Re: [lwip-users] Problems with sending UDP packets in FreeRTOS

Noam Weissman wrote:
The reason is that if you send data to a wrong IP or domain and TCP
stack does not have the destination MAC address so it will issue ARP
messages. What if the ARP message fails ?... The TCP stack does not
know where to send the UDP packets. As a result if you continue to
send UDP packets they are added to the waiting packets to be sent. They are 
never sent, memory is not freed and eventually you are without memory !!
This is *not* true for lwIP. Pending (unresolved) ARP entries get removed after 
5 seconds.
Queued packets will be freed on removal. If this shouldn't work, please file a 
bug!


Simon

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

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


--
FACE Systems Ltd
The Old Boat House
Cadgwith
Cornwall TR12 7JX
T:01326 291031
M:07831 401464




reply via email to

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