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 48DD97EC4 for ; Fri, 7 Nov 2014 21:34:11 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 07 Nov 2014 12:43:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,334,1413270000"; d="scan'208";a="633513635" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by orsmga002.jf.intel.com with ESMTP; 07 Nov 2014 12:43:41 -0800 Received: from pgsmsx108.gar.corp.intel.com (10.221.44.103) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sat, 8 Nov 2014 04:43:41 +0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sat, 8 Nov 2014 04:43:39 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.202]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.13]) with mapi id 14.03.0195.001; Sat, 8 Nov 2014 04:43:39 +0800 From: "Xie, Huawei" To: Tetsuya Mukawa , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC PATCH 3/7] lib/librte_vhost: Add an abstraction layer tointerpret messages Thread-Index: AQHP+bMcMqcqc8CVrEmZSxgtGsjb75xVny9g Date: Fri, 7 Nov 2014 20:43:39 +0000 Message-ID: References: <1415272471-3299-1-git-send-email-mukawa@igel.co.jp> <1415272471-3299-4-git-send-email-mukawa@igel.co.jp> In-Reply-To: <1415272471-3299-4-git-send-email-mukawa@igel.co.jp> 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: "nakajima.yoshihiro@lab.ntt.co.jp" , "masutani.hitoshi@lab.ntt.co.jp" Subject: Re: [dpdk-dev] [RFC PATCH 3/7] lib/librte_vhost: Add an abstraction layer tointerpret messages 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: Fri, 07 Nov 2014 20:34:11 -0000 > -struct vhost_net_device_ops const *get_virtio_net_callbacks(void); > +struct vhost_net_device_ops const *get_virtio_net_callbacks( > + vhost_driver_type_t type); Tetsuya: I feel currently it is better we still keep the common get_virtio_net_callb= acks().=20 For the message flow from control layer 1 (cuse ioctl or user sock message = recv/xmit)---> cuse/user local message handling layer 2-> common virtio mes= sage handling layer 3 Layer 1 and layer 2 belong to one module. It is that module's choice wheth= er to implement callbacks between internal layer1 and layer2. We don't need= to force that. Besides, even that module wants to define the ops between layer 1 and layer= 2, the interface could be different between cuse/user.=20 Refer to the following code for user: vhost-user-server.c: case VHOST_USER_SET_MEM_TABLE: user_set_mem_table(ctx, &msg) virtio-net-user.c: user_set_mem_table(struct vhost_device_ctx ctx, struct VhostUserMsg *pmsg) { .... ops->set_mem_table(ctx, regions, memory.nregions); }