From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id D915BA034F;
	Thu, 25 Feb 2021 10:52:18 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 57B4040692;
	Thu, 25 Feb 2021 10:52:18 +0100 (CET)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [170.10.133.124])
 by mails.dpdk.org (Postfix) with ESMTP id 8243D4067B
 for <dev@dpdk.org>; Thu, 25 Feb 2021 10:52:16 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1614246735;
 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=S0Aer1rHITbaAiArqOIR6KYoPpPzHXJwVTLWlMYIJzA=;
 b=BkgpaTKbhzWYT50yZS9Qn/g0MbRlNG0frHvv6zYliHipCma8iE7X6jHV0gDSnu2uKM+/Ev
 zYAFHA+fOKVD8r5aS+wG2ZsgvRsrkx6SO5j7gJ/aFY6tS0+JrV++kv2G3oAJ8zaH4/Nan3
 Kz3dGiCuPxwv3HTZXmz9Y6VK9S3epuI=
Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com
 [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-58-hYUnSwihNNeqQO-HF5ldVQ-1; Thu, 25 Feb 2021 04:52:13 -0500
X-MC-Unique: hYUnSwihNNeqQO-HF5ldVQ-1
Received: by mail-vk1-f197.google.com with SMTP id 21so846036vkj.9
 for <dev@dpdk.org>; Thu, 25 Feb 2021 01:52:13 -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=S0Aer1rHITbaAiArqOIR6KYoPpPzHXJwVTLWlMYIJzA=;
 b=F1uqNRlBAJ6OumT0WLX4J6jHiSn5XRCndQAUl8BXAP7ixCnoLBWpzOnXTvg3C2vtOy
 rL5Ltg+t+gCROPkBSLXK9tlu269CcGJP6lcMydPwnQZoaBQ5H9xHjl1a5gHtqYYHwhLV
 vJgAIWjQb/BKPKrVEzUb9V/EGy0nj7pChpzdQfh6fbb617FUPURZ7OJxZ7sNOQvl9XJp
 zp5u9oEoBwoG9920kO/bD6yantXLtkFppvcUaQN7AzeI+52e2Tm0AHrg+qLD0HLkG21e
 SAVvavFGQtrZ+cQ7KeVhzp2KK+zu7eMja6TUIWvyOWpB88BwXHbe0LSjBJynfyzHTd4s
 /MEA==
X-Gm-Message-State: AOAM531vR40+bKek8yKljiDHy1zCBUkKdW9fZomOyZvTFhJzn1taIA+B
 Pk0rBsvJuV2tPTezk0Pyl+SdUDYU9h08YH5KxmLkXY1Qvh46gp/enXWk73fuMqI4NaqlrOspotZ
 wBCNa3dhR3QRi1jQTRAY=
X-Received: by 2002:ab0:1849:: with SMTP id j9mr974278uag.41.1614246733314;
 Thu, 25 Feb 2021 01:52:13 -0800 (PST)
X-Google-Smtp-Source: ABdhPJzLwCm8ccSqLZ7Vu5NbsAVX5dXAOi7yMj3QAOZMo31QrWfcfJoz22LnehGowgBcyrj6ajfM2M7snJTEXhlv51k=
X-Received: by 2002:ab0:1849:: with SMTP id j9mr974273uag.41.1614246733144;
 Thu, 25 Feb 2021 01:52:13 -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>
 <b34311c7-5b09-a1f6-1957-c9e19bb2a273@intel.com>
 <e53cfa75-4505-c0fe-2214-1d066b2e28ba@alibaba-inc.com>
 <08e5172f-36ce-13d9-5c96-9d6d1e71153a@intel.com>
 <967cfffb-1955-afc2-8479-0afa255b317f@alibaba-inc.com>
In-Reply-To: <967cfffb-1955-afc2-8479-0afa255b317f@alibaba-inc.com>
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 25 Feb 2021 10:52:02 +0100
Message-ID: <CAJFAV8w4qvrazksjvy4=5YUtQwRku_FQDMhhmv59-i8o8Zh-Fg@mail.gmail.com>
To: =?UTF-8?B?6LCi5Y2O5LyfKOatpOaXtuatpOWIu++8iQ==?=
 <huawei.xhw@alibaba-inc.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
 Maxime Coquelin <maxime.coquelin@redhat.com>, 
 dev <dev@dpdk.org>, "Burakov, Anatoly" <anatoly.burakov@intel.com>,
 xuemingl@nvidia.com, 
 Gaetan Rivet <grive@u256.net>, "Xia, Chenbo" <chenbo.xia@intel.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Thu, Feb 25, 2021 at 5:00 AM =E8=B0=A2=E5=8D=8E=E4=BC=9F(=E6=AD=A4=E6=97=
=B6=E6=AD=A4=E5=88=BB=EF=BC=89 <huawei.xhw@alibaba-inc.com> wrote:
> >>> Is the 'outb_p' to 'outb' conversion intentional? And if so why?
> >>>
> >>> Same of the all 'outb_p', 'outw_p', 'outl_p'.
> >>
> >> There is no need to delay for virtio device, as we can see in virtio
> >> legacy driver.
> >>
> >> IMO, the delay is for ugly old device. The device itself should
> >> assure the previous IO completes when the subsequent IO instruction
> >> arrives.
> >>
> >
> > Can there be any virtio legacy device needing this?
>
> The pause version delays sometime by writing to 0x80 debug port. virtio
> doesn't need this. virtio legacy PMD driver doens't use this.
>
> Any device relying on this i think is buggy. How could the device rely
> on some uncertain cpu cycles to behave correct?
>
> >
> > What is the downside of using "pause until the I/O completes" versions?
>
> 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.


--=20
David Marchand