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 8ACBFA055D; Wed, 3 Mar 2021 08:56:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B41140683; Wed, 3 Mar 2021 08:56:36 +0100 (CET) Received: from out0-131.mail.aliyun.com (out0-131.mail.aliyun.com [140.205.0.131]) by mails.dpdk.org (Postfix) with ESMTP id B7EBA4067B for ; Wed, 3 Mar 2021 08:56:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alibaba-inc.com; s=default; t=1614758191; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type; bh=k3W6bQW9W4Vc3H2neR97WznJtZiCuPWGJIYOR6aDYzg=; b=my0TMmkpCMjH9V7wrw0pS3T952JlM7epj+bKUlMwXg0+vf4W6yX1aUkgZl4aODMBT0Z73TlgDmoo21Z39/lQ0reYJdAYyFBgcd9WJ+sIZU8c6hhyfOOLi56dT+dNRIRyn2xV+TqfyvAJORGRpQ7VgBIaOoUZEe1JxxipzJfSGP0= X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R111e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018047188; MF=huawei.xhw@alibaba-inc.com; NM=1; PH=DS; RN=8; SR=0; TI=SMTPD_---.Jfp3pqC_1614758190; Received: from 30.43.72.183(mailfrom:huawei.xhw@alibaba-inc.com fp:SMTPD_---.Jfp3pqC_1614758190) by smtp.aliyun-inc.com(127.0.0.1); Wed, 03 Mar 2021 15:56:30 +0800 To: David Marchand Cc: Ferruh Yigit , Maxime Coquelin , dev , "Burakov, Anatoly" , xuemingl@nvidia.com, Gaetan Rivet , "Xia, Chenbo" References: <1611890309-99135-1-git-send-email-huawei.xhw@alibaba-inc.com> <1614014118-91150-1-git-send-email-huawei.xhw@alibaba-inc.com> <1614014118-91150-3-git-send-email-huawei.xhw@alibaba-inc.com> <08e5172f-36ce-13d9-5c96-9d6d1e71153a@intel.com> <967cfffb-1955-afc2-8479-0afa255b317f@alibaba-inc.com> <85a43efe-ef66-54c0-81b4-6e130a987699@alibaba-inc.com> From: "=?UTF-8?B?6LCi5Y2O5LyfKOatpOaXtuatpOWIu++8iQ==?=" Message-ID: <542f0f50-78ff-40e1-62f1-1ef12f18090c@alibaba-inc.com> Date: Wed, 03 Mar 2021 15:56:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v7 2/2] bus/pci: support MMIO in PCI ioport accessors 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/3/2 21:14, David Marchand wrote: >>> This change is a fix/optimisation. >>> This is a separate topic from adding MMIO support with x86 ioport. >>> I would split as a separate patch. >> Hi David: >> >> Maybe there is confuse? There is no change. The out/in is added. I don't >> remove _p on purpose. > Looking at v8 and repeating previous mails: > > +#if defined(RTE_ARCH_X86) > ... > +static inline void iowrite8(uint8_t val, void *addr) > +{ > + (uint64_t)(uintptr_t)addr >= PIO_MAX ? > + *(volatile uint8_t *)addr = val : > + outb(val, (unsigned long)addr); <====== > +} > > [...] > > > -#if defined(RTE_ARCH_X86) > - outb_p(*s, reg); <====== > -#else > - *(volatile uint8_t *)reg = *s; > -#endif > + iowrite8(*s, (void *)reg); > > > This almost went unnoticed (thanks Ferruh for spotting). > > Do we_need_ this change on outX_p -> outX? I understand where the confuse comes from. In the previous implementation, it is _p version, however i think _p is not needed. In the initial DPDK virtio PMD, there is no _p, if my memory is correct. Don't know who added it, if any reason. Anyway, i will send v9 with _p. > I am not comfortable at touching such low level internal routines that > have been in dpdk since v1.5.0. > > If there is a good reason, it has nothing to do with adding MMIO > support and must be split in a separate patch. > If there is no reason, please restore outX_p, since the safest is not to touch.