http://cr.opensolaris.org/~artem/br-priv/index.html /net/aja.sfbay/export0/brussels/br-priv/usr/src 6688428 dladm init-linkprop ignores private properties
There's likely to be a mix of design and coding comments, in which case let's discuss design first. The approach is summarized in bug evaluation and included below. Code not fully tested yet, but it's in progress. thanks, -Artem In short, this bug means that Brussels Persistence (6485961) does not work for private properties, i.e. those whose names start with underscore '_'. For a layman person, the current algorithm used by libdladm for enumerating persistent public properties is a peculiar one. Rather than simply enumerate properties that are stored in the persistent store (datalink.conf), we walk the list of all known public property names and, for each, check if it's present in the store. The big assumption is that the set of public properties is limited and well-known. This assumption is reflected in datalink.conf format, e.g.: name=string,bge0;class=int,1;media=int,4;mtu=int,9000;_foo=string,bar; Properties (mtu, _foo) are not self-identifying and indistinguishable from non-property attributes. The big assumption breaks for private properties, which are not well-known and potentially unlimited. We propose to: 1. Identify properties, both public and private, with a unique prefix, "linkprop:". The line above would transform to: name=string,bge0;class=int,1;media=int,4;linkprop:mtu=int,9000;linkprop:_foo=string,bar; 2. Provide a new function dladm_walk_linkprop_priv_db() for walking persistent private link properties. 3. In order to implement the above function, extend dlmgmtd with a new door call, DLMGMT_CMD_LINKPROP_GETNEXT, which can be used to enumerate all persistent properties associated with a link. 4. Transition plan: enhance dlmgmtd to detect old datalink.conf format and upgrade to new format. Thus, format conversion would occur automatically upon first boot after upgrade. Same could be achieved using class action script, but with OpenSolaris switching from SVR packaging to IPS, our approach is more future proof. 5. As an added bonus, make 'dladm show-linkprop -P' print persistent private properties in addition to public.
