From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2D4BC1B856 for ; Tue, 3 Apr 2018 20:18:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2018 11:18:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,402,1517904000"; d="scan'208";a="188366544" Received: from jeffguo-z170x-ud5.sh.intel.com (HELO localhost.localdomain) ([10.67.104.10]) by orsmga004.jf.intel.com with ESMTP; 03 Apr 2018 11:18:23 -0700 From: Jeff Guo To: stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, gaetan.rivet@6wind.com, jingjing.wu@intel.com, thomas@monjalon.net, motih@mellanox.com, harry.van.haaren@intel.com, jianfeng.tan@intel.com Cc: jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, jia.guo@intel.com, helin.zhang@intel.com Date: Wed, 4 Apr 2018 02:17:18 +0800 Message-Id: <1522779443-1932-1-git-send-email-jia.guo@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH V18 0/5] add hot plug failure and auto bind handler 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: Tue, 03 Apr 2018 18:18:28 -0000 At the prior, device event monitor machenism have been introduced. But for device hot unplug, if we want our data path would not be break when device hot plug in or out, we still need some preparatory measures to do some preparation work for the device detach and attach, so that we will not encounter memory fault after device have been plug out of the system, and also let user directly attach device which have been auto bind onto the specific kernel driver. This patch set will introduces two APIs to do that failure and auto bind handle for hot plug feature, and also use testpmd to show example how to use these 2 APIs for process hot plug event, let the process could be smoothly like below case: 1)hot plug removal: plugout->failure handle->stop forward->stop port->close port->detach port 2)hot plug insertion: plugin->kernel driver auto bind->attach port->start port with this machenism, every use such as fail-safe driver which have enable device event monitor will be able to develop their own hotplug application. patchset history: v16->v15: add document, add signal bus handler, refine the code to be more clear. the prior patch history please check the patch set "add device event monitor framework" Jeff Guo (5): bus: introduce device hot unplug handle bus/pci: implement handle hot unplug operation eal: add failure handler mechanism for hot plug eal: add driver auto bind for hot insertion app/testpmd: use auto handle for hotplug app/test-pmd/testpmd.c | 178 ++++++++++++++++++++++++---- app/test-pmd/testpmd.h | 9 ++ doc/guides/rel_notes/release_18_05.rst | 8 ++ drivers/bus/pci/pci_common.c | 42 +++++++ drivers/bus/pci/pci_common_uio.c | 33 ++++++ drivers/bus/pci/private.h | 12 ++ lib/librte_eal/bsdapp/eal/eal_dev.c | 7 ++ lib/librte_eal/common/include/rte_bus.h | 15 +++ lib/librte_eal/common/include/rte_dev.h | 35 ++++++ lib/librte_eal/linuxapp/eal/eal_dev.c | 188 +++++++++++++++++++++++++++++- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 4 + lib/librte_eal/rte_eal_version.map | 2 + 12 files changed, 509 insertions(+), 24 deletions(-) -- 2.7.4