From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ED36DA052A; Mon, 25 Jan 2021 04:08:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64F7D140DBF; Mon, 25 Jan 2021 04:08:17 +0100 (CET) Received: from out0-138.mail.aliyun.com (out0-138.mail.aliyun.com [140.205.0.138]) by mails.dpdk.org (Postfix) with ESMTP id 1B104140DAA for ; Mon, 25 Jan 2021 04:08:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alibaba-inc.com; s=default; t=1611544093; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type; bh=+X45KEibIotGentVhOJeYz0lCSMkWRQGzZBrLqQ3nuw=; b=Ht5sksIu0Kka/+MyKsXFgpfH2XebiVKMG/K7dyMC/OgBqeudbLMjJYz/LfsL8Su96UhWroAf6AZoeWefH6nStT3FqFyYdHDpvLYrm0Yjm9Wp/95IuTviMfInubDyS19YsGEA/SpB6nknRwcXkrRQhu0chH2sRLjSH5jAdmrGIas= X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R981e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018047187; MF=huawei.xhw@alibaba-inc.com; NM=1; PH=DS; RN=9; SR=0; TI=SMTPD_---.JPjnMSg_1611544091; Received: from 30.43.72.123(mailfrom:huawei.xhw@alibaba-inc.com fp:SMTPD_---.JPjnMSg_1611544091) by smtp.aliyun-inc.com(127.0.0.1); Mon, 25 Jan 2021 11:08:12 +0800 To: "Xueming(Steven) Li" , "ferruh.yigit@intel.com" Cc: "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "anatoly.burakov@intel.com" , "david.marchand@redhat.com" , "zhihong.wang@intel.com" , "chenbo.xia@intel.com" , "grive@u256.net" References: <68ecd941-9c56-4de7-fae2-2ad15bdfd81a@alibaba-inc.com> <1603381885-88819-1-git-send-email-huawei.xhw@alibaba-inc.com> <1603381885-88819-3-git-send-email-huawei.xhw@alibaba-inc.com> From: "=?UTF-8?B?6LCi5Y2O5LyfKOatpOaXtuatpOWIu++8iQ==?=" Message-ID: Date: Mon, 25 Jan 2021 11:08:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v5 2/3] PCI: support MMIO in rte_pci_ioport_map/unap/read/write X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2021/1/24 23:22, Xueming(Steven) Li wrote: >> + } else if (flags & IORESOURCE_MEM) { >> + iobar = 0; >> + base = (unsigned long)dev->mem_resource[bar].addr; >> + RTE_LOG(INFO, EAL, "%s(): MMIO BAR %08lx detected\n", >> __func__, base); > Same here, INFO level seems chatty. makes sense. would remove it. > >> + } else { >> + RTE_LOG(ERR, EAL, "%s(): unknown BAR type\n", __func__); >> + goto error; >> + } >> + >> + >> + if (iobar && rte_eal_iopl_init() != 0) { >> + RTE_LOG(ERR, EAL, "%s(): insufficient ioport permissions for >> PCI device %s\n", >> + __func__, dev->name); >> goto error; >> } > Same as Maxime's suggestion, please move this block as well. Thanks. It is already moved in v6 patch. >> - base = (unsigned long)phys_addr; >> - RTE_LOG(INFO, EAL, "%s(): PIO BAR %08lx detected\n", __func__, >> base); >> >> - if (base > UINT16_MAX) >> + if (iobar && (base > UINT16_MAX)) { > PIO_MAX defined below, please use it here. UNI16_MAX used in patch 1/3 as well. ok.