All of lore.kernel.org
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.ibm.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
	stefanha@redhat.com, virtio-comment@lists.oasis-open.org,
	mst@redhat.com, eperezma@redhat.com, sgarzare@redhat.com
Subject: Re: [virtio-comment] [PATCH RFC] virtio: introduce VIRTIO_F_DEVICE_STOP
Date: Fri, 25 Dec 2020 04:18:11 +0100	[thread overview]
Message-ID: <20201225041811.33dbbd4b.pasic@linux.ibm.com> (raw)
In-Reply-To: <67271e1e-96ea-4b28-7449-cdb0641aff72@redhat.com>

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. 

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. 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)).

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

> 
> >
> >>> 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

[..]

This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


  reply	other threads:[~2020-12-25  3:18 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18  4:23 [virtio-comment] [PATCH RFC] virtio: introduce VIRTIO_F_DEVICE_STOP Jason Wang
2020-12-18 10:15 ` [virtio-comment] " Stefano Garzarella
2020-12-21  3:08   ` Jason Wang
2020-12-21 11:06     ` Stefano Garzarella
2020-12-22  2:38       ` Jason Wang
2020-12-21 21:33 ` [virtio-comment] " Halil Pasic
2020-12-22  2:36   ` Jason Wang
2020-12-22  6:50     ` Halil Pasic
2020-12-22  7:30       ` Jason Wang
2020-12-22 12:14         ` Cornelia Huck
2020-12-22 12:51           ` Jason Wang
2020-12-22 15:54             ` Cornelia Huck
2020-12-23  2:48               ` Jason Wang
2020-12-25  7:38                 ` Halil Pasic
2020-12-27 10:00                   ` Michael S. Tsirkin
2020-12-28  6:21                     ` Halil Pasic
2020-12-28  7:01                       ` Jason Wang
2020-12-28 12:30                         ` Michael S. Tsirkin
2020-12-29  9:04                           ` Jason Wang
2021-01-12 10:54                             ` Michael S. Tsirkin
2021-01-13  3:35                               ` Jason Wang
2020-12-29 13:35                         ` Halil Pasic
2020-12-30  8:15                           ` Jason Wang
2021-01-11 18:16                             ` Cornelia Huck
2021-01-12  3:27                               ` Jason Wang
2021-01-12 12:13                                 ` Cornelia Huck
2021-01-13  2:52                                   ` Jason Wang
2021-01-14 12:00                                     ` Cornelia Huck
2020-12-28  6:47                   ` Jason Wang
2020-12-29 13:20                     ` Halil Pasic
2020-12-30  8:03                       ` Jason Wang
2020-12-24  4:52             ` Halil Pasic
2020-12-24  5:51               ` Jason Wang
2020-12-25  3:18                 ` Halil Pasic [this message]
2020-12-25  6:45                   ` Jason Wang
2020-12-27 11:12                     ` Michael S. Tsirkin
2020-12-28  7:05                       ` Jason Wang
2020-12-28 12:27                         ` Michael S. Tsirkin
2020-12-29  8:57                           ` Jason Wang
2021-05-03  9:02 ` [virtio-comment] " Eugenio Perez Martin
2021-05-06  2:51   ` Jason Wang
2021-05-05 13:16 ` Michael S. Tsirkin
2021-05-06  7:26   ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201225041811.33dbbd4b.pasic@linux.ibm.com \
    --to=pasic@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-comment@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.