From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhu Lingshan Subject: Re: [PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa Date: Sun, 26 Apr 2020 15:24:49 +0800 Message-ID: References: <1587881384-2133-1-git-send-email-lingshan.zhu@intel.com> <1587881384-2133-2-git-send-email-lingshan.zhu@intel.com> <055fb826-895d-881b-719c-228d0cc9a7bf@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5490650298144481682==" Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" To: Jason Wang , Zhu Lingshan , mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: lulu@redhat.com List-Id: virtualization@lists.linuxfoundation.org This is a multi-part message in MIME format. --===============5490650298144481682== Content-Type: multipart/alternative; boundary="------------8C42731C34136C49A02C234D" Content-Language: en-US This is a multi-part message in MIME format. --------------8C42731C34136C49A02C234D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 4/26/2020 3:03 PM, Jason Wang wrote: > > On 2020/4/26 下午2:58, Jason Wang wrote: >>> >>> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h >>> index 1813821..8663139 100644 >>> --- a/drivers/vhost/vhost.h >>> +++ b/drivers/vhost/vhost.h >>> @@ -18,6 +18,8 @@ >>>   typedef void (*vhost_work_fn_t)(struct vhost_work *work); >>>     #define VHOST_WORK_QUEUED 1 >>> +#define VHOST_FILE_UNBIND -1 >> >> >> I think it's better to document this in uapi. > > > I meant e.g in vhost_vring_file, we had a comment of unbinding: > > struct vhost_vring_file { >     unsigned int index; >     int fd; /* Pass -1 to unbind from file. */ > > }; I think it is better to use an int fd than vhost_vring_file, to avoid the confusions, so if we add#define VHOST_FILE_UNBIND -1 in the uapi header, can it document itself? Thanks > > Thanks > --------------8C42731C34136C49A02C234D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


On 4/26/2020 3:03 PM, Jason Wang wrote:

On 2020/4/26 下午2:58, Jason Wang wrote:

diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 1813821..8663139 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -18,6 +18,8 @@
  typedef void (*vhost_work_fn_t)(struct vhost_work *work);
    #define VHOST_WORK_QUEUED 1
+#define VHOST_FILE_UNBIND -1


I think it's better to document this in uapi.


I meant e.g in vhost_vring_file, we had a comment of unbinding:

struct vhost_vring_file {
    unsigned int index;
    int fd; /* Pass -1 to unbind from file. */

};
I think it is better to use an int fd than vhost_vring_file, to avoid the confusions,
so if we add #define VHOST_FILE_UNBIND -1 in the uapi header, can it document itself?

Thanks

Thanks

--------------8C42731C34136C49A02C234D-- --===============5490650298144481682== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization --===============5490650298144481682==--