The communication between DSP and Awe tool via TCP/IP stack is slower, the tuning is slower,and the audio is not expected can you guide how to achieve maximum throughput in this case
Welcome to the FreeRTOS forum, @madhu .
I miss some information before I can answer your questions.
You show part of a PCAP, in which small TCP packets are exchanged at a low speed. What’s the purpose of this stream?
I also see that device 100.64.10.15 is probably the DUT, the device running FreeRTOS+TCP. The DUT a TCP server on port on 15004. It has a WIN size of 2920, which is 2 full TCP segments.
The following is not clear:
- via TCP/IP stack is slower,
- the tuning is slower
- the audio is not expected
Slower than what? Where do you see or hear audio?
If you want to learn about TCP performance, you may try to play with iperf3.
Looking at the time stamps, it seems that the TCP thread is being starved out. You may want to revisit your task priorities.
hi @htibosch thanks for the reply,we have made the TCP/IP connection between SC59x application and the AWE Tool. While tuning AWE audio flow, communication is slower that you can see in the logs .For the driver we set the ip as 100.64.10.5 and port 15004 kept as server
For the client i.e tuning tool we kept ip as 100.64.10.15(test pc)
hi @RAc task priorities have been set accordingly
/Priorities/
#define configMAX_PRIORITIES 8
#define configTIMER_TASK_PRIORITY 6
#define configMAX_CO_ROUTINE_PRIORITIES 2
#define configMAX_API_CALL_INTERRUPT_PRIORITY 18
thanks, but not sufficient. What are the priorities of the tasks involved in your system?
You could also try running your DUT under control of tracealyzer.
@RAc This is the priority value passed to the xTaskCreate()
function when creating the TCP thread
void tcp_tuning_init(void)
{
xTaskCreate( vtcp_server_Interface, “TCP_TUNING_RX”, 5000, NULL, 6, NULL );
}
well, yes. How about all of the other threads? You may be facing a starvation issue, so we need to look at the whole picture.
@RAc Do i have to look into the tskIDLE_PRIORITY here
void tcp_stack_test(void)
{
#ifdef TEST_TCP_SEND
xTaskCreate( vTCPSendUsingStandardInterface, “TCP_TX”, TEST_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
#endif
#ifdef TEST_TCP_RECEIVE
xTaskCreate( vTCPReceivingUsingStandardInterface, “TCP_RX”, TEST_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
#endif
#ifdef TEST_UDP_SEND
xTaskCreate( vUDPSendUsingStandardInterface, “UDP_TX”, TEST_TASK_STACK_SIZE, NULL, 7, NULL );
#endif
#ifdef TEST_UDP_RECEIVE
xTaskCreate( vUDPReceivingUsingStandardInterface, “UDP_RX”, TEST_TASK_STACK_SIZE, NULL, 7, NULL );
#endif
}
what is the priority of the tcp message pump task?
@RAc #define ipconfigIP_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
try reducing the priorites of the tasks that are set to 7 down to 5 and see if that changes anything about the timing
hi @RAc @htibosch I tried commenting out all the other threads except tcp thread still facing the slower communication
Don’t understand. If you disable all of your threads, there will not be payload communication at all as some of the threads are needed to serve layer4+ communication?
@RAc I havent disabled the thread that serves communication other than that everything disabled and tried only tcp thread and the network init thread are running
But have you decreased the priority of the comm threads as suggested??? This is getting annoying. If you want help, be helpful.
@RAc As i have already mentioned clearly that i have tried the scenario you asked to reduced the priority to 5 and tcp thread priority as 7 still facing issue
No, that is neither what you wrote before (you wrote that your tcp message pump runs at pri 6) nor what I asked you to do - I asked you to reduce those pris of your OTHER tasks from 7 to 5.
Sorry, I’ll stop wasting my time now. Good luck.
Lets try to list all the tasks you have in your system and their priorities -
- IP task - Priority is 6
#define ipconfigIP_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
. vtcp_server_Interface
task - The code snippet your shared shows it at priority 6.
Please change its priority to 5.{ xTaskCreate( vtcp_server_Interface, “TCP_TUNING_RX”, 5000, NULL, 6, NULL ); }
{ xTaskCreate( vtcp_server_Interface, “TCP_TUNING_RX”, 5000, NULL, 5, NULL ); }
tcp_stack_test
tasks -
Lets change the UDP test tasks priorities to 5.void tcp_stack_test(void) { #ifdef TEST_TCP_SEND xTaskCreate( vTCPSendUsingStandardInterface, “TCP_TX”, TEST_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); #endif #ifdef TEST_TCP_RECEIVE xTaskCreate( vTCPReceivingUsingStandardInterface, “TCP_RX”, TEST_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); #endif #ifdef TEST_UDP_SEND xTaskCreate( vUDPSendUsingStandardInterface, “UDP_TX”, TEST_TASK_STACK_SIZE, NULL, 7, NULL ); #endif #ifdef TEST_UDP_RECEIVE xTaskCreate( vUDPReceivingUsingStandardInterface, “UDP_RX”, TEST_TASK_STACK_SIZE, NULL, 7, NULL ); #endif }
void tcp_stack_test(void) { #ifdef TEST_TCP_SEND xTaskCreate( vTCPSendUsingStandardInterface, “TCP_TX”, TEST_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); #endif #ifdef TEST_TCP_RECEIVE xTaskCreate( vTCPReceivingUsingStandardInterface, “TCP_RX”, TEST_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); #endif #ifdef TEST_UDP_SEND xTaskCreate( vUDPSendUsingStandardInterface, “UDP_TX”, TEST_TASK_STACK_SIZE, NULL, 5, NULL ); #endif #ifdef TEST_UDP_RECEIVE xTaskCreate( vUDPReceivingUsingStandardInterface, “UDP_RX”, TEST_TASK_STACK_SIZE, NULL, 5, NULL ); #endif }
I assume that you have disabled all the tasks other than the ones mentioned above. Would you please make the priority changes as I suggested above and share the result.
Thanks @aggarg yes, I will try and share the results