On (06/16/09 19:05), Peter Memishian wrote:
> 
>  > >  > and in the +=, -= world, how does one do "enable 100-h and disable 
> 10-fh"
>  > >  > without using 2 commands
>  > > 
>  > > With my proposal that would still have to be done with a set (=)
>  > > operation.  
>  > 
>  > Today with the en_* and adv_* properties you can set a value (e.g.,
>  > en_10fdx_cap) to 0 or 1 - 0 means disable, 1 means enable. could you
>  > give an example of how you would do this with the en-mii proposal (and
>  > without the += or -=, and without listing the full set of speed/duplex
>  > pairs in the command line)?
> 
> As per my earlier email, the proposal is not trying to support arbitrary
> transforms.  If the admin has e.g. a SPEED-DUPLEX value of 100g-f,10m-h
> and they want to change the 10m-h value to 10m-f then they would need to
> enter 100g-f,10m-f, or first do -=10m-h followed by += of 10m-f.  If they
> just want to add or remove a specific value then they can use += or -=.
> For instance, if they wanted to add CPU 12 to the list of cpus, they'd do
> set-linkprop -p cpus+=12.

In all of these cases, I presume that the datalink.conf will have something
(imo gross) like

en_10gfdx_cap=1,en_10ghdx_cap=..,en_1000fdx_cap=..,en_1000hdx_cap=..,en_100fdx_cap=..,en_100hdx_cap=..,
 en_10fdx_cap=..,en_10hdx_cap=..

just because 1 value was changed. Then we would have dladm imposing
set-linkprops of (what one hopes is still) the default value  each time
the driver restarts. And all because 1 single value was changed.

> 
> Is there a specific concern with such a model?

see above.

>  > Also in today's model, only the modified setting (en_10fdx_cap = 0, 
>  > in my example) is saved in datalink.conf.  As I understand, in your
>  > proposal, the whole set of enabled props would have to get stored in
>  > datalink.conf (and then, if the NIC is DR'ed or otherwise changes its
>  > defaults, the stored set in datalink.conf may be out of sync).
> 
> There are pros and cons with both approaches in the case of DR'd hardware.
> Are they overriding the setting because of a switch problem?  A card
> problem?  Just general confusion?  Unclear, so it's hard to say what ideal
> behavior would be.

Imposing defaults from user-space for untuned values (instead of just
letting the driver do its thing) is not a good idea- reset-linkprop 
carefully avoids this by actually removing the property setting itself.

Which then raises the question, how is "reset-linkprop" supposed to
work for the mii property? Do I just have to reset all of it (when
I may have only wanted to reset one en_xxxyyy_cap property)?

--Sowmini


Reply via email to