Paul Durrant brought up the following:

>> The only other issue is whether you wish to be able to make tunables         
>> that are immutable for a particular PHY read-only such that tests like       
>>  NICDRV don't fail because they can't write to them.               

which goes back to CR 6723890
(http://bugs.opensolaris.org/view_bug.do?bug_id=6723890), namely,
some tunables are not write-able on some hardware types (e.g., adv_100fdx
on fiber interfaces). 

So Paul, Garrett and I were brain-storming ways to come up with
a solution.  

One possibile way to implement this 

Add an extra property ("MAC_PROP_PERM") that queries the 
r/w perms on the prop and prints that in an additional column 
of the dladm show-linkprop output.  For example, 

LINK   PROPERTY  PERM       VALUE          DEFAULT        POSSIBLE
bge0   mtu       r/w        1500           1500           --

The MAC_PROP_PERM property  would also allow the mac_ndd layer to call
getprop and obtain the right permissions and fix CR 6723890.

Another solution that Paul suggested:

Paul> mc_getprop entry could perhaps pass back the
Paul> permissions when the default value is read? I don't think they could be
Paul> specified at mac_register() time (like the priv_prop perms. have to be)
Paul> because the driver will nto necessarily have probed it's h/w at that
Paul> point (before mc_start() is called).

This would need some reconstruction of the getprop semantics- today
the only difference between getprop for current and default values
is that the MAC_PROP_DEFAULT flag is passed in for the latter. To
support the permissions flag, my own preference would be to add
a pr_perm field to the dld_ioc_prop_t, thought this field would not
be meaningful for the setprop case.

I have a slight preference for the new MAC_PROP_PERM method myself.
Other opinions? 

--Sowmini


Reply via email to