Cathy Zhou wrote: > ... > >>> Note that vanity naming is not turned on by default, the old >>> applications should just work if there is no vanity naming on the >>> system (as we kept the old kstat syntax, also, be noted the old >>> application might not work as it expects as 6512267 suggests). In >>> the future, I'd hope that applications can be changed based on the >>> new syntax. >> >> >> Vanity naming is there, waiting to be used, when the system is >> installed. To the best of my knowledge, there's no special magic >> required apart from using dladm to rename a link, at which point >> I doubt there is a message saying "oops, don't use your new link >> name with kstat programs because they may not work." >> >> Let me illustrate the problem. >> >> Today if I'm given a network interface name of "bge0", the most >> correct way to ask kstat about it is to use a call like this: >> >> kstat_lookup(kc, "bge", 0, "bge0") >> > Note that this would still work (if vanity naming is not used), as we > kept the "legacy" kstats. > > The things won't work is that if you renamed bge0 to net0, and tries > to lookup its kstat using kstat_lookup(kc, "net", 0, "net0").
Right, this worries me. >> kc = kstat_open(); >> if ((ksp = kstat_lookup(kc, "link", -1, ifname)) == NULL) >> ksp = kstat_lookup(kc, module, instance, ifname); >> > I think this would be the precise way to lookup a kstat after UV. > >> The only caveat here is that it isn't clear whether or not the >> names used within kstat are stable and thus whether or not >> this your escape hatch. I'm concerned that there's a major >> architectural problem here (with respect to names and using >> kstat) that people won't find out about until they get bitten by it. >> > Sorry. I don't think I understand. Can you clarify what architectural > problem you meant? You're reducing (or changing) the interfaces that can be used to get network interface statistics. While the APIs and ABIs are unchanged, software that works today using libkstats may stop working after a "dladm rename". So, for example, I have S10U3 installed with package XYZ that uses kstats() to get NIC information, I do an upgrade to S10Ux with UV, dladm rename and things stop working. Hmm, the 20Q says that this project is targetting a minor release of Solaris, so it will never go into a S10 update...so maybe this change is ok? Are there documentation updates planned for kstat(1m) and kstat_lookup(3kstat) that instruct people to use "link" for network interfaces? Darren _______________________________________________ networking-discuss mailing list [email protected]
