Sample Header Ad - 728x90

Is there something else I can try to fix this latency issue in the Ethernet driver?

1 vote
0 answers
49 views
I am using a PC to control a robot at 1000Hz. My machine has Ubuntu 22.04 LTS with Linux 6.7 patched with PREEMPT_RT. The machine communicates with the robot via UDP trough a point-to-point Ethernet connection (full duplex, 1000Mbps). The Ethernet cable is CAT6 (as per the robot manual) and my machine's NIC is an Intel I219-V running the e1000e driver . The control loop is a synchronous read-execute-write-sleep loop, which means that each iteration starts with a blocking read from the UDP socket and ends with a write operation on the socket. The control thread is run with an high priority of 98. As the operating frequency is 1000Hz, each iteration should start 1ms after the start of the previous one. However, I am exeperiencing latency issues while running this application, as sometimes the read operation lasts 3ms to 4ms. I captured a packet trace by using Wireshark during the control loop execution. In the following trace, the IP of the local machine is 192.168.1.2 whereas the IP of the robot is 192.168.1.1. This is the result I got: A packet trace from Wireshark showing the issue (described below) As you can see after packet #11322 is received at 10.935, the next packet #11325 is received at 10.939 (after 4ms) together with packets #11328, #11330, #11332. I also used LTTng to trace both the Linux kernel and the user-space application, and it seems that when the problem occurs, no hardware interrupt is fired by the NIC during that time delay. Therefore I suspect a problem with the network driver or the NIC firmware. In this documentation page for the e1000e driver I found out that the InterruptThrottleRate parameter can be used to configure IRQ coalescing , however setting it to 0 did not solve the issue. I wonder wether I should try with a different NIC, but I don't have a criteria to select a proper one as I still haven't figured out the exact cause of the issue.
Asked by Antonio LANGELLA (11 rep)
Mar 18, 2025, 10:30 PM
Last activity: Mar 18, 2025, 10:32 PM