lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE


From: Bill Auerbach
Subject: Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE
Date: Thu, 8 Dec 2011 08:19:44 -0500

A pbuf of PBUF_POOL_BUFSIZE is alloctated for every pbuf_alloc of PBUF_POOL. So PBUF_POOL_BUFSIZE must be the same or larger than any incoming our outgoing packet that’s going to use a pbuf_alloc to obtain a packet buffer.  I had a similar problem to yours in not adding ETH_PAD_SIZE (2) to PBUF_POOL_BUFSIZE and every pbuf_alloc for a packet had a chained pbuf with the second pbuf containing the 2 bytes.

 

PBUF_POOL_BUFSIZE doesn’t constrain the incoming our outgoing packet size – it’s the maximum size that’s going to be used for all PBUF_POOL pbuf_allocs.

 

Bill

 

 

From: address@hidden [mailto:address@hidden On Behalf Of Gary Spivey
Sent: Wednesday, December 07, 2011 5:47 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE

 

Thanks, this doesn’t yet work for me … but it does change the problem and leads me to another question that might help.

 

It appears that the buffer allocate does not give me a buffer of the size requested, but constructs a chain of buffers whose total size is what has been requested.

What I have been doing is getting the buffer address and copying the entire received Ethernet buffer into that address. With this change, it seems clear that I cannot do this, but that I have to manage the copy into this chain of buffers. Is there an lwip-provided method to do this, or do I just need to follow the chain myself? I am looking through the documentation, but I haven’t found anything yet.

 

-Gary


reply via email to

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