Sowmini.Varadhan at Sun.COM wrote:
> On (03/06/08 11:26), Garrett D'Amore wrote:
>
>>> If the concern is around the lack of error reporting, the synopsis
>>> of mac_register_priv_prop can be changed to return an int, with 0
>>> return status indicating success, and EEXIST indicating that the
>>> registered name is a duplicate.
>>>
>> Probably not of much value, IMO. (We need to be trying to wean
>> developers off of private properties and ndd, and if I can avoid having
>> to have error checks in the driver, it will make for
>> shorter/cleaner/simpler code in the driver -- that's a good thing IMO.)
>>
>
> I could not agree more.
>
>
>> I'd like to ensure that the "names" passed to mac_register_priv_prop
>> also start with an underscore.
>>
>
> And have mac_ndd shim strip out (or add in) the "_" prefix to retain
> compatibility with existing snv output (or input) for the same command?
>
Actually, I'm still unconvinced about the need to support "private" or
"non-canonical" properties via ndd. I think that in the new world,
folks should use dladm, which includes a programmatic API via libdladm.
I know that ndd is widely used for MII properties (and perhaps MTU), but
I remain unconvinced that the folks who are using it today or other
things would need to continue to do so given the option of a dladm based
equivalent.
But if we assume that we do want to support these nasty things via ndd,
then I guess using the stripping is not a terrible alternative.
-- Garrett