On (02/01/08 21:14), Peter Memishian wrote: > > > Another related issue that comes to mind is > > that, for printing DEFAULT and POSSIBLE values, we currently have > > a strong bias in dladm for using constant val_desc_t structures. > > (wifi drivers have some exceptions for POSSIBLE, via the pd_getmod > > callback, but the code everywhere expects constant DEFAULT values). > > > > So the "default" can vary based on the link type- e.g., for mtu > > where the default for ethernet != default for iptunnel. So one > > enhancement would be to have a "DEFAULT" flag passed down > > with the set/getprop, and pass these flags all the way to the driver. > > In the case of a setprop, the driver would then reset itself > > to the defaults, in the case of getprop, it would return the > > default. Similarly we could have a MODIFIABLE flag (invalid > > with a setprop, can get POSSIBLE list with getprop) > > > > Comments? > > No objections here.
The DEFAULT value feels like it belongs in the mactype_t- is there any other more appropriate place in the mactype plugin? Is there some deviation from the "defaults apply to all links of a certain mactype" rule that I'm missing? > One thing that I've wrestled with in the past (and > never satisfactorily resolved) was with how to handle values that are > generally supported but not supported based on the current configuration > (e.g., because of the underlying driver, type of link, or other datalink > configuration). In a GUI, these would be the things that we'd "gray out" > to indicate to the administrator "if you *could* set this, you'd do it > here, but it's not supported with your present configuration". Ah, so this would suggest a "POSSIBLE" vs "CAPABLE" set of values- the latter would denote "I can sometimes do these values, but not today". Not sure if we should print out the CAPABLE list via show-linkprop, or just show it in a GUI. So in my proposal, we'd have 3 possibilities for the flags being passed down with the set/get prop - default (get or reset) - possible (get only) - capable (get only) --Sowmini
