XTCP ARP Bug

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
Redeye
Experienced Member
Posts: 95
Joined: Wed Aug 03, 2011 9:13 am

XTCP ARP Bug

Postby Redeye » Fri Aug 11, 2017 8:36 am

I've come across what appears to be a bug in XTCP which causes it to become unresponsive. The conditions to reproduce the bug are :

- Restart the ethernet switch (to clear any ARP caches)
- Have more than 3 XMOS devices on the network
- Using sc_ethernet v3.2.0, sc_xtcp v4.0.3
- Send a multicast message from a PC (though I don't think the multicast bit is critical) to all the XMOS devices

Each XMOS device then sends an ARP request for the PC IP address. This causes 100+ calls to the UDP_PENDING_ARP section of the code, then the XTCP stack stops responding. It doesn't reply to the multicast message that was sent, it doesn't respond to a ping. The only solution is to reboot the XMOS devices one by one.

Despite quite a lot of time spent on this I've not yet managed to figure out exactly why it becomes unresponsive which would be a good first step.

Has anybody come across anything similar or got any ideas what might be causing this?
Redeye
Experienced Member
Posts: 95
Joined: Wed Aug 03, 2011 9:13 am

Postby Redeye » Wed Aug 16, 2017 5:17 pm

Other things I've learned while investigating the cause of this :

1. This problem doesn't happen if using a the full MAC implementation rather than the raw mii implementation of sc_ethernet.
2. The full MAC implementation doesn't seem to forward multicast packets to the application any more. This works with the raw mii implementation and it worked with the full MAC implementation on v2.x of lib_ethernet

I've still not really understood what's going wrong with this ARP bug. The code gets in a big loop of UDP_PENDING_ARP waiting for an IP address for the MAC address it received a message from, then it just seems to stop sending anything at all. It doesn't crash, but it never transmits any other data on ethernet.

So that leaves me with two unresolved questions :

1. Why does the raw mii ethernet implementation stop transmitting data?
2. Why isn't the full MAC ethernet implementation receiving multicast packets even though UIP_IGMP is enabled and igmp_join_group() is called?

Return to “Development Tools and Programming”

Who is online

Users browsing this forum: No registered users and 22 guests