LWiP priority to UDP - performance issues iMxRT106x FreeRTOS LWiP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LWiP priority to UDP - performance issues iMxRT106x FreeRTOS LWiP

1,230 Views
avbot
Contributor III

We need to send and receive UDP with high priority and high bandwidth (50Mbps in Rx and 5Mbps in Tx).
We also are using TCP and MQTT - but these are not real-time critical.

We notice that when we enable TCP and MQTT threads the performance of UDP drops (delayed packet arrival to our netconn_recv routine). 

Every time a new TCP connection is initiated by an external client, or whenever MQTT polls for an external broker we get this performance issue.

Here are our freeRtos priorities...

sys_thread_new("udpecho_thread", udpecho_thread, NULL, TASK_STACKSIZE_UDP, 8);
sys_thread_new("tcpecho_thread", tcpecho_thread, NULL, TASK_STACKSIZE_TCP, 4);

Is there a way to prioritize UPD packets over TCP at a lower level?


0 Kudos
2 Replies

1,205 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi @avbot :

 

If you are using RT1170, and RT1170 has two ENET peripherals and one of them, ENET QoS, allows to have prioritized queues. 

For RT106x, no ENET QoS .

 

In your case,

sys_thread_new("udpecho_thread", udpecho_thread, NULL, TASK_STACKSIZE_UDP, 8);
sys_thread_new("tcpecho_thread", tcpecho_thread, NULL, TASK_STACKSIZE_TCP, 4);

 

Though udpecho thread has higher priority,  all the enet packets go through tcpip_thread at the end and packets are sent and received serially.

I think the TCP acknowledge is sent by the tcpip_thread, before the packet gets to tcpecho_thread.

 

I would suggest you try to set TCP WND as low as possible, maybe it could make the remote TCP sender to slow down.

 

Regards

Daniel

 

0 Kudos

1,156 Views
avbot
Contributor III

About RT1170 do you know if the two ENET periphs can act as network switch? I.E traffic pass through from one external port through the 1170 to the second external port... and also allow 1170 to send and receive packets. If so do you know if there is example code for this somewhere? 

0 Kudos