> -----Original Message-----
> From: Qemu-devel <qemu-devel-
> bounces+thanos.makatos=nutanix....@nongnu.org> On Behalf Of John
> Levon
> Sent: 02 November 2020 11:41
> To: Thanos Makatos <thanos.maka...@nutanix.com>
> Cc: benjamin.wal...@intel.com; Elena Ufimtseva
> <elena.ufimts...@oracle.com>; jag.ra...@oracle.com;
> james.r.har...@intel.com; Swapnil Ingle <swapnil.in...@nutanix.com>;
> john.g.john...@oracle.com; yuvalkash...@gmail.com;
> konrad.w...@oracle.com; tina.zh...@intel.com; qemu-devel@nongnu.org;
> dgilb...@redhat.com; Marc-André Lureau
> <marcandre.lur...@redhat.com>; ism...@linux.com;
> alex.william...@redhat.com; Stefan Hajnoczi <stefa...@redhat.com>;
> Felipe Franciosi <fel...@nutanix.com>; xiuchun...@intel.com;
> tomassetti.and...@gmail.com; changpeng....@intel.com; Raphael Norwitz
> <raphael.norw...@nutanix.com>; kanth.ghatr...@oracle.com
> Subject: Re: [PATCH v5] introduce vfio-user protocol specification
>
> On Mon, Nov 02, 2020 at 11:29:23AM +0000, Thanos Makatos wrote:
>
> > >
> +==============+========+=================================
> > > ==================+
> > > > | version | object | ``{"major": <number>, "minor": <number>}``
> |
> > > > | | |
> > > > |
> > > > | | | Version supported by the sender, e.g. "0.1".
> > > > |
> > >
> > > It seems quite unlikely but this should specify it's strings not floating
> > > point
> > > values maybe?
> > >
> > > Definitely applies to max_fds too.
> >
> > major and minor are JSON numbers and specifically integers.
>
> It is debatable as to whether there is such a thing as a JSON integer :)
AFAIK there isn't.
>
> > The rationale behind this is to simplify parsing. Is specifying that
> > major/minor/max_fds should be an interger sufficient to clear any
> vagueness
> > here?
>
> I suppose that's OK as long as we never want a 0.1.1 or whatever. I'm not
> sure
> it simplifies parsing, but maybe it does.
Now that you mention it, why preclude 0.1.1? IIUC the whole point of not
stating the version as a float is to simply have this flexibility in the future.
You're right in your earlier suggestion to explicitly state major/minor as
strings.
>
> > > > Versioning and Feature Support
> > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > > Upon accepting a connection, the server must send a
> VFIO_USER_VERSION
> > > message
> > > > proposing a protocol version and a set of capabilities. The client
> compares
> > > > these with the versions and capabilities it supports and sends a
> > > > VFIO_USER_VERSION reply according to the following rules.
> > >
> > > I'm curious if there was a specific reason it's this way around, when it
> seems
> > > more natural for the client to propose first, and the server to reply?
> >
> > I'm not aware of any specific reason.
>
> So can we switch it now so the initial setup is a send/recv too?
I'm fine with that but would first like to hear back from John in case he
objects.