From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 894CBA04F3; Fri, 3 Jan 2020 07:37:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA3A21C238; Fri, 3 Jan 2020 07:37:33 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id DD3F81C1F7; Fri, 3 Jan 2020 07:37:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 22:37:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,389,1571727600"; d="scan'208";a="210002183" Received: from dpdk-xiao1.sh.intel.com ([10.67.110.150]) by orsmga007.jf.intel.com with ESMTP; 02 Jan 2020 22:37:29 -0800 From: Xiao Wang To: maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org, Xiao Wang , stable@dpdk.org Date: Fri, 3 Jan 2020 13:36:21 -0500 Message-Id: <20200103183621.196138-1-xiao.w.wang@intel.com> X-Mailer: git-send-email 2.15.1 Subject: [dpdk-dev] [PATCH] vhost: fix socket initial value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/librte_vhost/socket.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.15.1