Hello,
I am currently working with the example code for the ethernet slice and the SliceKit XL216 (AN00120_100Mbit_ethernet_demo).
I modified the example to have an option to see the rx datarate. I am now sending large 1500 Byte UDP packages towards the SliceKit at full speed and the slicekit is just counting the received data. This works quite good until I have to do more in the packet_ready() case. Then I seen just not to get a notification via the packet_ready() anymore. The program ist still working and is able to send, but receiving is not possible.
I added the icmp.xc of the mentioned example project (just minor changes made to show the problem). To simulate work to do, I just added a wait function. If I just wait for the timer to cout 100u it keeps working, but at 1000u it is stopping to work after a short time. I use a python script to send the packages.
Ethernet RX fails at fast and large transmissions
-
- Junior Member
- Posts: 4
- Joined: Thu Nov 24, 2016 11:25 am
Ethernet RX fails at fast and large transmissions
You do not have the required permissions to view the files attached to this post.
-
- XCore Addict
- Posts: 230
- Joined: Wed Mar 10, 2010 12:46 pm
Hi isengard412,
Thanks for reporting this issue. I will try to reproduce it and see whether I can get to the bottom of the issue.
Regards,
Peter
Thanks for reporting this issue. I will try to reproduce it and see whether I can get to the bottom of the issue.
Regards,
Peter
-
- Junior Member
- Posts: 4
- Joined: Thu Nov 24, 2016 11:25 am
In the GitHub repository of the lib_ethernet I found two known issues referring to clients becomming unresponsive (https://github.com/xmos/lib_ethernet/issues). Maybe the RX problems and these issues are somehow linked.
-
- Member
- Posts: 9
- Joined: Thu Sep 08, 2016 11:27 am
Hi isengard412,
After running the code provided (with the latest version of lib_ethernet from XMOS' GitHub), I couldn't see the failures you were talking about. However I did have some issues with the Python program.
I think it would be worth double checking that the packets are definitely being sent (best program I've found is Wireshark) over the correct interface. It may also be worth putting a print statement in the while(1) loop in the Python code to see if it falters for any reason.
Cheers,
Louis
After running the code provided (with the latest version of lib_ethernet from XMOS' GitHub), I couldn't see the failures you were talking about. However I did have some issues with the Python program.
I think it would be worth double checking that the packets are definitely being sent (best program I've found is Wireshark) over the correct interface. It may also be worth putting a print statement in the while(1) loop in the Python code to see if it falters for any reason.
Cheers,
Louis
-
- Junior Member
- Posts: 4
- Joined: Thu Nov 24, 2016 11:25 am
I still have the problem. Sometimes it takes 1-2 minutes until the error occurs.louis wrote:Hi isengard412,
After running the code provided (with the latest version of lib_ethernet from XMOS' GitHub), I couldn't see the failures you were talking about. However I did have some issues with the Python program.
I think it would be worth double checking that the packets are definitely being sent (best program I've found is Wireshark) over the correct interface. It may also be worth putting a print statement in the while(1) loop in the Python code to see if it falters for any reason.
Cheers,
Louis
After having a look at the lib_ethernet, I think the problem has to be in the communication between "mii_lite_interrupt.S" and "mii_lite_lld.S". If the buffer is full, a package is dropped by reusing the same buffer with these commands:
Code: Select all
ldw r11, r0[next_buffer] //load last byte of last packet
add r11, r11, 1 //increment register 11 to detect true if next buffer ready
bt r11, buffers_available //branch relative if true
out res[r3], r1 // Reuse this buffer - drop current packet.
ldw r3, r0[mii_packets_overran]
add r3, r3, 1
stw r3, r0[mii_packets_overran]
bu return_from_interrupt
We really need to get this working as we need a stable ethernet connection for our product. If we really want to use the XMOS chip, we need to be sure that enthernet will be working without lags or other problems.
-
- Junior Member
- Posts: 4
- Joined: Thu Nov 24, 2016 11:25 am
I already use wiresharc to check the packages and use the newest lib_ethernet version from the GitHub. The python program keeps on sending and the chip stops receiving. Even with a print inside I have this problem. Was my example code working on Your X-Core200 SliceKit with these around 97Mbit/s max.?
On full speed I get an Output like this. The exact position, where the chip stops receiving changes each time a bit. WireSharc keeps showing huge amounts of packages being send from the python script towards the xmos:
If I slow my python loop down with a time.sleep(0.001) it keeps on working stable
On full speed I get an Output like this. The exact position, where the chip stops receiving changes each time a bit. WireSharc keeps showing huge amounts of packages being send from the python script towards the xmos:
Code: Select all
RX: 3 Kbit/s
RX: 4 Kbit/s
RX: 6 Kbit/s
RX: 6 Kbit/s
ARP response sent
RX: 7964 Kbit/s
RX: 86244 Kbit/s
RX: 0 Kbit/s
RX: 0 Kbit/s
RX: 0 Kbit/s
RX: 0 Kbit/s
Code: Select all
RX: 3 Kbit/s
RX: 3 Kbit/s
RX: 3 Kbit/s
RX: 13 Kbit/s
ARP response sent
RX: 459 Kbit/s
RX: 770 Kbit/s
RX: 782 Kbit/s
RX: 775 Kbit/s
RX: 784 Kbit/s
RX: 775 Kbit/s
RX: 781 Kbit/s
RX: 773 Kbit/s