Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


UDP Fragmentation

Posted by trob76 on October 10, 2015

Is there any support for fragmented outgoing UDP datagrams? I see a #define in FreeRTOS IPCOnfig.h, but nothing more.

UDP Fragmentation

Posted by heinbali01 on October 10, 2015

Hi Andrew,

In the earlier +UDP library ( freertos.org/udp ) there was limited support for fragmentation.

The define ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is still seen in some comment in +TCP, but that should have been removed. Support for packet fragmentation was stopped because it adds a lot of complexity, and people use it rarely (we thought).

If your project only uses UDP you might want to consider using +UDP:


Can you tell why fragmentation would be interesting or useful? What does your platform look like, CPU and memories?


UDP Fragmentation

Posted by trob76 on October 13, 2015

I will look at this source and try to merge it into what I have. The fragmentation of outgoing packets is a requirement. I am sure that I can't avoid it. We are transferring a large datagram that needs to be assembled by the listener as a single coherent datagram. The size will require a parsing into fragmented packets, since the largest MTU is 1500 bytes.

The hardware is a Xilinx Zynq with standard memory. (~0.5GB).

UDP Fragmentation

Posted by trob76 on October 13, 2015



Regards, Andrew

UDP Fragmentation

Posted by trob76 on October 21, 2015

There is a problem with the +UDP code. Fragmented packets are not sent. This cause is that In the beginning of emacpssendmessage there is a call to xValidLength. This tests the pxNetworkBuffer-> xDataLength. The length is 0x5F8 when a fragmented packet is sent and the max is 0x5F2. The size pass to the IP task is 0x5CE. This is the paload plus the size of a IP header and a UDP header. Later another 28 is added for the size of the headers. I'm confused. Is the code trustworthy? The buffer is passed to the IP task via xStackTxEvent.pvData = pxNetworkBuffer; The headers are part of this, right? Why tell the emac HW an inflated length?

UDP Fragmentation

Posted by trob76 on October 21, 2015

Never mind = It was an error in my code - thanks.

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

Version 10.1.0 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner