[brussels-dev] code review: mac prop handle
Artem Kachitchkine
Artem.Kachitchkin at Sun.COM
Wed Sep 19 14:01:52 PDT 2007
> ipw2100_impl.h:
> need to include <net/if.h> somewhere? seems like IFF_PROMISC is used
> in that driver.
I will add it (right now it is included indirectly ipw2100_impl.h <-
mac.h <- dld.h <- net/if.h).
> - mac_setprop():
> in the (!init_link) case, we only want to commit the
> changes via mac_prop_update if the mc_setprop callback itself
> succeeds
Hmm, I thought I fixed that but evidently I didn't. Thanks for noticing.
> - what is the expected typical/atypical driver usage? I think
> we had discussed possible cases where the driver caches the mph, and
> talked about how to deal with cached prop handles by using
> refcounts. Is that deferred for a separate wad of changes?
No, this is all supported in this wad. proplists are refcounted, they
won't be freed until it reaches 0. Drivers increment/decrement it via
mac_prop_init/fini. The framework does this via mac_prop_load/unload -
which are called from mac_start/stop. So all cases are covered: when
only the framework uses cached properties, when only the driver uses
them, and when both.
> - nit: the XXX at line 2424 should be fixed in the gate by now,
> after Samant's putback, so this comment can be removed.
OK.
> - Not an urgent priority, more an RFE:
> would be nice to have an mdb walker for the mac property list.
What's the advantage compared to ::list piped into ::print ?
> This changes the interfaces in Section 4 of the design doc.
> If you have any edits for that section (maybe its better to leave
> specifics out, and ARC the details later for the Brussels-persistence
> case), please send them my way.
I'll look into this.
thanks,
-Artem
More information about the brussels-dev
mailing list