RE: [PATCH] [RFC] cxl/region: Fix region creation for greater than x2 switches

From: Dan Williams
Date: Mon Dec 09 2024 - 19:08:20 EST


Ye, Huaisheng wrote:
[..]
> > > Now, "ancestral_ways" also does not show up in the CXL
> > > specification, but that is because the CXL specification leaves at
> > > as an exercise for software to figure out an algorithm to validate
> > > that a proposed ordering of memory-device-decoders in a region can
> > > be supported by the given CXL topology.
>
> Regarding this patch, the distance (or offset) is obtained by
> multiplying the number of distinct targets in region's interest and
> its all ancestral nr_targets. If we renamed "distance" to
> "ancestral_ways", I am afraid that confusion will arise in the future.
> Because this variable is not only determined by ancestral ways.
>
> I think ep_distance or ep_interval, even ep_offset would be better.

The name of the variable is never going to be fully self-describing.
Lets just use the term "distance" and supplement with a healthy comment.

Sent a v2 with that fixup.