From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: [PATCH v2] vhost: Fix reset_owner message handling not to clear callfd Date: Tue, 24 Nov 2015 13:42:49 +0900 Message-ID: <5653EAC9.80704@igel.co.jp> References: <1447914206-18369-1-git-send-email-mukawa@igel.co.jp> <1447924020-26894-1-git-send-email-mukawa@igel.co.jp> <20151120112125.GA2325@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, ann.zhuangyanying@huawei.com To: Yuanhan Liu Return-path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 5414E374E for ; Tue, 24 Nov 2015 05:42:51 +0100 (CET) Received: by pacdm15 with SMTP id dm15so8435738pac.3 for ; Mon, 23 Nov 2015 20:42:50 -0800 (PST) In-Reply-To: <20151120112125.GA2325@yliu-dev.sh.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2015/11/20 20:21, Yuanhan Liu wrote: > On Thu, Nov 19, 2015 at 06:07:00PM +0900, Tetsuya Mukawa wrote: >> The patch fixes reset_owner message handling not to clear callfd, >> because callfd will be valid while connection is establihed. >> >> Signed-off-by: Tetsuya Mukawa > .... >> >> /* >> @@ -467,6 +486,7 @@ static int >> reset_owner(struct vhost_device_ctx ctx) >> { >> struct virtio_net *dev; >> + uint32_t i; >> >> dev = get_device(ctx); >> if (dev == NULL) >> @@ -475,7 +495,19 @@ reset_owner(struct vhost_device_ctx ctx) >> if (dev->flags & VIRTIO_DEV_RUNNING) >> notify_destroy_device(dev); >> >> - cleanup_device(dev); > I would suggest to introduce the destory flag to cleanup_device() as > well, so that we don't have to unfold the cleanup_device code here. > > (BTW, I should've reviewed this patch this morning, but I was busy). Thanks, I will submit it again. Tetsuya