qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages
Date: Wed, 11 Sep 2019 17:09:18 +0200	[thread overview]
Message-ID: <fedd74ed3e9cc554287b202e73b047a938515113.camel@sipsolutions.net> (raw)
In-Reply-To: <20190911095650-mutt-send-email-mst@kernel.org>

On Wed, 2019-09-11 at 10:07 -0400, Michael S. Tsirkin wrote:
> 
> > +  #define VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD        12
> > +  #define VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS 13
> 
> INFLIGHT so INBAND?

*shrug*, sure

> > +  instead of waiting for the call; however, if the protocol feature
> > +  ``VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS`` has been negotiated
> > +  it instead means the updates should be done using the messages.
> 
> Hmm I don't like this. I propose that with VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS
> we just don't allow VHOST_USER_SET_VRING_CALL (if you think it's
> important to allow them, we can say that we do not require them).

You can't actually skip SET_VRING_CALL, it's necessary to start a vring,
so libvhost-user for example calls dev->iface->queue_set_started() only
in this case. The docs in the "Starting and stopping rings" section also
explain this.

> But it's important for performance to be able to enable polling.

I don't think if you enable this you care about performance, after all
the whole point of it is to get REPLY_ACK for the in-band message.

> > +  When the ``VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS`` protocol
> > +  feature has been successfully negotiated, this message may be
> > +  submitted by the master to indicate that a buffer was added to
> > +  the vring instead of signalling it using the vring's event FD or
> 
> event -> kick?
> fd -> file descriptor

Sure.

> > +  having the slave rely on polling.
> 
> i think polling is a separate option and should be there with inband
> kicks.

See above. But I guess we could put a flag into bit 9 indicating that
you want to use messages instead of polling or a file descriptor, if you
prefer.

> > +``VHOST_USER_SLAVE_VRING_CALL``
> > +  :id: 4
> > +  :equivalent ioctl: N/A
> > +  :slave payload: vring state description
> > +  :master payload: N/A
> > +
> > +  When the ``VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS`` protocol
> > +  feature has been successfully negotiated, this message may be
> > +  submitted by the slave to indicate that a buffer was used from
> > +  the vring instead of signalling this using the vring's kick FD or
> > +  having the master relying on polling.
> 
> call FD?

I confused this far too many times and thought I got it right finally,
but yes, you're right.

johannes



  reply	other threads:[~2019-09-11 15:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 13:45 [Qemu-devel] [RFC v2 0/2] vhost-user: in-band notifications Johannes Berg
2019-09-11 13:45 ` [Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages Johannes Berg
2019-09-11 14:07   ` Michael S. Tsirkin
2019-09-11 15:09     ` Johannes Berg [this message]
2019-09-16 11:40       ` Johannes Berg
2019-09-16 15:30         ` Michael S. Tsirkin
2019-09-17 12:01           ` Johannes Berg
2019-09-11 19:15   ` Dr. David Alan Gilbert
2019-09-11 19:18     ` Johannes Berg
2019-09-12  8:09       ` Dr. David Alan Gilbert
2019-09-12  8:13         ` Johannes Berg
2019-09-11 13:45 ` [Qemu-devel] [RFC v2 2/2] libvhost-user: implement in-band notifications Johannes Berg
2019-09-11 15:01 ` [Qemu-devel] [RFC v2 0/2] vhost-user: " no-reply

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=fedd74ed3e9cc554287b202e73b047a938515113.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).