From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 8FB29B674 for ; Tue, 17 Feb 2015 06:53:58 +0100 (CET) Received: by pdbfp1 with SMTP id fp1so41336559pdb.9 for ; Mon, 16 Feb 2015 21:53:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=xyr6H/6RB4BpXFCazJrJg2i8GE2ne7pWkVwJ+kg/tiw=; b=QzTTaGLYBRShJSA1TefdGIEIDvdi0PZfva0ISGSbFrunCd8R03tF90WrRmBBgTjJP1 Nwzqp1K6I2BFFDZ5RddxfCwDOKstboY2JiUMtXuTR0sZZSbto/ZHpCWOOIGNmQ1PwrM9 KVHiyCxahyr4jrtIN4Sq5CLhXSrXUS6j7z3vasxi1Tub/X9S4WhSC38gmY10GRMgTcnu pRm+thaGDj6xhmUUaTKX2L7hHiTLtdiedtGMS7gUm28ILQE21f7nsZzQBD0LAQeb1MEd APLxnXz6Ypb4NKjv9l5qJxvC8/p9uY2kK9mJFsJu7PeDfyD21ogbdy8b2W8vjLayKAJU eEkg== X-Gm-Message-State: ALoCoQli6MaRUUMdGmtwj4SdPqLns7EvNgMIBR9m79jSROe7dYdXGhVDNR7XDt8o+iykEd+dpjad X-Received: by 10.66.144.201 with SMTP id so9mr12586793pab.78.1424152437799; Mon, 16 Feb 2015 21:53:57 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id c9sm16450629pdj.52.2015.02.16.21.53.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 21:53:57 -0800 (PST) Message-ID: <54E2D773.9020204@igel.co.jp> Date: Tue, 17 Feb 2015 14:53:55 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Neil Horman References: <1423470639-15744-2-git-send-email-mukawa@igel.co.jp> <1424060073-23484-9-git-send-email-mukawa@igel.co.jp> <20150216124513.GB18670@neilslaptop.think-freely.org> In-Reply-To: <20150216124513.GB18670@neilslaptop.think-freely.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v8 08/14] eal/linux/pci: Add functions for unmapping igb_uio resources 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: Tue, 17 Feb 2015 05:53:59 -0000 On 2015/02/16 21:45, Neil Horman wrote: > On Mon, Feb 16, 2015 at 01:14:27PM +0900, Tetsuya Mukawa wrote: >> The patch adds functions for unmapping igb_uio resources. The patch is only >> for Linux and igb_uio environment. VFIO and BSD are not supported. >> >> v8: >> - Fix typo. >> (Thanks to Iremonger, Bernard) >> v5: >> - Fix pci_unmap_device() to check pt_driver. >> v4: >> - Add parameter checking. >> - Add header file to determine if hotplug can be enabled. >> >> Signed-off-by: Tetsuya Mukawa >> --- >> lib/librte_eal/common/Makefile | 1 + >> lib/librte_eal/common/include/rte_dev_hotplug.h | 44 +++++++++++++++++ >> lib/librte_eal/linuxapp/eal/eal_pci.c | 44 +++++++++++++++++ >> lib/librte_eal/linuxapp/eal/eal_pci_init.h | 8 +++ >> lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 65 +++++++++++++++++++++++++ >> 5 files changed, 162 insertions(+) >> create mode 100644 lib/librte_eal/common/include/rte_dev_hotplug.h >> >> diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile >> index 52c1a5f..db7cc93 100644 >> --- a/lib/librte_eal/common/Makefile >> +++ b/lib/librte_eal/common/Makefile >> @@ -41,6 +41,7 @@ INC += rte_eal_memconfig.h rte_malloc_heap.h >> INC += rte_hexdump.h rte_devargs.h rte_dev.h >> INC += rte_common_vect.h >> INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h >> +INC += rte_dev_hotplug.h >> >> ifeq ($(CONFIG_RTE_INSECURE_FUNCTION_WARNING),y) >> INC += rte_warnings.h >> diff --git a/lib/librte_eal/common/include/rte_dev_hotplug.h b/lib/librte_eal/common/include/rte_dev_hotplug.h >> new file mode 100644 >> index 0000000..b333e0f >> --- /dev/null >> +++ b/lib/librte_eal/common/include/rte_dev_hotplug.h >> @@ -0,0 +1,44 @@ >> +/*- >> + * BSD LICENSE >> + * >> + * Copyright(c) 2015 IGEL Co.,LTd. >> + * All rights reserved. >> + * >> + * Redistribution and use in source and binary forms, with or without >> + * modification, are permitted provided that the following conditions >> + * are met: >> + * >> + * * Redistributions of source code must retain the above copyright >> + * notice, this list of conditions and the following disclaimer. >> + * * Redistributions in binary form must reproduce the above copyright >> + * notice, this list of conditions and the following disclaimer in >> + * the documentation and/or other materials provided with the >> + * distribution. >> + * * Neither the name of IGEL Co.,Ltd. nor the names of its >> + * contributors may be used to endorse or promote products derived >> + * from this software without specific prior written permission. >> + * >> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >> + */ >> + >> +#ifndef _RTE_DEV_HOTPLUG_H_ >> +#define _RTE_DEV_HOTPLUG_H_ >> + >> +/* >> + * determine if hotplug can be enabled on the system >> + */ >> +#if defined(RTE_LIBRTE_EAL_HOTPLUG) && defined(RTE_LIBRTE_EAL_LINUXAPP) >> +#define ENABLE_HOTPLUG >> +#endif /* RTE_LIBRTE_EAL_HOTPLUG & RTE_LIBRTE_EAL_LINUXAPP */ > I'm not sure why you're doing this. Why not just test RTE_LIBRTE_EAL_HOTPLUG in > the various locations where your testing ENABLE_HOTPLUG? This seems like > indirection for the sake of indirection. > Neil > Hi Neil, I will define RTE_LIBRTE_EAL_HOTPLUG=y in only Linux configuration. And use it other places like you said. Thanks, Tetsuya