From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Xie, Huawei" Subject: Re: [RFC PATCH 3/7] lib/librte_vhost: Add an abstraction layer tointerpret messages 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "nakajima.yoshihiro-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org" , "masutani.hitoshi-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org" To: Tetsuya Mukawa , "dev-VfR2kkLFssw@public.gmane.org" Return-path: In-Reply-To: <1415272471-3299-4-git-send-email-mukawa-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > -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); }