[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Pbuf starvation
From: |
Михаил Клещёв |
Subject: |
Re: [lwip-users] Pbuf starvation |
Date: |
Tue, 23 Jun 2009 14:53:21 +0400 |
> As I can see once the packet is processed (except if it is a reassembled
> packet), the allocated pbuf ,in which the data are stored , is freed by a
> call to pbuf_free.
That's not how it works. The pbuf (single pbuf or pbuf chain)
allocated for received packet will only be freed once it is processed
by the application. In fact, under raw API, it is application's
responsibility to call pbuf_free() for such pbufs.
> I must underline the fact that this problem doesn't occur when the network
> traffic is very low loaded. But when the network has to support a heavy
> loaded traffic, the problem appears rapidely.
You will get pbuf starvation if the application doesn't free pbufs
quickly enough for the incoming packets. That's natural, isn't it? The
application cannot handle incoming data, packets start to get dropped,
TCP slows down - that's normal.