From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by dpdk.org (Postfix) with ESMTP id BDB695682 for ; Mon, 26 Oct 2015 09:33:27 +0100 (CET) Received: by pacfv9 with SMTP id fv9so190168017pac.3 for ; Mon, 26 Oct 2015 01:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel_co_jp.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=gNEC/xBr0GxMe5u+tOSidZr+nsxX3JvirSbLltw/VzM=; b=IZ+tjeFQDfoIoDkry0oVTWgyjQuU2fmaq29un/w2/rXM5aOlep9ewaMSoZBvg5cbS7 ZG/90QP/HgP92yvP164a6PcPKNsp7loz27V2d0l0B6iz8M/wbYmhgsuSMTYl/Dwt6vnI zLNdp9g/qn4+y/qxLo8499I3HXfFk/zuUFT/hL666jrZmHAqL2d1xWv8d0ir6vlLJH8f ke0iR5d2qL7dDTWkI8hutgYfn1KPut8AWeVGRrnBAGEzFrDNtlanR8SRC65NGXFgyyJM scXOwVHKgdoU/SApS2goCCr2zHh6w1rNIWQC52A+EymfZiU+7YZNHKfceST1zjMcN56u dKsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=gNEC/xBr0GxMe5u+tOSidZr+nsxX3JvirSbLltw/VzM=; b=HsPwba5DJJzx6ROiD6lB/WVndilhcbyK3O62JCJUcWgnlvAsWpSF/lCZ0i5Xx7SyRX yUSof7eixD57LKODz2fzW2xeR82P2KpE/PiiN53Y8oWXpBo3HyMWQlOxehAPbA1+AU0+ 3lohY1v6hDKnzmxaL5mjpQbtu8H+PRYuO+cl47Xtp5n/JWbOz6lTbwy8m+5MwyRnEvRv +p2hOsTLO0q2/nwAiA02X8YEpB+HO+As/TA35x8ea2pU1tAoMT08IxqppVtFim1LCv6R lY8UMXBYX3tdex82Oagj7ZrJFRlXHZe6fQNhsn20TdWArUdWosQ6xe5wC/XG2nppBBc2 RcUg== X-Gm-Message-State: ALoCoQkQts0UeNjCVHAX5MQHi0iRhabL2ndSjg4W1ra5rxWGJidhRs4lJHVs9rgNiN4/QuIXONH9 X-Received: by 10.68.88.2 with SMTP id bc2mr20647200pbb.117.1445848406956; Mon, 26 Oct 2015 01:33:26 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id yq2sm32475346pbb.39.2015.10.26.01.33.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2015 01:33:26 -0700 (PDT) To: Yuanhan Liu References: <55C4E8E1.9090406@siemens.com> <2350656.p07ll6Er1F@xps13> <562DBFFF.7060808@igel.co.jp> <20151026063007.GZ3115@yliu-dev.sh.intel.com> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <562DE554.2090109@igel.co.jp> Date: Mon, 26 Oct 2015 17:33:24 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151026063007.GZ3115@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Jan Kiszka Subject: Re: [dpdk-dev] [PATCH] vchost: Notify application of ownership change X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 08:33:28 -0000 On 2015/10/26 15:30, Yuanhan Liu wrote: > On Mon, Oct 26, 2015 at 02:54:07PM +0900, Tetsuya Mukawa wrote: >> On 2015/10/25 2:16, Thomas Monjalon wrote: >>> 2015-08-12 03:34, Xie, Huawei: >>>> On 8/8/2015 1:21 AM, Jan Kiszka wrote: >>>>> On VHOST_*_RESET_OWNER, we reinitialize the device but without telling >>>>> the application. That will cause crashes when it continues to invoke >>>>> vhost services on the device. Fix it by calling the destruction hook if >>>>> the device is still in use. >>> [...] >>>>> --- a/lib/librte_vhost/virtio-net.c >>>>> +++ b/lib/librte_vhost/virtio-net.c >>>>> @@ -402,6 +402,9 @@ reset_owner(struct vhost_device_ctx ctx) >>>>> >>>>> ll_dev = get_config_ll_entry(ctx); >>>>> >>>>> + if ((ll_dev->dev.flags & VIRTIO_DEV_RUNNING)) >>>>> + notify_ops->destroy_device(&ll_dev->dev); >>>> To me this patch makes sense here. >>>> Whether RESET_OWNER is really needed is another question. Whenever the >>>> vhost itself needs to process the vhost device, we need to notify the >>>> switch application to remove it from data plane. >>> Huawei, >>> some patches have been accepted for RESET_OWNER management. >>> Is this patch obsolete? > I think it's still appliable, at least so far. > >> Hi Yuanhan and Huawei, >> >> I also have the same question. Do we have a patch for this issue? >> >> Today, I've download Yuanhan's multiple queues patches and applied it on >> latest dpdk tree. >> Then, tried to apply my vhost PMD patch on it. >> >> When I check the patch, it seems I've faced this issue. >> Here are steps to reproduce. > Above patch should fix your issue, right? If so, we need it. Yes, the patch will fix the issue. >> 1. Start vhost-user backend application. >> (In my case, testpmd using vhost PMD is the application) >> 2. Start a VM with vhost-user. >> You can see below message from the backend application. >> VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE >> VHOST_CONFIG: set queue enable: 1 to qp idx: 0 >> (snip) >> VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK >> 3. After booting Linux on guest, bind the virtio-net device to igb_uio. >> Then below messages are shown. >> VHOST_CONFIG: read message VHOST_USER_RESET_OWNER >> VHOST_CONFIG: read message VHOST_USER_RESET_OWNER >> VHOST_CONFIG: read message VHOST_USER_GET_VRING_BASE >> >> The point is we will have VHOST_USER_RESET_OWNER before >> VHOST_USER_GET_VRING_BASE. > Note that there is an ongoing work at QEMU community (from me) to > handle RESET_OWNER correctly: it will be moved to somewhere else > instead of before VHOST_USER_GET_VRING_BASE. > > --yliu Sounds great! Thanks for handling it. Tetsuya