vhost: fix socket initial value
Checks
Commit Message
By default, a vhost socket is created without attaching VDPA device,
this patch fixes the initial value of vdpa_dev_id.
Fixes: b4953225cea4 ("vhost: add APIs for datapath configuration")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
lib/librte_vhost/socket.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Fri, Jan 03, 2020 at 01:36:21PM -0500, Xiao Wang wrote:
> By default, a vhost socket is created without attaching VDPA device,
> this patch fixes the initial value of vdpa_dev_id.
>
> Fixes: b4953225cea4 ("vhost: add APIs for datapath configuration")
> Cc: stable@dpdk.org
>
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> ---
> lib/librte_vhost/socket.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
On 1/7/20 2:49 AM, Tiwei Bie wrote:
> On Fri, Jan 03, 2020 at 01:36:21PM -0500, Xiao Wang wrote:
>> By default, a vhost socket is created without attaching VDPA device,
>> this patch fixes the initial value of vdpa_dev_id.
>>
>> Fixes: b4953225cea4 ("vhost: add APIs for datapath configuration")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
>> ---
>> lib/librte_vhost/socket.c | 1 +
>> 1 file changed, 1 insertion(+)
>
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
>
Applied to dpdk-next-virtio/master.
Thanks,
Maxime
@@ -877,6 +877,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
"error: failed to init connection mutex\n");
goto out_free;
}
+ vsocket->vdpa_dev_id = -1;
vsocket->dequeue_zero_copy = flags & RTE_VHOST_USER_DEQUEUE_ZERO_COPY;
vsocket->extbuf = flags & RTE_VHOST_USER_EXTBUF_SUPPORT;
vsocket->linearbuf = flags & RTE_VHOST_USER_LINEARBUF_SUPPORT;