On (06/23/08 14:59), Sebastien Roy wrote:
> I'm merging the Brussels Persistence wad into the Clearview gate, and am
> wondering how to handle calls to dladm_init_linkprop(). What is the new
> 2nd argument to this function?
>
> dladm_status_t
> dladm_init_linkprop(datalink_id_t linkid, boolean_t any_media)
> {
> datalink_media_t dmedia;
> uint32_t media;
>
> dmedia = any_media ? DATALINK_ANY_MEDIATYPE : DL_WIFI;
> ...
>
> So, this should be false only for WiFi links? If that's the case, then
> these calls look wrong:
>
> libdlaggr.c: (void) dladm_init_linkprop(linkid, B_FALSE);
> libdlvlan.c: (void) dladm_init_linkprop(vlanid, B_FALSE);
>
The "any_media" flag was introduced (Artem, please correct me if
I'm mistaken) to handle the special case of wifi links that Artem
described in
http://mail.opensolaris.org/pipermail/brussels-dev/2008-June/000984.html
but as Seb points out, there's either a bug, or some very
confusing code, for other links like aggr and vlan.
I think we'd be better off just calling it
dladm_init_linkprop(datalink_id_t linkid, boolean_t is_wifi)
and using that information to pick out (or not) the
DL_WIFI datalink_media_t type. This would also be the
more obvious code to clean up when we convert wifi props
to go through the Brussels paths.
> Should this be true or false for IP tunnel links?
It should be B_TRUE for
dmedia = any_media ? DATALINK_ANY_MEDIATYPE : DL_WIFI;
and B_FALSE for the proposed
dmedia = is_wifi ? DL_WIFI : DATALINK_ANY_MEDIATYPE;
--Sowmini