Fix for QEMU network driver

Releases, updates and announcements from the Ultibo team.
User avatar
Ultibo
Site Admin
Posts: 2081
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Fix for QEMU network driver

Postby Ultibo » Sat Apr 29, 2017 6:55 am

An issue was reported with the newly released SMC91X network driver to support the QEMU platform and a fix has now been committed.

The symptoms reported were that connections to the WebStatus page would sometimes take 30 seconds or more to respond while at other times the response would be immediate.

After studying the behavior it was found that in certain cases the odd byte on the end of a received packet was not being included in the data forwarded to the network subsystem and therefore the packet would be discarded due to an invalid TCP checksum. The addition of a simple change to the packet length calculation corrects the issue and no further connection delays occur.

For details of how to apply the latest source to your Ultibo core installation and rebuild your run time library see the wiki page Building from Source or watch the Building the RTL video on YouTube.

EDIT: While the reported symptoms relate to the WebStatus page, the issue could affect any received network packet for any protocol. Due to the driver being fairly new the reported case is simply the first one that appeared.
Ultibo.org | Make something amazing
https://ultibo.org
User avatar
Jyv
Posts: 158
Joined: Mon Feb 08, 2016 1:30 pm

Re: Fix for QEMU network driver

Postby Jyv » Sun Apr 30, 2017 8:33 am

No more symptoms of long polling of the webbrowser before getting a reponse for XMLRAD stack running in QEMU.
Additional notes:
When merging the differences, I see that you have not included the call to Sleep(0) at the end of TNetworkProtocol.Select()
which you provided in discussion viewtopic.php?f=10&t=566&p=3478&hilit=sleep#p3468
the same apply for TTCPProtocol.SelectCheck() not including
if (Socket.SocketState.Closed) or (Socket.SocketState.Unconnected) or (Socket.SocketState.Disconnecting) or (Socket.SocketError <> ERROR_SUCCESS) then
User avatar
Ultibo
Site Admin
Posts: 2081
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Fix for QEMU network driver

Postby Ultibo » Mon May 01, 2017 12:07 am

Thanks for the confirmation Jyv.

Jyv wrote:When merging the differences, I see that you have not included the call to Sleep(0) at the end of TNetworkProtocol.Select()

That's actually a good point, we didn't include those changes in this commit because (as noted later in that thread) we went ahead and made additional changes after the fix that was shown in order to implement event based Select() when only one socket is passed.

Those changes are much larger than the original two lines shown in the post and actually apply to multiple layers of the network stack so further testing is in order to be sure that there is no unexpected side effects.

I expect that all of that will be included in the next commit.

EDIT: These changes were included in Ultibo core 1.3.327
Ultibo.org | Make something amazing
https://ultibo.org
User avatar
Jyv
Posts: 158
Joined: Mon Feb 08, 2016 1:30 pm

Re: Fix for QEMU network driver

Postby Jyv » Mon May 01, 2017 7:56 am

I expect that all of that will be included in the next commit.


It sounds excellent. Keep up the good work.

Return to “Ultibo”

Who is online

Users browsing this forum: No registered users and 1 guest