From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Freimann Subject: Re: [PATCH] vhost: added user callbacks for socket open/close Date: Tue, 22 Aug 2017 13:58:44 +0200 Message-ID: <20170822115844.owipopdjodt4vvxf@localhost.localdomain> References: <1503308082-17926-1-git-send-email-dariuszx.stojaczyk@intel.com> <20170821150034.sevaefe57m3pnlpd@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Cc: "dev@dpdk.org" , "Wodkowski, PawelX" , "Maxime Coquelin (mcoqueli)" , "yliu@fridaylinux.org" To: "Stojaczyk, DariuszX" Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9158C7CAF for ; Tue, 22 Aug 2017 13:58:52 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Aug 22, 2017 at 09:55:19AM +0000, Stojaczyk, DariuszX wrote: >Hi Jens, > >> I'm a little uncertain but my gut feeling is that in this context a connection is >> something between two sockets, not between devices. > >What do you mean? >This is a unix domain socket connection. DPDK can create the socket, then the client may connect to it via connect(2). yes, I get that. > >> I would probably add >> these callbacks to struct vhost_user_socket. This is also where we keep the >> list of connections. > >I get your point. However, it's vhost_device_ops struct that's being set by the user via rte_vhost_driver_callback_register(). The new_connection callback is there just to mark the device as *in use, can't be deleted*. It doesn't transport any connection data. You're right, I overlooked that it needs to be set by the user. In this case your patch is the smallest possible change and looks good to me. Do we need a documentation change for this? regards, Jens