>> I'm wrong, that's a different rw object. Perhaps we just need to hold on to
>> i_mac_prop_lock while using a proplist pointer. Let me think about it.
>
> yeah, it's tricky because, as Thirumalai pointed out in
> the discussion about freeing the mac_impl_t itself (see
> http://www.opensolaris.org/jive/thread.jspa?threadID=38489&tstart=15),
> the mac layer only has control via mac_stop, but the ddi framework
> controls when the detach happens.
Right. If we hold i_mac_prop_lock as RW_READER while finding and using
proplist, attempts to free will wait because they want RW_WRITER; yet
multiple updates can run in parallel. I'm pretty sure that'll work,
since I've just raised my blood sugar by eating a huge cookie :)
To address your previous question about listing properties from mdb,
this is what I can do now:
> *i_mac_prop_hash::modhash -e
ADDR VAL KEY
fffffffec5677520 fffffffec7f13e70 fffffffec7f13e78 bge0
> fffffffec7f13e70::print mac_proplist_t mpl_props | ::list mac_prop_t
mp_next | ::print mac_prop_t mp_prop
{
mp_prop.pr_version = 0x1
mp_prop.pr_flags = 0
mp_prop.pr_ifname = [ "bge0" ]
mp_prop.pr_num = 0x5
mp_prop.pr_name = [ "default_mtu" ]
mp_prop.pr_valsize = 0x8
mp_prop.pr_val = [ '\334' ]
}
{
mp_prop.pr_version = 0x1
mp_prop.pr_flags = 0
mp_prop.pr_ifname = [ "bge0" ]
mp_prop.pr_num = 0x4
mp_prop.pr_name = [ "adv_autoneg_cap" ]
mp_prop.pr_valsize = 0x1
mp_prop.pr_val = [ '\001' ]
}
>
A handy shell script will make it even easier.
-Artem