From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 051A52E41 for ; Mon, 20 Aug 2018 11:15:52 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id k5-v6so822533wre.10 for ; Mon, 20 Aug 2018 02:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Sp/ZJJQlf1c+54yMJTIkEI9IrZEERctdqRmc0Ctv5Dg=; b=o+Mk+jiOom7c+oTnrp76p13fYNlQ37Gp20ng3aXIHJadwMc1gwDs5l4IXurZpyDJnA CYBV6yHACg55ghJD+1YtmGoAyGre0WMkqy7nRMW/lU3Dh2mANkqWxruKJQ4ECTU7YeFy f8e7M7EYkTdfGr3sQyVFPyJM8jQceU4hXX1O1Op3AYxTtuklJExRCxApFdvSg6r1qaeM G0jauZTucPcX43X5dZVMNh4G6bFHutj+9+zW77bds//D7nBX6DSdGhiYLHnJ4vQG3upD F/PDYIX44UrFb8uRuqFLSDfOe2L/RvibOZZ2SHzo1seE8cbc4r/UxfBKe40+3JU35joq vHkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Sp/ZJJQlf1c+54yMJTIkEI9IrZEERctdqRmc0Ctv5Dg=; b=IOy78/Ib6RSwvhSyAtYWNzudXLSQmyjya8+TLNQNxspN+rOd3tg5FqUd2yIyMJSHBY GlTauhvc0ACAEh7qVoglHqWesDSTpo4kJLfrKfn0k53YfDVXLAPFNvhexecbZ3cKb75D cVxbTwn/Hz811PGNBxof0xkFy7Ive4it7iPSWQvCTaWglF3eNIKLweRpbOhhFg1SRVY2 ebl0OYrK4cSItx8U+/U3uj+atP5uw0ajV8Hx7BnvqpIiV0ho7hDdnkFS5gSVTWLo2sLr +2fuFqWBwQ99+Ekk7cM9UMwE/tFGrzM0IzahtHAtuykpd9rjw7jCMkm2qYvG1AFBBEw7 NrAw== X-Gm-Message-State: APzg51CauNYN47SzHL+Vz+7kYuZi3V54xDzWondFicjTrq1OUtoKjSO1 9vdwkvHo8JepubSPWiXCP0BTsQ== X-Google-Smtp-Source: ANB0VdYhVuJet0yzV5R1n1TQVuw74xkTLc/ZsgO3qxbAwpDOA8vYtfxZK03a0IcPsr11eFvR6E7cig== X-Received: by 2002:adf:ce90:: with SMTP id r16-v6mr6743013wrn.112.1534756552485; Mon, 20 Aug 2018 02:15:52 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 185-v6sm16710629wmy.38.2018.08.20.02.15.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Aug 2018 02:15:51 -0700 (PDT) Date: Mon, 20 Aug 2018 11:15:33 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Jeff Guo Cc: stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, jingjing.wu@intel.com, thomas@monjalon.net, motih@mellanox.com, matan@mellanox.com, harry.van.haaren@intel.com, qi.z.zhang@intel.com, shaopeng.he@intel.com, bernard.iremonger@intel.com, arybchenko@solarflare.com, jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, helin.zhang@intel.com Message-ID: <20180820091533.yl2wzmvzfxqwo2po@bidouze.vm.6wind.com> References: <1534503091-31910-1-git-send-email-jia.guo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1534503091-31910-1-git-send-email-jia.guo@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v1 0/5] Enable hotplug in vfio X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2018 09:15:53 -0000 Hi Jeff, On Fri, Aug 17, 2018 at 06:51:26PM +0800, Jeff Guo wrote: > As we may know that the process of hotplug is different between igb_uio > and vfio. For igb_uio, it could use uevent notification and memory > failure handle mechanism for hotplug. But for vfio, when device is be > hotplug-out, the uevent can not be detected immediately, because of the > vfio kernel module will use a special mechanism to guaranty the pci > device would not be deleted until the user space release the resources, > so it will use another event “req notifier” at first to notify user space > to release resources for hotplug. > > This patch will add a new interrupt type of req notifier in eal interrupt, > and add the new interrupt handler in pci device to handle the req device > event. When the req notifier be detected, it can trigger the device event > callback process to process for hotplug. With this mechanism, hotplug > could be enable in vfio. > The REQ event seems VFIO specific. Why not leave it within the PCI bus, around the vfio glue, and leave the EAL unmodified? > Jeff Guo (5): > eal: add a new req notifier to eal interrupt > eal: add a new req event to device event > eal: modify device event callback process func > pci: add req handler field to generic pci device > vfio: enable vfio hotplug by req notifier handler > > drivers/bus/pci/linux/pci_vfio.c | 104 +++++++++++++++++++++ > drivers/bus/pci/pci_common.c | 10 ++ > drivers/bus/pci/rte_bus_pci.h | 1 + > lib/librte_eal/common/eal_common_dev.c | 5 +- > lib/librte_eal/common/eal_private.h | 12 --- > lib/librte_eal/common/include/rte_dev.h | 20 +++- > lib/librte_eal/common/include/rte_eal_interrupts.h | 1 + > lib/librte_eal/linuxapp/eal/eal_dev.c | 2 +- > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 71 ++++++++++++++ > lib/librte_ethdev/rte_ethdev.c | 3 +- > 10 files changed, 212 insertions(+), 17 deletions(-) > > -- > 2.7.4 > -- Gaëtan Rivet 6WIND