2009/235 dladm Possible Values List
Garrett D'Amore
gdamore at sun.com
Mon Apr 13 11:54:57 PDT 2009
James Carlson wrote:
> Girish Moodalbail writes:
>
>> For such drivers, which do not support "possible" values for the MTU
>> property, the <drv>_m_getprop() would return 'ENOTSUP' and we would
>> display the current value of the MTU (as cached by MAC layer) in the output.
>>
>> bash-3.2$ dladm show-linkprop -p mtu mxfe0
>> LINK PROPERTY VALUE DEFAULT POSSIBLE
>> mxfe0 mtu 1500 1500 1500
>>
>> The meaning of 'possible' value, from dladm(1m) man page, is 'list of
>> values the property can have' and in this case it will be 1500.
>>
>
> One of the subtleties of this project is this section:
>
> NOTE: MAC_PROP_POSSIBLE flag needs to be handled 'carefully'.
>
> The reason this project doesn't have to modify every GLDv3 driver is
> that the property in question is not one that drivers actually
> return. Everyone who has a settable MTU has <name>_m_setprop set up
> to handle MAC_PROP_MTU, but nobody has <name>_m_getprop for this,
> because MTU is special-cased in mac_get_prop().
>
> If it were otherwise -- that is, if this were a "normal" property and
> not special-cased in mac_get_prop -- then the proposed design would
> require changing all the drivers.
>
> The next person who wants to extend this (using MAC_PROP_POSSIBLE for
> some other property) may well have to bite that bullet.
>
>
Okay, understanding all this, +1 to this project.
From an implementation/ codereview standpoint, I'd like to see a great
big comment in the header file (and in any actual documentation)
describing this caveat. (Probably at the point that MAC_PROP_MTU is
discussed.)
Thanks.
-- Garrett
More information about the opensolaris-arc
mailing list