On 05/14/2016 10:56 AM, Cole Robinson wrote:
I agree with the goal of the patch, but I think all the index
assignment code
should be moved to somewhere in the PostParse call path. The fact that the
controller ParseXML now needs to act on the entire domain def is a giveaway
that it's in the wrong place.
I originally did it that way, but there was some problem with it, either
actual or imagined/potential. I *think* possibly the problem was that
auto-added controllers (which is done in the driver-specific postparse,
called prior to the common postparse) are added when an existing
controller of the desired index can't be found, but if an index was
added in postparse, I would want it to be done in the common postparse
(since it is a requirement for *all* drivers); also is the potential
problem that PCI controller indexes must be in place in order for the
PCI address auto-assignment to work, and you had previously expressed a
desire to move that up into one of the postparse functions rather than
having it be a separate function that must be independently called - if
that happened, it would also be done in the driver-specific postparse.
I'll look at it some more and see if I can find an acceptable way to
make everyone happy.
Also this seems like it should have test suite changes too
Yeah, I've been trying to be better about that, but I forgot this time -
some tests that have index-less controllers as the input and indexes in
the output would be useful.