From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Freimann Subject: Re: [PATCH v2] vhost: added user callbacks for socket open/close Date: Wed, 30 Aug 2017 08:33:31 +0200 Message-ID: <20170830063331.nw2mzka6onpgfgei@dhcp-192-218.str.redhat.com> References: <1503308082-17926-1-git-send-email-dariuszx.stojaczyk@intel.com> <1503419092-63814-1-git-send-email-dariuszx.stojaczyk@intel.com> <20170825092213.ce66eb2w56ui3iy2@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Cc: "dev@dpdk.org" , "Wodkowski, PawelX" , "maxime.coquelin@redhat.com" , "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 6DF2CFFA for ; Wed, 30 Aug 2017 08:33:37 +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 29, 2017 at 06:08:45AM +0000, Stojaczyk, DariuszX wrote: >Hi Jens, > >> I'm still not sure I understand the use case. So just for my >> understanding: users need to distinct between "the device is going away >> temporarily, keep the connection" and "we're shutting down for good", is >> that it? > >Yes, exactly. > >> Maybe it's just me or maybe it means you could explain your example in the >> commit message a bit more. > >Ok. How about the following commit message instead: >``` >rte_vhost: added user callbacks for socket open/close > >Added new callbacks to notify about socket connection status. >As destroy_device is used for virtqueue processing *pause* as >well as connection close, the user has no distinction between those. > >Consider the following scenario: >rte_vhost: received SET_VRING_BASE message, > calling destroy_device() as usual > >user: end-user asks to remove the device (together with socket file), > OK, device is not *in use* - that's NOT the behavior we want > calling rte_vhost_driver_unregister() etc. > >Instead of changing new_device/destroy_device callbacks and breaking >the ABI, a set of new functions new_connection/destroy_connection >has been added. >``` Sounds good to me. Thanks! regards, Jens