lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] PBUF_RAM allocation


From: Amena El Homsi
Subject: [lwip-users] PBUF_RAM allocation
Date: Thu, 28 Jun 2018 15:14:55 +0300

Hi,

For PBUF_RAM type, LwIP mentions that "struct pbuf and its payload are allocated in one piece of contiguous memory (so the first payload byte can be calculated from struct pbuf)."

What If the pbuf structure is in place and the payload is in another place (non-contiguous)? Is there any issue if I allocate the pbuf structure from the pools and I set p->payload to point to the data in the frame memory?

In the SoC, we have data memory and frame memory. and we have our own memory management unit (MMU). I updated pbuf_alloc(), when the type is PBUF_RAM, to allocate a pbuf stucture only from the lwIP pools, and calls the MMU to allocate memory to the frame, then I set p->payload to the frame pointer.

I am able to send and receive ARPs, pings, and DHCP messeages. 

Are there specific cases where this procedure will not work correctly?

Thanks,
Amena
--

Amena El-Homsi
Computer & Communication Engineer
Dipl. Eng,  M.S.

reply via email to

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