linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Dongdong Liu <liudongdong3@huawei.com>
Cc: hch@infradead.org, logang@deltatee.com, leon@kernel.org,
	linux-pci@vger.kernel.org, rajur@chelsio.com,
	hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH V11 7/8] PCI: Enable 10-Bit Tag support for PCIe Endpoint device
Date: Fri, 5 Nov 2021 12:39:49 -0500	[thread overview]
Message-ID: <20211105173949.GA932723@bhelgaas> (raw)
In-Reply-To: <894a1e8f-cc08-2710-9f56-9dda14e2e617@huawei.com>

On Fri, Nov 05, 2021 at 04:24:24PM +0800, Dongdong Liu wrote:
> On 2021/11/4 0:02, Bjorn Helgaas wrote:

> > But it does remind me that if the RC doesn't support 10-bit tags, but
> > we use sysfs to enable 10-bit tags for a reqester that intends to use
> > P2PDMA to a peer that *does* support them, I don't think there's
> > any check in the DMA API that prevents the driver from setting up DMA
> > to the RC in addition to the peer.
>
> Current we use sysfs to enable/disable 10-bit tags for a requester also
> depend on the RP support 10-bit tag completer, so it will be ok.

Ah, OK.  So we can never *enable* 10-bit tags unless the Root Port
supports them.

I misunderstood the purpose of this file.  When the Root Port doesn't
support 10-bit tags, we won't enable them during enumeration.  I
though the point was that if we want to do P2PDMA to a peer that
*does* support them, we could use this file to enable them.

But my understanding was wrong -- the real purpose of the file is to
*disable* 10-bit tags for the case when a P2PDMA peer doesn't support
them.

It does support enabling 10-bit tags as well, but that's only because
we need a way to get back to the default "enabled during enumeration"
state without having to reboot.

We might be able to highlight this a little more in the commit log.

> > 10-bit tag support appeared in the spec four years ago (PCIe r4.0, in
> > September, 2017).  Surely there is production hardware that supports
> > this and could demonstrate a benefit from this.
>
> I found the below introduction about "Number of tags needed to achieve
> maximum throughput for PCIe 4.0 and PCIe 5.0 links"
> https://www.synopsys.com/designware-ip/technical-bulletin/accelerating-32gtps-pcie5-designs.html
> 
> It seems pretty clear.

Yes, that's a start.  But we don't really need a white paper to tell
us that more outstanding transactions is better.  That's obvious.  But
this adds risk, and if we can't demonstrate a tangible, measurable
benefit, there's no point in doing it.

Bjorn

  reply	other threads:[~2021-11-05 17:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-30 13:53 [PATCH V11 0/8] PCI: Enable 10-Bit tag support for PCIe devices Dongdong Liu
2021-10-30 13:53 ` [PATCH V11 1/8] PCI: Use cached devcap in more places Dongdong Liu
2021-10-30 13:53 ` [PATCH V11 2/8] PCI: Cache Device Capabilities 2 Register Dongdong Liu
2021-10-30 13:53 ` [PATCH V11 3/8] PCI: Add 10-Bit Tag register definitions Dongdong Liu
2021-10-30 13:53 ` [PATCH V11 4/8] PCI/sysfs: Add a tags sysfs file for PCIe Endpoint devices Dongdong Liu
2021-11-01 20:54   ` Bjorn Helgaas
2021-11-02 13:03     ` Dongdong Liu
2021-10-30 13:53 ` [PATCH V11 5/8] PCI/IOV: Add tags sysfs files for VF devices Dongdong Liu
2021-10-30 13:53 ` [PATCH V11 6/8] PCI/P2PDMA: Add a 10-Bit Tag check in P2PDMA Dongdong Liu
2021-10-30 13:53 ` [PATCH V11 7/8] PCI: Enable 10-Bit Tag support for PCIe Endpoint device Dongdong Liu
2021-11-01 22:02   ` Bjorn Helgaas
2021-11-01 22:33     ` Bjorn Helgaas
2021-11-03 10:05       ` Dongdong Liu
2021-11-03 16:02         ` Bjorn Helgaas
2021-11-05  8:24           ` Dongdong Liu
2021-11-05 17:39             ` Bjorn Helgaas [this message]
2021-10-30 13:53 ` [PATCH V11 8/8] PCI/IOV: Enable 10-Bit Tag support for PCIe VF devices Dongdong Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211105173949.GA932723@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=hch@infradead.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=leon@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liudongdong3@huawei.com \
    --cc=logang@deltatee.com \
    --cc=netdev@vger.kernel.org \
    --cc=rajur@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).