From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] vchost: Notify application of ownership change Date: Sat, 24 Oct 2015 19:16:49 +0200 Message-ID: <2350656.p07ll6Er1F@xps13> References: <55C4E8E1.9090406@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Jan Kiszka To: "Xie, Huawei" 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) In-Reply-To: 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" 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?