public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
To: Hal Rosenstock <hnrose-Wuw85uim5zDR7s880joybQ@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCHv3] opensm: Add support for optimized SLtoVLMappingTable programming
Date: Tue, 5 Jan 2010 13:18:41 +0200	[thread overview]
Message-ID: <20100105111841.GO26940@me> (raw)
In-Reply-To: <20091201194110.GA26753-Wuw85uim5zDR7s880joybQ@public.gmane.org>

Hi Hal,

On 14:41 Tue 01 Dec     , Hal Rosenstock wrote:
> 
> Optimized SLtoVLMappingTable programming reduces the number of MADs
> needed from O(n**2) to O(n). See IBA 1.2.1 vol 1 p. 843 14.2.5.8
> SLtoVLMappingTable.
> 
> Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---

[snip]

> diff --git a/opensm/opensm/osm_qos.c b/opensm/opensm/osm_qos.c
> index 08f9a60..617a86e 100644
> --- a/opensm/opensm/osm_qos.c
> +++ b/opensm/opensm/osm_qos.c

[snip]

> @@ -290,6 +306,44 @@ int osm_qos_setup(osm_opensm_t * p_osm)
>  	/* read QoS policy config file */
>  	osm_qos_parse_policy_file(&p_osm->subn);
>  
> +	/* loop on switches that support optimized SL2VL programming first */
> +	p_tbl = &p_osm->subn.sw_guid_tbl;
> +	p_next = cl_qmap_head(p_tbl);
> +	while (p_next != cl_qmap_end(p_tbl)) {
> +		p_sw = (osm_switch_t *) p_next;
> +		p_next = cl_qmap_next(p_next);
> +
> +		if (ib_switch_info_get_opt_sl2vlmapping(&p_sw->switch_info) &&
> +		    p_osm->subn.opt.use_optimized_slvl) {
> +			p_physp = osm_node_get_physp_ptr(p_sw->p_node, 1);
> +			num_physp = osm_node_get_num_physp(p_sw->p_node);
> +			force_update = p_osm->subn.need_update;
> +			for (i = 1; i < num_physp; i++) {
> +				p_physp = osm_node_get_physp_ptr(p_sw->p_node, i);
> +				if (!p_physp)
> +					continue;
> +				if (vlarb_physp_setup(&p_osm->sm, p_physp, i,
> +						      p_physp->need_update ||
> +						      p_osm->subn.need_update,
> +						      &swe_config))
> +					ret = -1;
> +				force_update |= p_physp->need_update;
> +			}
> +			if (sl2vl_update(&p_osm->sm,
> +					 osm_node_get_physp_ptr(p_sw->p_node, 0),
> +					 p_physp, i, 1, force_update,

At this point i = num_physp, which is an invalid switch port number,
right?

Sasha


> +					 &swe_config)) {
> +				OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR 6204: "
> +					"failed to update optimized SL2VLMapping"
> +					" tables for port %" PRIx64 " #%d\n",
> +					cl_ntoh64(p_physp->port_guid), i);
> +				ret = -1;
> +			}
> +		}
> +	}
> +
> +	/* now, loop on ports skipping the external ports of switches
> +	   that support optimized SL2VL programming */
>  	p_tbl = &p_osm->subn.port_guid_tbl;
>  	p_next = cl_qmap_head(p_tbl);
>  	while (p_next != cl_qmap_end(p_tbl)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-01-05 11:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01 19:41 [PATCHv3] opensm: Add support for optimized SLtoVLMappingTable programming Hal Rosenstock
     [not found] ` <20091201194110.GA26753-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-12-29 15:05   ` [PATCH] opensm/osm_slvl_map_rcv.c: fix port parsing on BE machine Sasha Khapyorsky
2009-12-29 15:07     ` [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network Sasha Khapyorsky
2009-12-30 16:09       ` Hal Rosenstock
     [not found]         ` <f0e08f230912300809l7c794daat9490c64a2cf63525-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-30 16:27           ` Sasha Khapyorsky
2009-12-30 16:56             ` Hal Rosenstock
     [not found]               ` <f0e08f230912300856v188d5900u9d82c94f5f9ae4a6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-30 19:43                 ` Sasha Khapyorsky
2009-12-31 14:48                   ` Hal Rosenstock
     [not found]                     ` <f0e08f230912310648m4b03b9bdq92394a61866f0e26-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-03 17:02                       ` Sasha Khapyorsky
2010-01-04 19:12                         ` Hal Rosenstock
     [not found]                           ` <f0e08f231001041112k4cb7742bwb5ae7cade8704082-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-04 20:03                             ` Sasha Khapyorsky
2010-01-04 19:31             ` Hal Rosenstock
2009-12-29 15:06   ` [PATCH] opensm/osm_slvl_map_rcv.c: fix mutex double release bug Sasha Khapyorsky
2009-12-29 16:29   ` [PATCHv3] opensm: Add support for optimized SLtoVLMappingTable programming Sasha Khapyorsky
2009-12-30 16:08     ` Hal Rosenstock
2010-01-04 17:01   ` [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check Sasha Khapyorsky
2010-01-05 11:10     ` [PATCH] opensm/osm_qos.c: split switch external and end ports setup Sasha Khapyorsky
2010-01-07 13:40       ` Hal Rosenstock
     [not found]         ` <f0e08f231001070540y26b69cb3v82dddc1d7b7134b9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-12 10:43           ` Sasha Khapyorsky
2010-01-13 20:15             ` Hal Rosenstock
2010-01-07 13:38     ` [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check Hal Rosenstock
     [not found]       ` <f0e08f231001070538q78453f91kd47c931087dfa735-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-12 10:35         ` Sasha Khapyorsky
2010-01-13 20:13           ` Hal Rosenstock
     [not found]             ` <f0e08f231001131213r4a743d6boc1b07e9fadc773ac-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-16 20:27               ` Sasha Khapyorsky
2010-01-23 12:25                 ` Hal Rosenstock
     [not found]                   ` <f0e08f231001230425j28ced479if608a75bb4216186-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-25 15:20                     ` Sasha Khapyorsky
2010-01-25 20:19                       ` Hal Rosenstock
2010-01-05 11:18   ` Sasha Khapyorsky [this message]
2010-01-05 11:23     ` [PATCHv3] opensm: Add support for optimized SLtoVLMappingTable programming Sasha Khapyorsky
2010-01-07 13:35       ` Hal Rosenstock
     [not found]         ` <f0e08f231001070535l382f1d54t7f6290607e52b196-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-12 10:55           ` Sasha Khapyorsky
2010-01-13 20:14             ` Hal Rosenstock
     [not found]               ` <f0e08f231001131214w790b1f34s46cbbda8b6454ac3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-16 20:33                 ` Sasha Khapyorsky
2010-01-23 12:26                   ` Hal Rosenstock
     [not found]                     ` <f0e08f231001230426t2e48aa58pbcb2d3f1323c6e56-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-25 17:41                       ` Sasha Khapyorsky
2010-01-07 13:34     ` Hal Rosenstock
2010-01-06 19:13   ` Sasha Khapyorsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100105111841.GO26940@me \
    --to=sashak-smomgflxvozwk0htik3j/w@public.gmane.org \
    --cc=hnrose-Wuw85uim5zDR7s880joybQ@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox