From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by dpdk.org (Postfix) with ESMTP id 9E1325A89 for ; Sat, 24 Oct 2015 19:18:15 +0200 (CEST) Received: by wicll6 with SMTP id ll6so66171765wic.0 for ; Sat, 24 Oct 2015 10:18:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=cgOjIC1X6QE8TH6Zofr3M7T4Itb5ihxaltoLAz6YYfI=; b=IuPGJWHJr53lXD/wrXtQ27sRiQci/eG3z1OdJfZ3kvnh66s82f4tobqt8c1dqaBSTe yu38JeyuWAWIV9AegQ+ST/J4ObwzjJFFyt9DdcGbfx4Muk0qhRvfo6tXNwdHdVjB/oqQ WutgF5cGQ+1YI1AvH3v7x9PmJflBnHGpeWGLurNn89kEOl6lRb4QT5McOgOuyDUfRDJq 0VgxZO6l2iFkT/v1XWrH8F+I04V0WhDi99SgnLQ+BU++GIfKf/islZBZ3J/UumUV+sTl 0iLg/LAYMA+70xxAXXlPEnk3ah9niign4ch5blIGUCDgXQ0L4icpWWAC+0NyG38tw/EI PGaw== X-Gm-Message-State: ALoCoQn2rI9EyqPfEHp6DsdjDJxI4H1wJv6Bmc8kPWD8QeXsS8A/HHUHupTteBH5pSk/qxs+mZfC X-Received: by 10.180.36.15 with SMTP id m15mr10323677wij.90.1445707095378; Sat, 24 Oct 2015 10:18:15 -0700 (PDT) Received: from xps13.localnet (APoitiers-657-1-74-252.w90-45.abo.wanadoo.fr. [90.45.221.252]) by smtp.gmail.com with ESMTPSA id q8sm7264064wiz.23.2015.10.24.10.18.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Oct 2015 10:18:14 -0700 (PDT) From: Thomas Monjalon To: "Xie, Huawei" Date: Sat, 24 Oct 2015 19:16:49 +0200 Message-ID: <2350656.p07ll6Er1F@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <55C4E8E1.9090406@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Sat, 24 Oct 2015 17:18:15 -0000 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?