From patchwork Wed Jun 21 02:57:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 25512 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 753035688; Wed, 21 Jun 2017 04:59:42 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B6DF72C72 for ; Wed, 21 Jun 2017 04:59:28 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 20 Jun 2017 19:59:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,367,1493708400"; d="scan'208";a="101830284" Received: from dpdk25.sh.intel.com ([10.67.111.75]) by orsmga002.jf.intel.com with ESMTP; 20 Jun 2017 19:59:27 -0700 From: Tiwei Bie To: dev@dpdk.org Cc: Yuanhan Liu Date: Wed, 21 Jun 2017 10:57:41 +0800 Message-Id: <1498013885-102779-6-git-send-email-tiwei.bie@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498013885-102779-1-git-send-email-tiwei.bie@intel.com> References: <1498013885-102779-1-git-send-email-tiwei.bie@intel.com> Subject: [dpdk-dev] [RFC 05/29] vhost: set desc addr for 1.1 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" From: Yuanhan Liu Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost.h | 1 + lib/librte_vhost/vhost_user.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 208b2eb..f3b7ad5 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -86,6 +86,7 @@ TAILQ_HEAD(zcopy_mbuf_list, zcopy_mbuf); */ struct vhost_virtqueue { struct vring_desc *desc; + struct vring_desc_1_1 *desc_1_1; struct vring_avail *avail; struct vring_used *used; uint32_t size; diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index e90b44c..3a2de79 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -351,6 +351,7 @@ vhost_user_set_vring_addr(struct virtio_net *dev, VhostUserMsg *msg) dev->vid); return -1; } + vq->desc_1_1 = (struct vring_desc_1_1 *)vq->desc; dev = numa_realloc(dev, msg->payload.addr.index); vq = dev->virtqueue[msg->payload.addr.index];