> -----Original Message-----
> From: Stefan Hajnoczi [mailto:stefa...@gmail.com]
> Sent: Monday, December 11, 2017 10:00 PM
> To: Liu, Changpeng <changpeng....@intel.com>
> Cc: qemu-devel@nongnu.org; pbonz...@redhat.com; m...@redhat.com;
> marcandre.lur...@redhat.com; fel...@nutanix.com; Harris, James R
> <james.r.har...@intel.com>
> Subject: Re: [PATCH v6 3/4] contrib/libvhost-user: enable virtio config space
> messages
> 
> On Tue, Dec 05, 2017 at 02:27:18PM +0800, Changpeng Liu wrote:
> > @@ -798,6 +801,70 @@ vu_set_slave_req_fd(VuDev *dev, VhostUserMsg
> *vmsg)
> >  }
> >
> >  static bool
> > +vu_get_config(VuDev *dev, VhostUserMsg *vmsg)
> > +{
> > +    int ret = -1;
> > +
> > +    if (dev->iface->get_config) {
> > +        ret = dev->iface->get_config(dev, vmsg->payload.config.region,
> > +                                     vmsg->payload.config.size);
> > +    }
> > +
> > +    if (ret) {
> > +        /* resize to zero to indicate an error to master */
> > +        vmsg->size = 0;
> > +    }
> 
> Please document this error case in vhost-user.txt.  I don't remember
> reading about it.
Thanks, will add it to vhost-user.txt.

Reply via email to