OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] [PATCH RFC] virtio: introduce VIRTIO_F_DEVICE_STOP



On 2020/12/25 äå11:18, Halil Pasic wrote:
On Thu, 24 Dec 2020 13:51:31 +0800
Jason Wang <jasowang@redhat.com> wrote:

On 2020/12/24 äå12:52, Halil Pasic wrote:
On Tue, 22 Dec 2020 20:51:04 +0800
Jason Wang <jasowang@redhat.com> wrote:

[..]
Each vhost devices implements its own ioctl:

For vhost-net, it's VHOST_NET_SET_BACKEND, passing -1 as socket fd will
stop the device.
For vhost-vsock, it's VHOST_VSOCK_SET_RUNNING.

I don't check SCSI but it should have something similar.

Thanks!

And since we are at virtio-net,

The feature is not net specific.

Nod.

I ask myself how are 'new requests' and
'requests that is (the device) currently processing' defined for the
receive functionality and the rx queue(s).  Remember the latter ('in
flight requests') need to be all completed. I mean 'in-flight' is pretty
straight-forward for something like virtio-blk, or even for tx but I have
a hard time with rx.

I think it should be no difference from the view of virtqueue. It's the
requests that have been read from avail ring but not added to the used ring.

Actually this ties to the visibility of virtqueue internal state.
Usually device maintains a tail pointer (last_avail_idx). So in the
simplest case when no indices wrap and no out-of-order, requests belongs
to [last_avail_idx, used_idx) are considered as in-flight.

I wouldn't call it virtqueue internal state, but I get what you mean. The
virtio specification is concerned with the device/driver interface. The
driver does not and can not differentiate between buffers that are
available but "haven't been read from avail ring", and those that have
"been read from the avail ring". As you said last_avail_idx is a device
private thing -- a device internal state.


Exactly.



I tend to say, that from a perspective of the driver, all requests that
are available, and not yet used, are in-flight. So we have to be very
careful when wording this requirement, to avoid misunderstandings. I
don't think the first RFC is good enough. I will think some more about
this.


Yes, I agree. The problem is that the spec doesn't describe how device work, so if we want to be more accurate, it might require some work not only for stop but also for e.g reset (something like in flight has been used by the spec in that case).


I'm under the impression that considering virtio console (serial)
could be useful, as it provides a reliable duplex data transfer. I.e.
some I/O is not driver initiated, but dropping packets ain't OK. So, the
data may be in flight without the virtqueue buffer being in flight
according to our latest definition ([last_avail_idx, used_idx)).


Yes.


Sorry, I have the feeling I'm spouting out half baked thoughts. Thank you
for bearing with me.


You're welcome and you comments are very helpful and appreciated.

Thanks



And IIUC,
vhost-VDPA and the vDPA parent are also on the device side. I feel like
I'm missing something essential here.
Virtio-PCI driver could be a vDPA parent as well in this case. So we
need stop the virtio-pci device.
I used to think about vdpa like a vehicle to make partial virtio support
in HW viable and easy. I.e. when I hear vdpa I have something like this
in mind:
https://www.redhat.com/cms/managed-files/2019-10-02-vdpa-figure5.jpg

Of course the 'physical nic' from the linked picture can be a nic that
supports both the virtio data plane and the virtio control plane (i.e.
what you are referring to as a virtio-pci device). But do we still expect
that device to be connected via vdpa?

Why not?[1] With the help of vhost-vDPA, we get the wire speed and live
migration support for virtio-pci device.
Indeed.


The second question is not strictly on topic, but I'm still curious, what
do we plan to do with a lower device that does not support virtio control
plane?

Yes, the vDPA device just need to implement the same semantic not the
same interface. You may refer mlx5e vDPA driver in the kernel source.
Thanks! I will have a look.

Regards,
Halil

[..]




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]