Update virtio network driver

Pavel Pisa ppisa4lists at pikron.com
Tue Nov 15 10:29:05 UTC 2016


Hello Jin-Hyun,

thanks for update.

I have returned from my USA holydays now and catching up
with e-mails and work backlogs.

On Thursday 10 of November 2016 10:42:34 Jinhyun wrote:
> Hi, all!
>
> We removed our RTEMS-virtio driver's dependencies on architecture. We used
> built-in function of gcc, __sync_synchronize(). This function generates
> proper memory barrier for target architecture on compile time. In addition,
> we replaced pcib_conf_read/write functions to pci_read/write_config
> functions. We added several lines of codes for exception handling suggested
> by Pavel Pisa. Thank you, Pavel Pisa. As we removed dependencies on CPU
> architectures, we moved the virtio source directory located at
> c/src/lib/libbsp/i386/pc386/ to c/src/lib/libbsp/shared.

I have done some updates and testing of your work some time ago.
I think I reported that but I am not 100% sure. Please,
look if some changes in my WIP branch are of some use for you

https://github.com/ppisa/rtems/commits/devel-virtio

As for RTEMS_COMPILER_MEMORY_BARRIER() suggested by Gedare,
I am not sure if it is enough in some places.
VirtIO is PCI like device and compiler barrier would
work if the hypervisor places data into shared
buffer from the same CPU. If it runs on different
one in parallel with RTEMS driver (in network polled API
like mode) then real SMP barrier is more appropriate.

Best wishes,

Pavel

> We plan to enhance the virtio driver for RTEMS, and we have several
> additional patches for it. To easily manage this project from our side, we
> created Github repository. You can see the latest version of our virtio
> driver in our Github: https://github.com/sslab-konkuk/RTEMS-virtio
>
> Recently, we succeeded to test the virtio with Motorola_powerpc BSP. For
> this, we made additional modifications. Motorola_powerpc BSP doesn't
> support functions such as rtems_insterrupt_handler_install, so we used
> functions such as BSP_install_rtems_irq_handler instead of those. Moreover,
> in order to make our virtio work on PowerPC, we added initialization codes
> to virtio_pci.c because qemu_fakerom, which is the PowerPC bios of
> Motorola_powerpc BSP, doesn't initialize the virtio back-end driver. But
> some runtime error is occurred on RTEMS master branch, so we will submit
> about it again soon.
>
> Best regards,
> Jin-Hyun.


More information about the devel mailing list