On Wed, Nov 15, 2017 at 3:15 PM, Simon Goldschmidt <goldsi...@gmx.de> wrote:
> Amena El Homsi wrote: > > Actually I had this understanding from this link http://www.nongnu.org/ > lwip/2_0_x/group__pbuf.html > > That page says "PBUF_ROM: pbuf data is stored in ROM". Could you tell us > from which line on that page you have your understanding from? > "PBUF_ROM: no buffer memory is allocated for the pbuf, even for protocol headers. Additional headers must be prepended by allocating another pbuf and chain in to the front of the ROM pbuf. *It is assumed that the memory used is really similar to ROM in that it is immutable and will not be changed*. Memory which is dynamic should generally not be attached to PBUF_ROM pbufs. Use PBUF_REF instead." "Similar to ROM" doesn't mean it is ROM, they are similar in that it is immutable. Another link http://www.ecoscentric.com/ecospro/doc/html/ref/lwip-basics-pbufs.html says: "Note that data pointed at by a PBUF_ROM pbuf does not literally have to point at read-only memory. All it means is that the data must not change, even if control has returned to the application." > > and from the Dunkels book " Design and Implementation of the lwIP > TCP/IP Stack". > > That one is totally outdated. The stack at that time didn't handle zero > copy RX or TX correctly. > > > Thanks for your clarifying, but is there a serious problem in using > PBUF_ROM as I did? > > I tried to explain that before. Your ROM is not ROM. Data must be kept > unchanged until it is actually sent. How do you ensure this?? > Our System will take care of this, Data will be kept unchanged until it is actually sent. Headers are copied from the Pbuf_RAM to the frame memory and the whole frame will stay in frame memory until it is actually sent. > > >> Regarding your original problem: why don't you put (some of) the memp > pools into the > >> frame memory? > > I don't think this will be easy because we have our own memory manager > system and the frame memory will be used by the HW MAC and SW MAC, however > pools are managed by PBUF manager. > > It seems that I am facing a serious problem now, your suggestions are > really appreciated.. > > As I don't know your exact hardware/software setup, how could I suggest > anything more here? > > > Simon > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/lwip-users > -- Amena El-Homsi Computer & Communication Engineer Dipl. Eng, M.S.
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users