ZipCPU / openarty

An Open Source configuration of the Arty platform
119 stars 24 forks source link

Assert condition triggers under network load in networking demo #3

Closed tomtor closed 5 years ago

tomtor commented 5 years ago

this condition: https://github.com/ZipCPU/openarty/blob/9fd140f016e26aab40fb1dc75812b08f01747a88/sw/board/simple_ping.c#L454

triggers when running a stress test on a Linux host:

sudo ping -f arty-ip

It takes on average about 30 minutes and many millions of pings.

picv has value 80505580

ZipCPU commented 5 years ago

Wow, I'm impressed! The file in question was never meant to handle a stress test. I'm pleased to see that it's done so well. To properly handle the stress test, the software will need to be rewritten to use FIFO's and to control packet drop. As of today, it doesn't do that. Dan

ZipCPU commented 5 years ago

Were you using any particular piece of software to do the networking stress test? It might be fun to re-tool things for a higher stress network environment.

tomtor commented 5 years ago

@ZipCPU I simply used ping -f to reproduce the error, but I also adapted the demo program to echo UDP requests which I sent from a python program on the Linux host, see https://github.com/tomtor/openarty/blob/Arty100/sw/board/simple_ping.c I also added a reset to recover from the error condition, so that I can reliably use the OpenArty setup in a network context when needed.

Note that I started this because the Xilinx Microblaze LWIP echo server demo is also unreliable when under stress on my Arty-A7. The ethernet driver gets out of sync eventually and keeps the last packet buffered when sending, I could not find the root cause for this. I switched to an Arty-Z7 with Gigabit ethernet and embedded ARM for fast and reliable networking.