[openib-general] RE: [PATCH 1/4] opensm: don't try to enforce partitions on router port
Eitan Zahavi
eitan at mellanox.co.il
Tue May 2 01:32:55 PDT 2006
Look fine to me.
Eitan Zahavi
Design Technology Director
Mellanox Technologies LTD
Tel:+972-4-9097208
Fax:+972-4-9593245
P.O. Box 586 Yokneam 20692 ISRAEL
> -----Original Message-----
> From: Sasha Khapyorsky [mailto:sashak at voltaire.com]
> Sent: Sunday, April 23, 2006 5:26 PM
> To: Hal Rosenstock
> Cc: openib-general at openib.org; Eitan Zahavi; Ofer Gigi; Yael Kalka
> Subject: [PATCH 1/4] opensm: don't try to enforce partitions on router
port
>
>
> When router port is connected directly to CA don't try handle it as
> switch external ports (update pkey table and enforce partitions).
> Router ports are handled by partition manager as end ports.
>
> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
> ---
>
> osm/opensm/osm_pkey_mgr.c | 43
++++++++++++++++++++-----------------------
> 1 files changed, 20 insertions(+), 23 deletions(-)
>
> diff --git a/osm/opensm/osm_pkey_mgr.c b/osm/opensm/osm_pkey_mgr.c
> index 938632e..bdb3ae4 100644
> --- a/osm/opensm/osm_pkey_mgr.c
> +++ b/osm/opensm/osm_pkey_mgr.c
> @@ -307,7 +307,8 @@ __osm_pkey_mgr_process_physical_port(
> static void
> osm_pkey_mgr_update_peer_port(
> const osm_pkey_mgr_t * const p_mgr,
> - const osm_port_t * const p_port )
> + const osm_port_t * const p_port,
> + boolean_t enforce)
> {
> osm_physp_t *p, *peer;
> osm_node_t *p_node;
> @@ -326,18 +327,25 @@ osm_pkey_mgr_update_peer_port(
> if ( !peer || !osm_physp_is_valid( peer ) )
> return;
> p_node = osm_physp_get_node_ptr( peer );
> - if ( osm_node_get_type( p_node ) == IB_NODE_TYPE_CA )
> + if ( osm_node_get_type( p_node ) != IB_NODE_TYPE_SWITCH )
> return;
> - else if ( osm_node_get_type( p_node ) == IB_NODE_TYPE_SWITCH ) {
> - if (!(p_sw = osm_get_switch_by_guid( p_mgr->p_subn,
> - osm_node_get_node_guid(
p_node ))) ||
> - !(p_si = osm_switch_get_si_ptr( p_sw )) ||
> - !p_si->enforce_cap)
> - return;
> +
> + p_sw = osm_get_switch_by_guid( p_mgr->p_subn,
osm_node_get_node_guid(
> p_node ));
> + if (!p_sw || !(p_si = osm_switch_get_si_ptr( p_sw )) ||
> + !p_si->enforce_cap)
> + return;
> +
> + if (osm_pkey_mgr_enforce_partition( p_mgr, peer, enforce ) !=
IB_SUCCESS) {
> + osm_log( p_mgr->p_log, OSM_LOG_ERROR,
> + "osm_pkey_mgr_update_peer_port: "
> + "osm_pkey_mgr_enforce_partition() failed to update "
> + "node 0x%016" PRIx64 " port %u\n",
> + cl_ntoh64( osm_node_get_node_guid( p_node ) ),
> + osm_physp_get_port_num( peer ) );
> }
>
> - if (p_mgr->p_subn->opt.no_partition_enforcement == TRUE)
> - goto _enforce_port;
> + if (enforce == FALSE)
> + return;
>
> p_pkey_tbl = osm_physp_get_pkey_tbl( p );
> p_peer_pkey_tbl = osm_physp_get_pkey_tbl( peer );
> @@ -377,18 +385,6 @@ osm_pkey_mgr_update_peer_port(
> cl_ntoh64( osm_node_get_node_guid( p_node ) ),
> osm_physp_get_port_num( peer ) );
> }
> -
> - _enforce_port:
> - if (osm_pkey_mgr_enforce_partition( p_mgr, peer,
> - p_mgr->p_subn->opt.no_partition_enforcement == FALSE
) !=
> - IB_SUCCESS) {
> - osm_log( p_mgr->p_log, OSM_LOG_ERROR,
> - "osm_pkey_mgr_update_peer_port: "
> - "osm_pkey_mgr_enforce_partition() failed to update "
> - "node 0x%016" PRIx64 " port %u\n",
> - cl_ntoh64( osm_node_get_node_guid( p_node ) ),
> - osm_physp_get_port_num( peer ) );
> - }
> }
>
>
/**********************************************************************
> @@ -484,7 +480,8 @@ osm_pkey_mgr_process(
> if ( osm_node_get_type( osm_port_get_parent_node( p_port ) ) !=
> IB_NODE_TYPE_SWITCH )
> {
> - osm_pkey_mgr_update_peer_port( p_mgr, p_port );
> + osm_pkey_mgr_update_peer_port( p_mgr, p_port,
> + !p_mgr->p_subn->opt.no_partition_enforcement);
> }
> }
>
More information about the general
mailing list