heinbali01 wrote on Thursday, June 07, 2018:
The items that you mention are part of an old demo module
Test_Code\Sockets_Test.c. I’m sorry but it has not been updated for a long time.
If I am not mistaken,
xZeroCopyBufferDescriptor_t should be:
typedef NetworkBufferDescriptor_t *xZeroCopyBufferDescriptor_t;
Note that nowadays, the initial ‘x’ would not be used for a typedef anymore, so it would become
ipconfigMAX_UDP_DATA_LENGTH indicates the length of the UDP packets that are transmitted.
FreeRTOS_GetZeroCopyBuffer() was a wrapper, it would call the function
I think it looked lke this:
BaseType_t FreeRTOS_GetZeroCopyBuffer( xZeroCopyBufferDescriptor_t *pBuffer, size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks )
*pBuffer = pxGetNetworkBufferWithDescriptor( xRequestedSizeBytes, xBlockTimeTicks );
if( *pBuffer != NULL )
xResult = pdPASS;
xResult = pdFAIL;
Zero-copy for UDP:
For UDP sockets, zero-copy means that the user doesn’t pass character buffers, but Network Buffers, which travel from the Network Interface all the way to the application (
FreeRTOS_recvfrom() ), without ever getting ( mem- ) copied.
The same for
FreeRTOS_sendto() : the user fills and sends a Network Bufferm which won’t get copied neither. If you have a zero-copy driver, the memory of the Network Buffer will be passed directly to DMA.
The actual library sources files of FreeRTOS+TCP are these nine:
I hope that they compile without too many problems. Yes we also tested it with the GCC Arm toolchain.
Max, are you sure you need the /multi version of FreeRTOS+TCP? For which platform, if I may ask?
The /multi version has support for multiple Network Interfaces, and also multiple IP-addresses. it also implements IPv6, but that part is still under construction.