From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jfreimann@redhat.com>
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id 6DF2CFFA
 for <dev@dpdk.org>; Wed, 30 Aug 2017 08:33:37 +0200 (CEST)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
 [10.5.11.15])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id A091D80463;
 Wed, 30 Aug 2017 06:33:36 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A091D80463
Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com;
 dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com;
 spf=fail smtp.mailfrom=jfreimann@redhat.com
Received: from localhost (dhcp-192-218.str.redhat.com [10.33.192.218])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id AB419845DE;
 Wed, 30 Aug 2017 06:33:32 +0000 (UTC)
Date: Wed, 30 Aug 2017 08:33:31 +0200
From: Jens Freimann <jfreimann@redhat.com>
To: "Stojaczyk, DariuszX" <dariuszx.stojaczyk@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
 "Wodkowski, PawelX" <pawelx.wodkowski@intel.com>,
 "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
 "yliu@fridaylinux.org" <yliu@fridaylinux.org>
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>
 <FBE7E039FA50BF47A673AD0BD3CD56A8F112CC@HASMSX105.ger.corp.intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <FBE7E039FA50BF47A673AD0BD3CD56A8F112CC@HASMSX105.ger.corp.intel.com>
User-Agent: NeoMutt/20170714 (1.8.3)
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.28]); Wed, 30 Aug 2017 06:33:36 +0000 (UTC)
Subject: Re: [dpdk-dev] [PATCH v2] vhost: added user callbacks for socket
 open/close
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Aug 2017 06:33:37 -0000

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