On Sun, Sep 6, 2009 at 11:49 AM, Sasha Khapyorsky wrote:
>
> Port needs to access multicast groups where it is joined to. Now it is
> implemented by keeping list of list of mcm_info elements where MLID of
> each multicast group is stored. Obviously this assumes single MGID to
> MLID mapping model.
>
Does this mean consolidate_ipv6_snm_req does not work now ? If so, did OFED
1.5 Beta go out this way ? Also, what is the plan/timeframe to restore this
functionality ?
-- Hal
>
> This patch changes this so that instead of MLID mcm_info stores pointer
> to multicast group object (mgrp). Such model makes it possible to
> have MGIDs to MLID compression.
>
> Signed-off-by: Sasha Khapyorsky
> ---
> opensm/include/opensm/osm_mcm_info.h | 13 +++--
> opensm/include/opensm/osm_port.h | 13 +++--
> opensm/opensm/osm_drop_mgr.c | 10 +++---
> opensm/opensm/osm_mcm_info.c |8
> opensm/opensm/osm_port.c | 10 +-
> opensm/opensm/osm_sm.c |6 +++---
> 6 files changed, 29 insertions(+), 31 deletions(-)
>
> diff --git a/opensm/include/opensm/osm_mcm_info.h
> b/opensm/include/opensm/osm_mcm_info.h
> index dec607f..62ae326 100644
> --- a/opensm/include/opensm/osm_mcm_info.h
> +++ b/opensm/include/opensm/osm_mcm_info.h
> @@ -47,6 +47,7 @@
> #include
> #include
> #include
> +#include
>
> #ifdef __cplusplus
> # define BEGIN_C_DECLS extern "C" {
> @@ -73,15 +74,15 @@ BEGIN_C_DECLS
> */
> typedef struct osm_mcm_info {
>cl_list_item_t list_item;
> - ib_net16_t mlid;
> + osm_mgrp_t *mgrp;
> } osm_mcm_info_t;
> /*
> * FIELDS
> * list_item
> * Linkage structure for cl_qlist. MUST BE FIRST MEMBER!
> *
> -* mlid
> -* MLID of this multicast group.
> +* mgrp
> +* The pointer to multicast group where this port is member of
> *
> * SEE ALSO
> */
> @@ -95,11 +96,11 @@ typedef struct osm_mcm_info {
> *
> * SYNOPSIS
> */
> -osm_mcm_info_t *osm_mcm_info_new(IN const ib_net16_t mlid);
> +osm_mcm_info_t *osm_mcm_info_new(IN osm_mgrp_t *mgrp);
> /*
> * PARAMETERS
> -* mlid
> -* [in] MLID value for this multicast group.
> +* mgrp
> +* [in] the pointer to multicast group.
> *
> * RETURN VALUES
> * Pointer to an initialized tree node.
> diff --git a/opensm/include/opensm/osm_port.h
> b/opensm/include/opensm/osm_port.h
> index 7079e74..0e0d3d2 100644
> --- a/opensm/include/opensm/osm_port.h
> +++ b/opensm/include/opensm/osm_port.h
> @@ -65,6 +65,7 @@ BEGIN_C_DECLS
> */
> struct osm_port;
> struct osm_node;
> +struct osm_mgrp;
>
> /h* OpenSM/Physical Port
> * NAME
> @@ -1420,14 +1421,14 @@ osm_get_port_by_base_lid(IN const osm_subn_t *
> const p_subn,
> * SYNOPSIS
> */
> ib_api_status_t
> -osm_port_add_mgrp(IN osm_port_t * const p_port, IN const ib_net16_t mlid);
> +osm_port_add_mgrp(IN osm_port_t * const p_port, IN struct osm_mgrp *mgrp);
> /*
> * PARAMETERS
> * p_port
> * [in] Pointer to an osm_port_t object.
> *
> -* mlid
> -* [in] MLID of the multicast group.
> +* mgrp
> +* [in] Pointer to the multicast group.
> *
> * RETURN VALUES
> * IB_SUCCESS
> @@ -1449,14 +1450,14 @@ osm_port_add_mgrp(IN osm_port_t * const p_port, IN
> const ib_net16_t mlid);
> * SYNOPSIS
> */
> void
> -osm_port_remove_mgrp(IN osm_port_t * const p_port, IN const ib_net16_t
> mlid);
> +osm_port_remove_mgrp(IN osm_port_t * const p_port, IN struct osm_mgrp
> *mgrp);
> /*
> * PARAMETERS
> * p_port
> * [in] Pointer to an osm_port_t object.
> *
> -* mlid
> -* [in] MLID of the multicast group.
> +* mgrp
> +* [in] Pointer to the multicast group.
> *
> * RETURN VALUES
> * None.
> diff --git a/opensm/opensm/osm_drop_mgr.c b/opensm/opensm/osm_drop_mgr.c
> index c9a4f33..4891bb8 100644
> --- a/opensm/opensm/osm_drop_mgr.c
> +++ b/opensm/opensm/osm_drop_mgr.c
> @@ -158,7 +158,6 @@ static void drop_mgr_remove_port(osm_sm_t * sm, IN
> osm_port_t * p_port)
>osm_port_t *p_port_check;
>cl_qmap_t *p_sm_guid_tbl;
>osm_mcm_info_t *p_mcm;
> - osm_mgrp_t *p_mgrp;
>cl_ptr_vector_t *p_port_lid_tbl;
>uint16_t min_lid_ho;
>uint16_t max_lid_ho;
> @@ -212,12 +211,9 @@ static void drop_mgr_remove_port(osm_sm_t * sm, IN
> osm_port_t * p_port)
>
>p_mcm = (osm_mcm_info_t *) cl_qlist_remove_head(&p_port->mcm_list);
>while (p_mcm != (osm_mcm_info_t *) cl_qlist_end(&p_port->mcm_list))
> {
> - p_mgrp = osm_get_mgrp_by_mlid(sm->p_subn, p_mcm->mlid);
> - if (p_mgrp) {
> - osm_mgrp_delete_port(sm->p_subn, sm->p_log,
> -p_mgrp, p_port->guid);
> - osm_mcm_info_delete((osm_mcm_info_t *) p_mcm);
> - }
> + osm_mg