I just pushed 6883381 GLDv3 incorrectly assumes mac instance == ddi_get_instance()
As part of this change, I've fixed assumptions in Nemo that physical drivers would have their PPA == ddi_get_instance(). This heads up is a request to engineering folks in the group, please be aware that it is perfectly reasonable for a GLDv3 to have a PPA != ddi_get_instance(). There may be a few places in other code (such as the network boot logic) that still have this assumption, but for the most part its all cleaned up now.
PLEASE, don't reinstate it. If you think you need to call ddi_get_instance() in any networking code, please double check that you're not making a potentially bad assumption. There are real devices out there that have multiple ethernet ports on a single PCI function (hence multiple PPAs per dev_info_t.) For these devices, the mac uses mac->mi_instance > 0 (and typically != ddi_get_instance()).
Reviewers, I'd ask that you pay attention to this consideration as well. Again, in networking code, I'd probably raise a red flag requiring closer scrutiny for anything that calls ddi_get_instance().
This assumption needs to be watched for in userland code as well. The device instance number is completely orthogonal to the PPA used with it.
Thanks. -- Garrett _______________________________________________ networking-discuss mailing list [email protected]
