lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] pbuf handling / possible bug?


From: Michael Steinberg
Subject: [lwip-users] pbuf handling / possible bug?
Date: Tue, 4 Aug 2015 18:40:53 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hello,

during my implementation of a zero copy port to stm32f4 I ran into some
difficulties. As in presumably all implementations, a dma chain/ring is
used to exchance data with the MAC core. I do fill the related dma
descriptors with lwip pbufs (well, custom buffers, read below). However
a situation might arise, when there is no pbuf left when a receive dma
descriptor shall be "rearmed". I could not find a mechanism where lwip
notifies me that a lwip-pbuf is available again, so I think I would have
to poll lwip for buffers, which is out of question. That's why I felt I
had to use custom pbufs, because through the custom pbuf deleter
functions I am notified in such situations. (Please correct me if I'm
wrong alltogether, I would gladly like to use lwips standard buffers,
because currently I have to manage a second "heap-like" buffer ring of
custom pbufs because of that). Now during my custom pbuf usage I ran
across situations, were lwip would call mem_trim or other such
functions, not checking for whether the custom-pbuf-flag is set. A
notable occasion would f.e. be in line "pbuf.c":417. In my eyes it might
be a lot clearer if custom pbufs are not indicated by a flag bit, but by
their own type maybe?

Kind Regards,
Michael





reply via email to

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