Embedded Linux on Zynq 7000, discarding almost all UDP packets

I work with the Xilinx Linux distribution on the Zynq 7000 board. It has two ARM processors, some L2 cache, DRAM interface and a lot of FPGA fabric. Our device collects data processed by the FPGA, and then sends it over a gigabit network to other systems.

One of the services we need to support on this device is SNMP, which uses UDP datagrams, and although SNMP supports TCP, we cannot force clients to use this.

What I find is that this system loses almost all SNMP requests.

It is important to note that neither the network nor the CPU are overloaded. The data transfer speed is not particularly high, and processors usually make up about 30% of the load. In addition, we use the SNMP ++ and Agent ++ libraries for SNMP, so we have control over them, so this is not a problem with breaking the system daemon. However, if we stop processing and network activity, SNMP requests are not lost. SNMP is processed in its own stream, and we made sure that requests were rare and scattered, so in fact there should be no more than one request buffered at any given time. With low CPU utilization, there should be no problem with contextual switching to the receiving process to serve the request.

Since this is not a processor or Ethernet bandwidth issue, I think the problem is with the Linux kernel. Despite the low network load, I assume that the buffers with the limited network stack are full, which is why it removes UDP datagrams.

When searching in this case, I find examples of how to use netstat to send lost packets, but this does not work on this system because there is no ā€œ-sā€ option. How can I control these packet drops? How can I diagnose the cause? How to configure kernel parameters to minimize this loss?

Thanks!

+6
source share
1 answer

Wireshark or tcpdump is a good approach. You can look at the settings in / proc / sys / net / ipv4 / or try the older kernel (3.x instead of 4.x). We had a problem with tcp connections on Zynq with the 4.4 kernel, but this could be seen in the system logs (warning about SYN files and possible flooding).

+3
source

All Articles