From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 96ABB7E79 for ; Wed, 10 Dec 2014 23:04:58 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 10 Dec 2014 14:04:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,554,1413270000"; d="scan'208";a="621833524" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by orsmga001.jf.intel.com with ESMTP; 10 Dec 2014 14:04:15 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 11 Dec 2014 06:04:14 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.5]) with mapi id 14.03.0195.001; Thu, 11 Dec 2014 06:04:12 +0800 From: "Xie, Huawei" To: "Xie, Huawei" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH RFC v2 00/12] lib/librte_vhost: vhost-user support Thread-Index: AQHQFMHK93FvrF+nx06T5hJ1ScrFbZyJWqUQ Date: Wed, 10 Dec 2014 22:04:12 +0000 Message-ID: References: <1418247477-13920-1-git-send-email-huawei.xie@intel.com> In-Reply-To: <1418247477-13920-1-git-send-email-huawei.xie@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "haifeng.lin@intel.com" Subject: Re: [dpdk-dev] [PATCH RFC v2 00/12] lib/librte_vhost: vhost-user support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2014 22:05:00 -0000 This patch set is based on latest vhost. It fixes vhost-user memory map/unmap alignment issue. It uses VHOST_USER_GET_VRING_BASE as the message for vhost device stop in = vhost-user. It uses VHOST_SET_VRING_KICK as the message that tells us vhost device is = ready in vhost-user. =09 Tetsuya: Your abstraction layer hasn't been integrated due to time issue, so now we= support both vhost-cuse and vhost-user, but only one driver could be regis= tered. This is not the final patch, and there might be resource leak issue(which i= s critical for vhost enabled switch, as vSwitch needs to run endlessly, and= virtio in guest VM and VM itself could be restarted repeatedly. Will take = effort to check if all the memory region has been unmapped, and if all fds = are closed properly in all possible path.) I have tried to restart virtio-PMD repeatedly and switch between virtio-PMD= and virtio-pci several times, it runs smoothly and no resource leak so far= . There are other features like multiple socket file, client mode to be suppo= rted. What if the vhost is terminated due to program error? What if vhost needs t= o be upgraded dynamically? How could we reconnect to virtio frontend? That = is very very important feature if you are working on it. :). Please help review. Thanks! =09 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie > Sent: Wednesday, December 10, 2014 2:38 PM > To: dev@dpdk.org > Cc: haifeng.lin@intel.com > Subject: [dpdk-dev] [PATCH RFC v2 00/12] lib/librte_vhost: vhost-user sup= port >=20 > This patchset refines vhost library to support both vhost-cuse and vhost-= user. >=20 >=20 > Huawei Xie (12): > create vhost_cuse directory and move vhost-net-cdev.c to vhost_cuse > directory > rename vhost-net-cdev.h as vhost-net.h > move eventfd_copy logic out from virtio-net.c to vhost-net-cdev.c > exact copy of host_memory_map from virtio-net.c to new file > virtio-net-cdev.c > host_memory_map refine: map partial memory of target process into curre= nt > process > cuse_set_memory_table is the VHOST_SET_MEMORY_TABLE message handler > for cuse > fd management for vhost user > vhost-user support > minor fix > vhost-user memory region map/unmap > kick/callfd fix > cleanup when vhost user connection is closed >=20 > lib/librte_vhost/Makefile | 5 +- > lib/librte_vhost/rte_virtio_net.h | 2 + > lib/librte_vhost/vhost-net-cdev.c | 389 --------------------= -- > lib/librte_vhost/vhost-net-cdev.h | 113 ------- > lib/librte_vhost/vhost-net.h | 117 +++++++ > lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 452 > ++++++++++++++++++++++++++ > lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 349 ++++++++++++++++++++ > lib/librte_vhost/vhost_cuse/virtio-net-cdev.h | 45 +++ > lib/librte_vhost/vhost_rxtx.c | 2 +- > lib/librte_vhost/vhost_user/fd_man.c | 205 ++++++++++++ > lib/librte_vhost/vhost_user/fd_man.h | 64 ++++ > lib/librte_vhost/vhost_user/vhost-net-user.c | 423 > ++++++++++++++++++++++++ > lib/librte_vhost/vhost_user/vhost-net-user.h | 107 ++++++ > lib/librte_vhost/vhost_user/virtio-net-user.c | 313 ++++++++++++++++++ > lib/librte_vhost/vhost_user/virtio-net-user.h | 49 +++ > lib/librte_vhost/virtio-net.c | 394 ++------------------= -- > lib/librte_vhost/virtio-net.h | 43 +++ > 17 files changed, 2199 insertions(+), 873 deletions(-) > delete mode 100644 lib/librte_vhost/vhost-net-cdev.c > delete mode 100644 lib/librte_vhost/vhost-net-cdev.h > create mode 100644 lib/librte_vhost/vhost-net.h > create mode 100644 lib/librte_vhost/vhost_cuse/vhost-net-cdev.c > create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c > create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.h > create mode 100644 lib/librte_vhost/vhost_user/fd_man.c > create mode 100644 lib/librte_vhost/vhost_user/fd_man.h > create mode 100644 lib/librte_vhost/vhost_user/vhost-net-user.c > create mode 100644 lib/librte_vhost/vhost_user/vhost-net-user.h > create mode 100644 lib/librte_vhost/vhost_user/virtio-net-user.c > create mode 100644 lib/librte_vhost/vhost_user/virtio-net-user.h > create mode 100644 lib/librte_vhost/virtio-net.h >=20 > -- > 1.8.1.4