Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
89 user(s) are online (37 user(s) are browsing Forums)

Members: 1
Guests: 88

skynet, more...

Support us!

Headlines

 
  Register To Post  

working virtio-net.device for QEMU : no more issues with rtl drivers !
Home away from home
Home away from home


See User information
@All
So happy to share that i have working virtio-net.device for amigaos4/qemu, so you have no more needs to tinker with rtl device issues !

Big thanks coming to derfs who made a base for that with his virtioSCSI.device, with code from which were matter of "just" add a SANA2 support and get rid of SCSI code. Also thanks to Neil Cafferkey who share his network drivers code for prism2 and atheros5000, it also help with os4 bits.

For one day it was some boring/AI cleaning to just start and make ping 127.0.0.1 to work, then bunch of crashes and issues (of course) of all sort, which were dealt only with Neil's code of drivers, then some debugging as always, and yeah !

(click to open in new tab for full sized images):

detected device in Ranger, network settings and ping of localhost

Resized Image

actually working state
Resized Image

debug split without which you can't fix a shit
Resized Image

Now all what need it is to remove debug output, check the speed (and improve if possible), and that all !

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Quite a regular
Quite a regular


See User information
@kas1e
Great news!
Thanks for your work.

If it's not a problem, could you share the binary version somewhere so that we can experiment with it?

Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Just can't stay away
Just can't stay away


See User information
@kas1e

Awesome! Great work. Can you tell us anything about the speed?

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Quite a regular
Quite a regular


See User information
@kas1e
Quote:
For one day it was some boring/AI cleaning to just start and make ping 127.0.0.1 to work, then bunch of crashes and issues (of course) of all sort, which were dealt only with Neil's code of drivers, then some debugging as always, and yeah !

So if you managed to clean AI cruft from the virtio part it's time to make that a virtio.library so others don't have to clean the other drivers one by one an won't have this code repeated in all drivers but can all use the same virtio.library so if one driver improves it all the others can benefit.

Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Home away from home
Home away from home


See User information
@all
There is first version clean of debug:
https://kas1e.mikendezign.com/aos4/qemu/virtionet_dev_v01.lha

I not sure, and i can be wrong, but it looks like it share same issues which i have with rtl ! Need to be double sure, but so far i can see how my network died after a while, and i start to have packet loss even on ping. But that of course can be easy bugs in this device, but strangely repeats same issues as with rtl .. Maybe some of you can check how it reacts on your qemus. Thanks!

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Just can't stay away
Just can't stay away


See User information
@kas1e

How is the driver integrated under Qemu, not AmigaOS 4.1? So what is the line that needs to be used?

And thank you for working on it.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Home away from home
Home away from home


See User information
@kas1e
Quote:
I not sure, and i can be wrong, but it looks like it share same issues which i have with rtl !
Did you try it with your WSL2 QEmu setup already?
Even if it's slower it may be stable as IIRC the AmigaOS 4.x RTL drivers are working with QEmu running on Linux and MaxOS hosts and there are only problems with (some?) Windows hosts.
It may be the same for your virtio-net.device.

Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Home away from home
Home away from home


See User information
@Maijestro
Quote:

So what is the line that needs to be used?


For virtio-net.device:
-netdev tap,id=net0,ifname=TAP0,script=no,downscript=no -device virtio-net-pci,disable-legacy=on,netdev=net0


For rtl8139.device:

-netdev tap,id=net0,ifname=TAP0,script=no,downscript=no -device rtl8139,netdev=net0


I.e. lines just exactly same, just change "rtl8139" on "virtio-net-pci,disable-legacy=on"

@joerg
Quote:

Did you try it with your WSL2 QEmu setup already?
Even if it's slower it may be stable as IIRC the AmigaOS 4.x RTL drivers are working with QEmu running on Linux and MaxOS hosts and there are only problems with (some?) Windows hosts.
It may be the same for your virtio-net.device.


Currently tried only directly on own win64 build, where it seems that once i surf a bit with odyssey, then whole stack start to acts : i tried to ping in another console same what i were able to ping normally, and have 66% of packet loss. Then reboot, and all fine. Remind me same issue i have with rtl driver , when i start to do something, it like works, and then all going to crawl. But will check on wsl2 build as well to see how it will be ..

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Quite a regular
Quite a regular


See User information
The rtl8139 AmigaOS driver author has looked at it before and also checked the emulation in QEMU and could not find any problem in either of those so it could well be the issue is somewhere else. It could be in AmigaOS common SANAII code or network stack too. That it works on real machines does not mean the AmigaOS side does not have race conditions that do not happen as long as things are slow as on real machine but could break when replies come faster than expected (sometimes instantly) on emulation that may never happen on real machines. It could also be in QEMU's Windows version as that's less tested but since all network cards use the same netdev backends in QEMU and a lot of people use those it should not be completely broken so it's more likely to be either in rtl8139 emulation (which does not seem to be the case), pegasos2 emulation (you could try with other machines to check) or somewhere on the AmigaOS side but not in other parts of QEMU.

Go to top
Re: working virtio-net.device for QEMU : no more issues with rtl drivers !
Quite a regular
Quite a regular


See User information
@kas1e
Quote:
There is first version clean of debug:..

It also freezes on Asahi Linux ARM64 (Fedora).
But it's a little different than RTL8139. Small packets still get through. On RTL8139, access is completely cut off.
Resized Image

Now my question, Roadshow (maybe a stupid one).
From what I've read, it works strangely even on real machines.
The INTERNET speed is poor. You can get some good values on the LAN.
Is there a problem there?
I don't currently know how packets are transmitted through QEMU. QEMU definitely emulates network cards, but what if a guest (AOS4 with an old TCP/IP stack) gets a “large packet” exceeding some limit (10Mb/100Mb/1Gb)? It will try to limit it, but it won't be able to handle it... will it crash?
I'm just writing theoretically - these are just my random thoughts and I may be talking nonsense.
One last thing: qemu-system-ppc and MacOS 9 PPC and Linux PPC work fine. There are no problems there.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1 12% (26)
Pegasos2 3% (8)
X5000 22% (48)
X1000 14% (30)
A1222 8% (19)
Sam 440/460 18% (40)
Classic PowerPC Amiga 2% (6)
WinUAE emulation 7% (16)
Qemu emulation 9% (21)
Total Votes: 214
The poll closed at 2025/12/1 12:00
8 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project