Peter Memishian wrote:
> > The proposal is that we would have something like
> >
> > # dladm set-linkprop -p en-mii=100M-fh,10M-h link1
> >
> > which I would venture, would set 100M-fdx, 100M-hdx, 10M-hdx,
> > and leave any other existing settings (e.g., 1000M-fdx) unchanged.
> >
> > But in that world, how do I turn *off* some setting (e.g., 10M-fdx
> > and 10M-hdx)?
> >
> > One (poor, imo) choice is to say that *all* speed-duplex settings must
> > be enumerated in the set-linkprop line at all times, and anything
> > that isn't present will not be set. This would result in a clumsy,
> > bulky command line (I personally would find it tedious to use).
>
> This has nothing specifically to do with the proposed en-mii option, but
> is rather a general issue with link properties that can have a lot of
> values (such as cpus, WiFi speed, and undoubtedly others to come). We've
> discussed this before in a different context (dlstat) where there was a
> proposal to use the prefix "+" to add an item and "-" to remove an item.
> I think a similar approach could be used with link properties -- e.g.:
>
> * Assign en-mii to 100M-fh,10M:
>
> # dladm set-linkprop -p en-mii=100M-fh,10M-h link1
> ^
> * Add 100M-fh,10M to en-mii:
>
> # dladm set-linkprop -p en-mii+=100M-fh,10M-h link1
> ^^
> * Remove 100M-fh,10M from en-mii:
>
> # dladm set-linkprop -p en-mii-=100M-fh,10M-h link1
> ^^
>
WiFi speed should also normally not be "manually" selected -- the AP
usually drives that option and STAs don't need to tweak it. I can
understand something like this being manually adjusted for CPUs, but at
that point just specifying a full list is probably the best (and
simplest) way to deal with it.
I'm unconvinced that we need to add complexity here to support this kind
of construct. I'd like to see a concrete example where this kind of
construct is desirable. I've rejected the three proposed so far (WiFi
speed, CPUs, and MII properties.)
Again, KISS.
-- Garrett