Keil Logo

MDK MIDDLEWARE: Network memory pool issue with fragmented IPv4 packets


Information in this knowledgebase article applies to:

  • MDK v5.x
  • Middleware Pack v7.9.0 and older versions

SYMPTOM

Since Middleware Pack v7.9.0, IPv4 fragmentation support is added to the Middleware Network component. I have enabled the IP fragmentation option in my Net_Config_ETH_0.h and I send frequently fragmented IP packets with a total data size of a few Kbytes to my target MCU device. After the target device is up and running for a while, it seems to refuse to process and react on further incoming packets. From the network debug output I can see many errors: "MEM: Failed, limit exceeded".

What is the root cause of this issue?

CAUSE

This is an issue in the Middleware Pack v7.9.0 and older versions.

When target device receives multiple fragmented IP packets, they need to be reassembled before forwarding to the upper network layer. During this reassembly process, the memory allocation for some fragmented IP packets is not freed from the network memory pool in time. These memories are kept being allocated in the network memory pool until an internal timeout value expires. If too many fragmented IP packets are received in a short time, the memory pool will get full, so that no further data packet can be processed.

RESOLUTION

Upgrading Middleware Pack to v7.10.0 or newer versions will resolve this issue.

STATUS

This issue has been resolved in Middleware Pack v7.10.0 or newer versions.

MORE INFORMATION

Last Reviewed: Wednesday, October 9, 2019


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.