Quality RTOS & Embedded Software

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




Loading

performance ethernet data-rate

Posted by Bernd Schuster on November 27, 2009
Hi,

I `ve one question about the performance from freeRTOS.

At the moment I`m running a little bit in trouble because the processor is not able to get all received ethernet pkts in time (without freeRTOS everything is working fine). The whole time is only one task running, because for simplicity I don`t use any kind of delays etc.

If only 5MB/s (round about 400 pkts/sec) will be received using the dma from the processor everything is working fine; but if I increase the data-rate to 20MB/s (round about 2200 pkts/s) - I get a lot of (buffer-not-available) errors, which means that the application is not able to give the buffers back to the dma in time...

Unfortunately, the whole application (task) is very short. I only take a look if new pkts are available and give the buffers back to the dma - that`s all. There`s no delay or anything else...

Only the vPortPreemptiveTick function etc. is running every 1milliseconds - maybe this function is too slowly... and all buffers will be used... this is the only explanation for me at the moment...

for(;;)
{

j=0;

while( ( Emac_RxBufDesc[ j ].address & EMAC_RXBUF_SW_OWNED ) )

{

/* Ignoring this buffer. Mark it as free again. */

Emac_RxBufDesc[ j ].address &= ~( EMAC_RXBUF_SW_OWNED);

j++;
if(j>= BUF_MAX)
j=0;

}


Maybe someone can give me some hints to get higher data-rates working.

best regards
Bernd

Emac_RxBufDesc[ j ].address &= ~( EMAC_RXBUF_SW_OWNED );

}

RE: performance ethernet data-rate

Posted by MEdwards on November 27, 2009
I think it would help if you said which port you were using, if it is an official port or one you wrote yourself, which TCP/IP stack you are using and what you have your interrupt priorities set to.

RE: performance ethernet data-rate

Posted by Richard on November 27, 2009
I presume this is interrupt driven? If so, what are the interrupt priorities? Is this a Luminary Micro part?

RE: performance ethernet data-rate

Posted by Bernd Schuster on November 27, 2009
I`m using the AT91SAM9263 controller from Atmel running at 200 MHz (external memory interface 100MHz). I do not use any kind of TCP/IP stack at the moment. The whole task is that one below. I only search for new pkts (software owned) and give them back to the dma controller - no stack function or anything else.

I`ve interrupts installed to get noticed if a error happens... but I poll the EmacRxBufDesc[] the whole time... It sounds a little bit strange, but that`s it.

RE: performance ethernet data-rate

Posted by Bernd Schuster on November 30, 2009
I made some further tests - the interupt is fast enough to handle all the received pkts but the function looking for these pkts is too slow... If the interrupt occured 39x the function will be executed 21x.... This task has also the highest priority. Any further ideas?

I use the bsp example from freeRTOS (SAM7X_Keil_RVDS_lwIP_1.3_MM) with the semaphore to signal the task that there are new pkts received. I only search for these pkts and erase them (give them back to the dma controller), so that the dma controller is able to store some new pkts.


best regards
Bernd

RE: performance ethernet data-rate

Posted by Bernd Schuster on November 30, 2009
maybe the function xSemaphoreGiveFromISR within the isr is not the best solution (as well as it is too slow...?) for telling a task that there`s a new pkt?

RE: performance ethernet data-rate

Posted by Bernd Schuster on December 1, 2009
has anyone an idea? Using the polling-method, I didn`t get an buffer-not-available error (but that`s of course not what I want)...

It would be also possible to send someone this small project.

best regards
Bernd


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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