From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9D413201 for ; Wed, 7 Nov 2018 10:37:30 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2018 01:37:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,475,1534834800"; d="scan'208";a="83978878" Received: from jeffguo-s2600wt2.sh.intel.com (HELO localhost.localdomain) ([10.67.110.10]) by fmsmga007.fm.intel.com with ESMTP; 07 Nov 2018 01:37:27 -0800 From: Jeff Guo To: ferruh.yigit@intel.com, konstantin.ananyev@intel.com, anatoly.burakov@intel.com, thomas@monjalon.net, bernard.iremonger@intel.com Cc: dev@dpdk.org, jia.guo@intel.com, helin.zhang@intel.com, stephen@networkplumber.org, gaetan.rivet@6wind.com, qi.z.zhang@intel.com, arybchenko@solarflare.com, bruce.richardson@intel.com, matan@mellanox.com, shaopeng.he@intel.com Date: Wed, 7 Nov 2018 17:41:29 +0800 Message-Id: <1541583691-145432-1-git-send-email-jia.guo@intel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 0/2] expose device states for hot-unplug 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: Wed, 07 Nov 2018 09:37:31 -0000 Since the hotplug API and device event API have make public, so in order to let applications or driver deal with device directly, it would be helpful if the states of device could be exposed. Especially for hotplug process, when device is hot-unplugged, some invalid process should be skipped by checking the device status. It will avoid some error occur and unnecessary loading. So it is proposed that let eal framework take the control of device, it provide device control APIs and device status checking. Something like the rte_eth_dev_state for ethernet device could be delete later if it is no specific usage and could be covered by the common rte device state. Jeff Guo (2): eal: expose device states in rte device but/pci: fix fd close for hot-unplug drivers/bus/pci/linux/pci_uio.c | 3 +++ drivers/bus/pci/pci_common_uio.c | 16 +++++++++------- lib/librte_eal/common/include/rte_dev.h | 13 +++++++++++++ lib/librte_eal/linuxapp/eal/eal_dev.c | 1 + 4 files changed, 26 insertions(+), 7 deletions(-) -- 2.7.4