On Tue, 2009-05-26 at 16:21 -0700, Joe Eykholt wrote:
> Hi all,
>
> I'm working on some remote port changes and would like some
> suggestions and opinions about the best way to proceed.
>
> Today's issue is where the list of remote port list lives. Bottom line:
> I'd like to move it out of struct fc_disc to struct fc_lport, and protect
> it with lp_mutex instead of disc_mutex (eliminating disc_mutex).
> Some of the lookups already hold lp_mutex, note especially that all
> incoming ELS request handlers have it held.
>
> Currently the list is part of the discovery structure in the local port, and
> protected under the discovery lock. For correctness, that means the
> discovery lock should be taken when looking up a remote port (part of
> my changes). Also, a callback from the rport module to disc is used
> to remove an rport from the list when it logs off.
>
> When in point-to-point mode, we don't need dNS, but we need a
> single remote port, and we just put it on the list of known remote ports
> for convenience. In this case it would be nice to have the list outside
> of the discovery module.
>
> When receiving an PLOGI from a remote port we haven't discovered, we need
> a way of adding the rport.
>
> All that seems to be a good motivation to moving the list outside of
> discovery,
> and to put the access to the list into the rport module.
>
> Any thoughts on this?
>
> Here are the other related things I'm working on:
>
> - handling RSCNs without logging out of unaffected remote ports
> - using ADISC to reverify login status after an RSCN
> - getting rid of the separate rogue rport list
> - correcting the rport lookup to lock and do device_get().
> - handle incoming PLOGI requests correctly
> - handle incoming ADISC requests.
>
Above all make sense to me for all reasons mentioned by you above and I
see above changes towards more lean and efficient control path code in
libfc, the lean by removing additional disc_mutex and rouge rport list
and efficient by adding ADISC and quick RSCN handling etc, getting rid
off rogue rport completely would be even more better but that is due for
quite some time so someone need to fix that as well and could be done
separate from above changes.
Rob is OOO for last two day and once he is back then he may provide more
detailed input on this since he might had some reasons to related
changes by moving rport list to fc_disc with added disc_mutex. As far as
I understand that was perhaps to make fc_disc block more independent
block but as far as I can see that would be still the case even after
above changes.
Regards
Vasu
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel