Re: [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support

2018-10-10 Thread Bin Meng
Hi Simon,

On Wed, Oct 10, 2018 at 12:20 AM Simon Glass  wrote:
>
> Hi Bin,
>
> On 4 October 2018 at 01:00, Bin Meng  wrote:
> > Hi Simon,
> >
> > On Tue, Oct 2, 2018 at 7:22 PM Simon Glass  wrote:
> >>
> >> Hi,
> >>
> >> On 27 September 2018 at 15:19, Tuomas Tynkkynen  
> >> wrote:
> >> > Hi Simon,
> >> >
> >> > On 09/27/2018 04:43 PM, Simon Glass wrote:
> >> > ...
> >> >>
> >> >>
> >> >> How does this all get tested? Could we have a simple sandbox driver?
> >> >>
> >> >
> >> > We can switch the Travis-CI jobs for the QEMU boards to use virtio-net
> >> > instead of the current network cards for the TFTP tests. I don't know
> >> > if there are pytest equivalents for block devices.
> >>
> >> We do actually have sandbox block devices and can add anything that is
> >> needed. While qemu is helpful, I much prefer tests that run with 'make
> >> tests'.
> >
> > I had a look at the testing on sandbox. It looks to me that we need
> > introduce a non-existent virtio transport sandbox emulator to support
> > this. I am not sure this is worth to do so. As Tuomas mentioned we can
> > setup travis-ci to test on qemu targets.
>
> I would like to have at least some basic testing of each uclass within
> U-Boot without relying on qemu, which after all is a much more
> complicated test. We have created simple sandbox drivers other
> uclasses and I don't see a good reason why virtio should be different?
> There are only 11 methods in the uclass so it should not be a huge
> amount of work to call each one. I certainly understand the burden of
> this, but I think it will pay off.
>

OK, will try to add a simple virtio sandbox driver to validate the API usage.

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support

2018-10-09 Thread Simon Glass
Hi Bin,

On 4 October 2018 at 01:00, Bin Meng  wrote:
> Hi Simon,
>
> On Tue, Oct 2, 2018 at 7:22 PM Simon Glass  wrote:
>>
>> Hi,
>>
>> On 27 September 2018 at 15:19, Tuomas Tynkkynen  
>> wrote:
>> > Hi Simon,
>> >
>> > On 09/27/2018 04:43 PM, Simon Glass wrote:
>> > ...
>> >>
>> >>
>> >> How does this all get tested? Could we have a simple sandbox driver?
>> >>
>> >
>> > We can switch the Travis-CI jobs for the QEMU boards to use virtio-net
>> > instead of the current network cards for the TFTP tests. I don't know
>> > if there are pytest equivalents for block devices.
>>
>> We do actually have sandbox block devices and can add anything that is
>> needed. While qemu is helpful, I much prefer tests that run with 'make
>> tests'.
>
> I had a look at the testing on sandbox. It looks to me that we need
> introduce a non-existent virtio transport sandbox emulator to support
> this. I am not sure this is worth to do so. As Tuomas mentioned we can
> setup travis-ci to test on qemu targets.

I would like to have at least some basic testing of each uclass within
U-Boot without relying on qemu, which after all is a much more
complicated test. We have created simple sandbox drivers other
uclasses and I don't see a good reason why virtio should be different?
There are only 11 methods in the uclass so it should not be a huge
amount of work to call each one. I certainly understand the burden of
this, but I think it will pay off.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support

2018-10-04 Thread Bin Meng
Hi Simon,

On Tue, Oct 2, 2018 at 7:22 PM Simon Glass  wrote:
>
> Hi,
>
> On 27 September 2018 at 15:19, Tuomas Tynkkynen  
> wrote:
> > Hi Simon,
> >
> > On 09/27/2018 04:43 PM, Simon Glass wrote:
> > ...
> >>
> >>
> >> How does this all get tested? Could we have a simple sandbox driver?
> >>
> >
> > We can switch the Travis-CI jobs for the QEMU boards to use virtio-net
> > instead of the current network cards for the TFTP tests. I don't know
> > if there are pytest equivalents for block devices.
>
> We do actually have sandbox block devices and can add anything that is
> needed. While qemu is helpful, I much prefer tests that run with 'make
> tests'.

I had a look at the testing on sandbox. It looks to me that we need
introduce a non-existent virtio transport sandbox emulator to support
this. I am not sure this is worth to do so. As Tuomas mentioned we can
setup travis-ci to test on qemu targets.

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support

2018-10-02 Thread Simon Glass
Hi,

On 27 September 2018 at 15:19, Tuomas Tynkkynen  wrote:
> Hi Simon,
>
> On 09/27/2018 04:43 PM, Simon Glass wrote:
> ...
>>
>>
>> How does this all get tested? Could we have a simple sandbox driver?
>>
>
> We can switch the Travis-CI jobs for the QEMU boards to use virtio-net
> instead of the current network cards for the TFTP tests. I don't know
> if there are pytest equivalents for block devices.

We do actually have sandbox block devices and can add anything that is
needed. While qemu is helpful, I much prefer tests that run with 'make
tests'.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support

2018-09-27 Thread Tuomas Tynkkynen

Hi Simon,

On 09/27/2018 04:43 PM, Simon Glass wrote:
...


How does this all get tested? Could we have a simple sandbox driver?



We can switch the Travis-CI jobs for the QEMU boards to use virtio-net
instead of the current network cards for the TFTP tests. I don't know
if there are pytest equivalents for block devices.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support

2018-09-27 Thread Simon Glass
Hi Bin,

On 23 September 2018 at 06:41, Bin Meng  wrote:
> This series brings in VirtIO driver support in U-Boot. The work is based
> on Tuomas's virtio support on QEMU ARM targets.
>
> VirtIO is a virtualization standard for network and disk device drivers
> where just the guest's device driver "knows" it is running in a virtual
> environment, and cooperates with the hypervisor. This enables guests to
> get high performance network and disk operations, and gives most of the
> performance benefits of paravirtualization. In the U-Boot case, the
> guest is U-Boot itself, while the virtual environment are normally QEMU
> targets like ARM, RISC-V and x86.
>
> Both VirtIO MMIO and PCI transport options are supported. Only VirtIO
> network and block device drivers are supported for now.
>
> The following QEMU targets are supported.
>
>   - qemu_arm_defconfig
>   - qemu_arm64_defconfig
>   - qemu-riscv32_defconfig
>   - qemu-riscv64_defconfig
>   - qemu-x86_defconfig
>   - qemu-x86_64_defconfig
>
> A new child_post_probe() uclass driver method is introduced to better
> support virtio device driver. This also changes BLK uclass driver to
> supply a post_probe() method which calls part_init(), so that we can
> avoid duplicating such call in every BLK driver.
>
> Not every checkpatch warning reported was fixed, but I tried to fix as
> many as possible which makes sense.
>
> This series needs to be applied after the risc-v QEMU series is applied.
>
> This series is available at u-boot-x86/virtio-working for testing.
> Note the branch already contains the risc-v QEMU series plus one network
> stack fix to make virtio-net driver happy.
>

Looks like a very nice implementation.

How does this all get tested? Could we have a simple sandbox driver?

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot