diff mbox series

vhost: fix socket initial value

Message ID 20200103183621.196138-1-xiao.w.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers show
Series vhost: fix socket initial value | expand

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Wang, Xiao W Jan. 3, 2020, 6:36 p.m. UTC
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

Tiwei Bie Jan. 7, 2020, 1:49 a.m. UTC | #1
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>
Maxime Coquelin Jan. 9, 2020, 3:51 p.m. UTC | #2
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
diff mbox series

Patch

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index ebb2ff6c2..834f0b88a 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -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;