[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 8 Aug 2019 09:58:50 -0600
From: Logan Gunthorpe <logang@...tatee.com>
To: Christoph Hellwig <hch@....de>
Cc: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-rdma@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>,
Christian Koenig <Christian.Koenig@....com>,
Jason Gunthorpe <jgg@...lanox.com>,
Sagi Grimberg <sagi@...mberg.me>,
Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
Dan Williams <dan.j.williams@...el.com>,
Eric Pilmore <epilmore@...aio.com>,
Stephen Bates <sbates@...thlin.com>
Subject: Re: [PATCH v2 03/14] PCI/P2PDMA: Add constants for not-supported
result upstream_bridge_distance()
On 2019-08-08 1:31 a.m., Christoph Hellwig wrote:
> On Wed, Aug 07, 2019 at 09:58:06AM -0600, Logan Gunthorpe wrote:
>> We only calculate it at the same time as we calculate the distance. This
>> is necessary because, to calculate the type, we have to walk the tree
>> and check the ACS bits. If we separated it, we'd have to walk the tree
>> twice in a very similar way just to determine both the distance and the
>> mapping type.
>
> Calculating it together makes perfect sense. What I find odd is the
> overloading of a single return value. Why not return the map type as
> the return value, and the distance as a by reference argument to keep
> them properly separated?
Ok, understood. I'll make that change and send some incremental patches
to Bjorn tomorrow.
Logan
Powered by blists - more mailing lists