From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1am5kl-0001V9-Bm for qemu-devel@nongnu.org; Fri, 01 Apr 2016 16:33:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1am5kg-0007cs-Dg for qemu-devel@nongnu.org; Fri, 01 Apr 2016 16:33:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1am5kg-0007co-60 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 16:33:06 -0400 References: <1459509388-6185-1-git-send-email-marcandre.lureau@redhat.com> <1459509388-6185-11-git-send-email-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <56FEDB00.4070703@redhat.com> Date: Fri, 1 Apr 2016 14:33:04 -0600 MIME-Version: 1.0 In-Reply-To: <1459509388-6185-11-git-send-email-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vA2K8ScbcRGruohGC9D9l2SF0TMNWUeFG" Subject: Re: [Qemu-devel] [PATCH 10/18] vhost-user: add slave-fd support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: Ilya Maximets , Tetsuya Mukawa , Yuanhan Liu , jonshin@cisco.com, "Michael S. Tsirkin" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vA2K8ScbcRGruohGC9D9l2SF0TMNWUeFG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/01/2016 05:16 AM, marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > Learn to give a socket to the slave to let him make requests to the > master. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > docs/specs/vhost-user.txt | 23 ++++++++++++++++ > hw/virtio/vhost-user.c | 69 +++++++++++++++++++++++++++++++++++++++= ++++++++ > 2 files changed, 92 insertions(+) >=20 > diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt > index 0312d40..8a635fa 100644 > --- a/docs/specs/vhost-user.txt > +++ b/docs/specs/vhost-user.txt > @@ -248,12 +248,25 @@ Once the source has finished migration, rings wil= l be stopped by > the source. No further update must be done before rings are > restarted. > =20 > +Slave communication > +------------------- > + > +An optional communication channel is provided if the slave > +declares VHOST_USER_PROTOCOL_F_SLAVE_CHANNEL feature, to allow s/declares/declares the/ > +the slave to make requests to the master. > + > +The fd is provided via VHOST_USER_SET_SLAVE_FD ancillary data. > + > +A slave may then send VHOST_USER_SLAVE_* messages to the master > +using this fd communication channel. > + > Protocol features > ----------------- > =20 > #define VHOST_USER_PROTOCOL_F_MQ 0 > #define VHOST_USER_PROTOCOL_F_LOG_SHMFD 1 > #define VHOST_USER_PROTOCOL_F_RARP 2 > +#define VHOST_USER_PROTOCOL_F_SLAVE_CHANNEL 3 > =20 > Message types > ------------- > @@ -464,3 +477,13 @@ Message types > is present in VHOST_USER_GET_PROTOCOL_FEATURES. > The first 6 bytes of the payload contain the mac address of the = guest to > allow the vhost user backend to construct and broadcast the fake= RARP. > + > + * VHOST_USER_SET_SLAVE_FD > + Id: 20 > + Equivalent ioctl: N/A > + Master payload: N/A > + > + Set the file descriptor for the salve to make VHOST_USER_SLAVE_*= s/salve/slave/ > + request to the master. It is passed in the ancillary data. > + This message is only sent if VHOST_USER_PROTOCOL_F_SLAVE_CHANNEL= > + feature is available. >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vA2K8ScbcRGruohGC9D9l2SF0TMNWUeFG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW/tsAAAoJEKeha0olJ0NqvRQH/0Nhjb71a91TgQoYVJJYPHye XsfHwOxPMxSOUZm4My2hXVuqZtGWdzmHk+mvp1Hwt4CYiYv1ZIKPsgvvyznc/mfN Mf+jFyD+Otiqlcp6yNWMy8a4wTkO11aoczfmUGvT/VM+8W6J58I0p+yJLLknamLO NNHhB74cCHFj8bNmi1e1sjjQTjZIkw3y7ErmYHhKZMaoIshShEuLRJ/i4Km1briA avzKfhi5LnFM1iYU3lJFfWUmXSWGy/qcoPe0ldHSBpT7XE8/l3pzXK7Mw9BiRhsB jDZSJu7ZGsUw6lEZ8PmzJBnvcsBck8m/MYzA52YXU7vhcE4HeKFNPfShhqqwYAI= =0p1L -----END PGP SIGNATURE----- --vA2K8ScbcRGruohGC9D9l2SF0TMNWUeFG--