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 A450FA054F; Tue, 2 Mar 2021 14:14:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 875A222A32D; Tue, 2 Mar 2021 14:14:50 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 88DF122A30A for ; Tue, 2 Mar 2021 14:14:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614690887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aygCC7bNJKTNgzYJWpctZ1ZSUA318tyl7jz+OhxC9PY=; b=KUv+WvjZ4OQdq3rPe2aarPeejoIWkfO/Z+CgUcIz3KiO3EIlCPPQRqbLIJjn6nGsAdbfBf nGHw1uioZSVL8LEB4fkoEFiPg6OUWjjTOxb+EbXdap83WISHIusHQKkYB5XnBRQUYsjuDl VaNGabo48/OZYlZslkR0iZ8JWhRTKyE= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-469-dkciOl2kObinmIrEeQACFQ-1; Tue, 02 Mar 2021 08:14:46 -0500 X-MC-Unique: dkciOl2kObinmIrEeQACFQ-1 Received: by mail-ua1-f69.google.com with SMTP id u20so5553586ual.13 for ; Tue, 02 Mar 2021 05:14:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=aygCC7bNJKTNgzYJWpctZ1ZSUA318tyl7jz+OhxC9PY=; b=TMnAqpjWy/vc6Hz52jYsE2x9U54tKKvzqgQ1F9uKAPAMbRvmhWRqH8qa7VezCSIu6M aJt2DiNetI34l5p9kZ01VHLl4WZu4eGijvpK9iU8ncUApBH2o2NsSAPQOkGNtXWuEVV7 UJtcqb1QHEehUFP5iHvIV8EUZd4CafLwKbxozRZW05TZxeuv0UTKc2fT2TBszX5vxNX6 oGbCqBGxMZn5t+9HftFh5lwHZfE7vtPmN2x0uNW4QxYNhfMBTzCdIAg2pgJG7ZtPyTcP js+1U382EnokfUiyCt04Pa7EXGToFe2HrFjckCZw60HYilQ6N8/bFchcYRtoZcXPLcp5 93LQ== X-Gm-Message-State: AOAM530Zf5eIoIIlooWTiEgsO5/UKf2A/mOwmc6+u44HJgbuRCsawEpw dEMTBB4FWUbJDbMJC6zOxHIITTPESlzI+ch0jb8MRVmA2kc4YOlp0ITQkj5bNA1wat28hbx4JDv 8jeEWnijLla4W2RDZNpo= X-Received: by 2002:ab0:7a6d:: with SMTP id c13mr12033717uat.53.1614690885709; Tue, 02 Mar 2021 05:14:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJztTaPDeUoyJ3yiX2+HNnzn2jap728U4MjcHP4BO1j1HP9lG4AX4wlMMiuDRROdZSZ9wvz+7AV9DoyBBJCEy4A= X-Received: by 2002:ab0:7a6d:: with SMTP id c13mr12033697uat.53.1614690885473; Tue, 02 Mar 2021 05:14:45 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <85a43efe-ef66-54c0-81b4-6e130a987699@alibaba-inc.com> From: David Marchand Date: Tue, 2 Mar 2021 14:14:34 +0100 Message-ID: To: =?UTF-8?B?6LCi5Y2O5LyfKOatpOaXtuatpOWIu++8iQ==?= Cc: Ferruh Yigit , Maxime Coquelin , dev , "Burakov, Anatoly" , xuemingl@nvidia.com, Gaetan Rivet , "Xia, Chenbo" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Mon, Mar 1, 2021 at 4:44 PM =E8=B0=A2=E5=8D=8E=E4=BC=9F(=E6=AD=A4=E6=97= =B6=E6=AD=A4=E5=88=BB=EF=BC=89 wrote: > >>> What is the downside of using "pause until the I/O completes" version= s? > >> The downside in virtio PMD is a small performance penalty when we use = it > >> to notify backend. CPU executes unnecessary serializing IO instruction= . > >> > >> I check kernel code, io wrapper for in/out doesn't use p version. > > 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 >=3D PIO_MAX ? + *(volatile uint8_t *)addr =3D val : + outb(val, (unsigned long)addr); <=3D=3D=3D=3D=3D=3D +} [...] -#if defined(RTE_ARCH_X86) - outb_p(*s, reg); <=3D=3D=3D=3D=3D=3D -#else - *(volatile uint8_t *)reg =3D *s; -#endif + iowrite8(*s, (void *)reg); This almost went unnoticed (thanks Ferruh for spotting). Do we _need_ this change on outX_p -> outX? 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 to= uch. --=20 David Marchand