Skip to contentSkip to conversation

opensm: Add support for optimized SLtoVLMappingTable programming

PATCH In review Hal Rosenstock 3 participants 37 messages Dec 1, 2009 – Jan 25, 2010 12 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 opensm: Add support for optimized SLtoVLMappingTable programming

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.

---
Changes since v2:
Use osm_log rather than OSM_LOG in osm_slvl_rcv_process for optimized sl2vl mapping programming verbose log message
Removed unneeded check of p_physp in input port loop in osm_slvl_rcv_process for optimized sl2vl mapping programming

Changes since v1:
Changed optimized programming flow in osm_qos to only call sl2vl_update once per switch supporting this feature

opensm/include/opensm/osm_subnet.h +5 -0
index 3c08689..583c070 100644
@@ -206,6 +206,7 @@ typedef struct osm_subn_opt {
 	boolean_t daemon;
 	boolean_t sm_inactive;
 	boolean_t babbling_port_policy;
+	boolean_t use_optimized_slvl;
 	osm_qos_options_t qos_options;
 	osm_qos_options_t qos_ca_options;
 	osm_qos_options_t qos_sw0_options;
@@ -433,6 +434,10 @@ typedef struct osm_subn_opt {
 *	babbling_port_policy
 *		OpenSM will enforce its "babbling" port policy.
 *
+*	use_optimized_slvl
+*		Use optimized SLtoVLMappingTable programming if
+*		device indicates it supports this.
+*
 *	perfmgr
 *		Enable or disable the performance manager
 *
opensm/opensm/osm_qos.c +86 -26

206 lines not on this page · raw message

opensm/opensm/osm_slvl_map_rcv.c +40 -2

72 lines not on this page · raw message

opensm/opensm/osm_subnet.c +7 -2
index 09029db..103b5c6 100644
@@ -354,6 +354,7 @@ static const opt_rec_t opt_tbl[] = {
 	{ "daemon", OPT_OFFSET(daemon), opts_parse_boolean, NULL, 0 },
 	{ "sm_inactive", OPT_OFFSET(sm_inactive), opts_parse_boolean, NULL, 1 },
 	{ "babbling_port_policy", OPT_OFFSET(babbling_port_policy), opts_parse_boolean, NULL, 1 },
+	{ "use_optimized_slvl", OPT_OFFSET(use_optimized_slvl), opts_parse_boolean, NULL, 1 },
 #ifdef ENABLE_OSM_PERF_MGR
 	{ "perfmgr", OPT_OFFSET(perfmgr), opts_parse_boolean, NULL, 0 },
 	{ "perfmgr_redir", OPT_OFFSET(perfmgr_redir), opts_parse_boolean, NULL, 0 },
@@ -713,6 +714,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * p_opt)
 	p_opt->daemon = FALSE;
 	p_opt->sm_inactive = FALSE;
 	p_opt->babbling_port_policy = FALSE;
+	p_opt->use_optimized_slvl = FALSE;
 #ifdef ENABLE_OSM_PERF_MGR
 	p_opt->perfmgr = FALSE;
 	p_opt->perfmgr_redir = TRUE;
@@ -1499,10 +1501,13 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * p_opts)
 		"# SM Inactive\n"
 		"sm_inactive %s\n\n"
 		"# Babbling Port Policy\n"
-		"babbling_port_policy %s\n\n",
+		"babbling_port_policy %s\n\n"
+		"# Use Optimized SLtoVLMapping programming if supported by device\n"
+		"use_optimized_slvl %s\n\n",
 		p_opts->daemon ? "TRUE" : "FALSE",
 		p_opts->sm_inactive ? "TRUE" : "FALSE",
-		p_opts->babbling_port_policy ? "TRUE" : "FALSE");
+		p_opts->babbling_port_policy ? "TRUE" : "FALSE",
+		p_opts->use_optimized_slvl ? "TRUE" : "FALSE");
 
 #ifdef ENABLE_OSM_PERF_MGR
 	fprintf(out,

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/1 opensm/osm_slvl_map_rcv.c: fix port parsing on BE machine

Ports (input and output) number parsing from attribute modifier value of SLtoVLMappingTable response was endianess dependent and actually was broken on a big endian machines. Fix it by doing this endianess independently.

---

Quoted 6 lines · Hal Rosenstock

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.

When reviewing this patch I found couple of bugs in this code unrelated to the proposed change. Posting the fixes in this thread.

 opensm/opensm/osm_slvl_map_rcv.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
opensm/opensm/osm_slvl_map_rcv.c +2 -4
index 4f75690..3b24a8e 100644
@@ -105,10 +105,8 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 
 	/* in case of a non switch node the attr modifier should be ignored */
 	if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
-		out_port_num =
-		    (uint8_t) cl_ntoh32(p_smp->attr_mod & 0xFF000000);
-		in_port_num =
-		    (uint8_t) cl_ntoh32((p_smp->attr_mod & 0x00FF0000) << 8);
+		out_port_num = cl_ntoh32(p_smp->attr_mod) & 0xff;
+		in_port_num = (cl_ntoh32(p_smp->attr_mod) >> 8) & 0xff;
 		p_physp = osm_node_get_physp_ptr(p_node, out_port_num);
 	} else {
 		p_physp = p_port->p_physp;
Signature · 6 lines
1.6.6.rc4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH 1/1 opensm/osm_slvl_map_rcv.c: verify port number values received from network

Verify that port number values received from network are in range and valid for access. Report error otherwise.

---
 opensm/opensm/osm_slvl_map_rcv.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
opensm/opensm/osm_slvl_map_rcv.c +9 -0
index b35d867..6229db9 100644
@@ -104,8 +104,17 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 
 	/* in case of a non switch node the attr modifier should be ignored */
 	if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
+		unsigned num_ports = osm_node_get_num_physp(p_node) - 1;
 		out_port_num = cl_ntoh32(p_smp->attr_mod) & 0xff;
 		in_port_num = (cl_ntoh32(p_smp->attr_mod) >> 8) & 0xff;
+		if (in_port_num > num_ports || out_port_num > num_ports) {
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C07"
+				"Invalid attribute modifier 0x%x reveived in"
+				" response from switch 0x%" PRIx64 "\n",
+				cl_ntoh32(p_smp->attr_mod),
+				cl_ntoh64(node_guid));
+			goto Exit;
+		}
 		p_physp = osm_node_get_physp_ptr(p_node, out_port_num);
 	} else {
 		p_physp = p_port->p_physp;
Signature · 6 lines
1.6.6.rc4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Quoted 3 lines · Sasha Khapyorsky

Verify that port number values received from network are in range and valid for access. Report error otherwise.

Won't this spam the OpenSM log ?

Quoted 10 lines

---
 opensm/opensm/osm_slvl_map_rcv.c |    9 +++++++++

 1 files changed, 9 insertions(+), 0 deletions(-)
opensm/opensm/osm_slvl_map_rcv.c +0 -0
index b35d867..6229db9 100644

opensm/opensm/osm_slvl_map_rcv.c void osm_slvl_rcv_process(IN void *context, IN void *p_data) · line 112

Quoted 9 lines
opensm/opensm/osm_slvl_map_rcv.c +4 -0
@@ -104,8 +104,17 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 
        /* in case of a non switch node the attr modifier should be ignored */
        if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
+               unsigned num_ports = osm_node_get_num_physp(p_node) - 1;
                out_port_num = cl_ntoh32(p_smp->attr_mod) & 0xff;
                in_port_num = (cl_ntoh32(p_smp->attr_mod) >> 8) & 0xff;
+               if (in_port_num > num_ports || out_port_num > num_ports) {
+                       OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C07"
+                               "Invalid attribute modifier 0x%x reveived in"
           ^^^^^^^^

            typo

-- Hal

Quoted 11 lines
opensm/opensm/osm_slvl_map_rcv.c +5 -1
+                               " response from switch 0x%" PRIx64 "\n",
+                               cl_ntoh32(p_smp->attr_mod),
+                               cl_ntoh64(node_guid));
+                       goto Exit;
+               }
                p_physp = osm_node_get_physp_ptr(p_node, out_port_num);
        } else {
                p_physp = p_port->p_physp;
--

1.6.6.rc4

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f230912300809l7c794daat9490c64a2cf63525-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Quoted 6 lines · Hal Rosenstock
Quoted 3 lines · Sasha Khapyorsky

Verify that port number values received from network are in range and valid for access. Report error otherwise.

Won't this spam the OpenSM log ?

Yes, unfortunately. But unlike SA queries, etc., this is response to OpenSM originated request and messing attribute modifier there is more critical there than just invalid query from some client.

However basically I am sharing your concerns. Maybe we need a separate log level for things like that (OSM_LOG_WARNING or so).

Quoted 11 lines
Quoted 11 lines

---
 opensm/opensm/osm_slvl_map_rcv.c |    9 +++++++++

 1 files changed, 9 insertions(+), 0 deletions(-)
opensm/opensm/osm_slvl_map_rcv.c +0 -0
index b35d867..6229db9 100644
@@ -104,8 +104,17 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 
Quoted 12 lines

opensm/opensm/osm_slvl_map_rcv.c void osm_slvl_rcv_process(IN void *context, IN void *p_data) · line 112

Quoted 8 lines
opensm/opensm/osm_slvl_map_rcv.c +4 -0
        /* in case of a non switch node the attr modifier should be ignored */
        if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
+               unsigned num_ports = osm_node_get_num_physp(p_node) - 1;
                out_port_num = cl_ntoh32(p_smp->attr_mod) & 0xff;
                in_port_num = (cl_ntoh32(p_smp->attr_mod) >> 8) & 0xff;
+               if (in_port_num > num_ports || out_port_num > num_ports) {
+                       OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C07"
+                               "Invalid attribute modifier 0x%x reveived in"
           ^^^^^^^^

            typo

Thanks for finding. I'm fixing this.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Quoted 11 lines · Sasha Khapyorsky
Quoted 6 lines · Hal Rosenstock
Quoted 3 lines · Sasha Khapyorsky

Verify that port number values received from network are in range and valid for access. Report error otherwise.

Won't this spam the OpenSM log ?

Yes, unfortunately. But unlike SA queries, etc., this is response to OpenSM originated request and messing attribute modifier there is more critical there than just invalid query from some client.

Yes but why would SMA mess up attribute modifier though ? So is this just detecting OpenSM bug with AM ?

-- Hal

Quoted 25 lines

However basically I am sharing your concerns. Maybe we need a separate log level for things like that (OSM_LOG_WARNING or so).

Quoted 22 lines
Quoted 10 lines

---
 opensm/opensm/osm_slvl_map_rcv.c |    9 +++++++++

 1 files changed, 9 insertions(+), 0 deletions(-)
opensm/opensm/osm_slvl_map_rcv.c +0 -0
index b35d867..6229db9 100644

opensm/opensm/osm_slvl_map_rcv.c void osm_slvl_rcv_process(IN void *context, IN void *p_data) · line 112

Quoted 9 lines
opensm/opensm/osm_slvl_map_rcv.c +4 -0
@@ -104,8 +104,17 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 
        /* in case of a non switch node the attr modifier should be ignored */
        if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
+               unsigned num_ports = osm_node_get_num_physp(p_node) - 1;
                out_port_num = cl_ntoh32(p_smp->attr_mod) & 0xff;
                in_port_num = (cl_ntoh32(p_smp->attr_mod) >> 8) & 0xff;
+               if (in_port_num > num_ports || out_port_num > num_ports) {
+                       OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C07"
+                               "Invalid attribute modifier 0x%x reveived in"

           ^^^^^^^^

Quoted 6 lines
Quoted 1 line

            typo

Thanks for finding. I'm fixing this.

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f230912300856v188d5900u9d82c94f5f9ae4a6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#9 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Quoted 2 lines · Hal Rosenstock

Yes but why would SMA mess up attribute modifier though ?

How could I know? :)

Quoted 2 lines

So is this
just detecting OpenSM bug with AM ?

It is not for OpenSM internal bugs detecting. It is "don't trust to information from a network", in this specific case attribute modifier elements are used as pointers indexes (sl2vl tables), so OpenSM don't need to crash due to broken SMAs or other sort of attack.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Quoted 4 lines · Sasha Khapyorsky
Quoted 2 lines · Hal Rosenstock

Yes but why would SMA mess up attribute modifier though ?

Quoted 8 lines

How could I know? :)

Quoted 2 lines

So is this
just detecting OpenSM bug with AM ?

It is not for OpenSM internal bugs detecting. It is "don't trust to information from a network", in this specific case attribute modifier elements are used as pointers indexes (sl2vl tables),

Yes, I noticed that but...

Quoted 1 line

so OpenSM don't need to crash due to broken SMAs or other sort of attack.

I thought this was only done when these issues are actually found and in general we are relying on compliance. Is there a specific known issue here ?

If we are worrying about this as a general principle, there are more places to bullet proof like this. I am wondering about why the exception here.

-- Hal

Quoted 3 lines

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f230912310648m4b03b9bdq92394a61866f0e26-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#12 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Quoted 3 lines · Hal Rosenstock

I thought this was only done when these issues are actually found and in general we are relying on compliance.

OpenSM can rely on compliance in many cases, but it cannot crash (or become nonoperational in any other way) relying on compliance.

Quoted 5 lines

Is there a specific known
issue here ?

If we are worrying about this as a general principle, there are more places to bullet proof like this.

Likely so and it would be good to fix all of them.

Quoted 2 lines

I am wondering about why the
exception here.

It is not exception. I found this one, so fixed.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Quoted 7 lines · Sasha Khapyorsky
Quoted 3 lines · Hal Rosenstock

I thought this was only done when these issues are actually found and in general we are relying on compliance.

OpenSM can rely on compliance in many cases, but it cannot crash (or become nonoperational in any other way) relying on compliance.

I think that's fine as a general principle but isn't practical. There are many cases where OpenSM relies on SMA/PMA/SA client compliance (without such checking/overhead).

Quoted 7 lines
Quoted 5 lines

Is there a specific known
issue here ?

If we are worrying about this as a general principle, there are more places to bullet proof like this.

Likely so and it would be good to fix all of them.

Have you done a code review/inspection for such cases ?

Quoted 4 lines
Quoted 2 lines

I am wondering about why the
exception here.

It is not exception.

I think there are more unprotected cases than protected ones.

-- Hal

Quoted 4 lines

I found this one, so fixed.

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f231001041112k4cb7742bwb5ae7cade8704082-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#15 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

Quoted 7 lines · Hal Rosenstock
Quoted 5 lines
Quoted 3 lines

If we are worrying about this as a general principle, there are more places to bullet proof like this.

Likely so and it would be good to fix all of them.

Have you done a code review/inspection for such cases ?

No, I've never hunted this specially, perhaps fixed couple of such occasionally (like this one).

Quoted 1 line

I think there are more unprotected cases than protected ones.

Have you done a code review/inspection?

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#16 lore raw

Re: [PATCH] opensm/osm_slvl_map_rcv.c: verify port number values received from network

In reply to Sasha Khapyorsky
Quoted 11 lines · Sasha Khapyorsky
Quoted 6 lines · Hal Rosenstock
Quoted 3 lines · Sasha Khapyorsky

Verify that port number values received from network are in range and valid for access. Report error otherwise.

Won't this spam the OpenSM log ?

Yes, unfortunately. But unlike SA queries, etc., this is response to OpenSM originated request and messing attribute modifier there is more critical there than just invalid query from some client.

I wasn't referring to just SA queries.

I don't think this is consistent with your treatment of other proposed error messages.

Quoted 2 lines

However basically I am sharing your concerns. Maybe we need a separate log level for things like that (OSM_LOG_WARNING or so).

I think the logging needs more than just another level.

-- Hal

Quoted 22 lines
Quoted 22 lines
Quoted 10 lines

---
 opensm/opensm/osm_slvl_map_rcv.c |    9 +++++++++

 1 files changed, 9 insertions(+), 0 deletions(-)
opensm/opensm/osm_slvl_map_rcv.c +0 -0
index b35d867..6229db9 100644

opensm/opensm/osm_slvl_map_rcv.c void osm_slvl_rcv_process(IN void *context, IN void *p_data) · line 112

Quoted 9 lines
opensm/opensm/osm_slvl_map_rcv.c +4 -0
@@ -104,8 +104,17 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 
        /* in case of a non switch node the attr modifier should be ignored */
        if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
+               unsigned num_ports = osm_node_get_num_physp(p_node) - 1;
                out_port_num = cl_ntoh32(p_smp->attr_mod) & 0xff;
                in_port_num = (cl_ntoh32(p_smp->attr_mod) >> 8) & 0xff;
+               if (in_port_num > num_ports || out_port_num > num_ports) {
+                       OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C07"
+                               "Invalid attribute modifier 0x%x reveived in"

           ^^^^^^^^

Quoted 6 lines
Quoted 1 line

            typo

Thanks for finding. I'm fixing this.

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#17 lore raw

PATCH 1/1 opensm/osm_slvl_map_rcv.c: fix mutex double release bug

In reply to a message not in the archive

In case when response was received for non-existing port (for example when it was dropped after querying) OpenSM data structures access mutex will be released twice. Fix this.

---
 opensm/opensm/osm_slvl_map_rcv.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
opensm/opensm/osm_slvl_map_rcv.c +0 -1
index 3b24a8e..b35d867 100644
@@ -91,7 +91,6 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 
 	if (!p_port) {
-		cl_plock_release(sm->p_lock);
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C06: "
 			"No port object for port with GUID 0x%" PRIx64
 			"\n\t\t\t\tfor parent node GUID 0x%" PRIx64
Signature · 6 lines
1.6.6.rc4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#18 lore raw
In reply to a message not in the archive

Hi Hal,

Quoted 10 lines · Hal Rosenstock

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.

---
Changes since v2:
Use osm_log rather than OSM_LOG in osm_slvl_rcv_process for optimized sl2vl mapping programming verbose log message

I didn't ask for such change. Instead I asked to avoid the function (osm_slvl_rcv_process() in this patch) constructed in form of:

	if (cond1)
		goto flow1;

	do_flow2;

	goto end;

flow1:

	do_flow1;

end:

In general this is equivalent to simpler and more readable:

	if (cond1)
		do_flow1();
	else
		do_flow2();

And in case of osm_slvl_rcv_process() even nicer merge is possible when slvl port table setup loop is shared, but its range (start*port and end*port values) is defined differently for various input cases. Just like this (against your patch, rebased over recent fixes, compilation only tested):

opensm/opensm/osm_slvl_map_rcv.c +37 -68
index 7ca0b8f..73c6253 100644
@@ -72,8 +72,8 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 	ib_net64_t port_guid;
 	ib_net64_t node_guid;
 	uint32_t attr_mod;
-	uint8_t out_port_num, in_port_num, startinport, startoutport,
-		endinport, endoutport;
+	uint8_t startinport, endinport, startoutport, endoutport;
+	uint8_t in_port, out_port;
 
 	CL_ASSERT(sm);
 
@@ -109,80 +109,51 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 	if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
 		unsigned num_ports = osm_node_get_num_physp(p_node) - 1;
 		attr_mod = cl_ntoh32(p_smp->attr_mod);
-		out_port_num = attr_mod & 0xff;
-		in_port_num = (attr_mod >> 8) & 0xff;
-		if (in_port_num > num_ports || out_port_num > num_ports) {
+
+		if (attr_mod & 0x10000) {
+			startoutport = ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info) ? 0 : 1;
+			endoutport = osm_node_get_num_physp(p_node) - 1;
+		} else
+			startoutport = endoutport = attr_mod & 0xff;
+
+		if (attr_mod & 0x20000) {
+			startinport = ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info) ? 0 : 1;
+			endinport = osm_node_get_num_physp(p_node) - 1;
+		} else
+			startinport = endinport = (attr_mod >> 8) & 0xff;
+
+		if (startinport > num_ports || startoutport > num_ports) {
 			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C07"
 				"Invalid attribute modifier 0x%x reveived in"
 				" response from switch 0x%" PRIx64 "\n",
-				cl_ntoh32(p_smp->attr_mod),
-				cl_ntoh64(node_guid));
+				cl_ntoh32(attr_mod), cl_ntoh64(node_guid));
 			goto Exit;
 		}
-		if (attr_mod & 0x30000)
-			goto opt_sl2vl;
-		p_physp = osm_node_get_physp_ptr(p_node, out_port_num);
-	} else {
-		p_physp = p_port->p_physp;
-		out_port_num = p_physp->port_num;
-		in_port_num = 0;
-	}
 
-	/*
-	   We do not care if this is a result of a set or get -
-	   all we want is to update the subnet.
-	 */
-	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-		"Received SLtoVL GetResp in_port_num %u out_port_num %u with "
-		"GUID 0x%" PRIx64 " for parent node GUID 0x%" PRIx64 ", TID 0x%"
-		PRIx64 "\n", in_port_num, out_port_num, cl_ntoh64(port_guid),
-		cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
-
-	/*
-	   Determine if we encountered a new Physical Port.
-	   If so, Ignore it.
-	 */
-	if (!p_physp) {
-		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
-			"Got invalid port number %u\n", out_port_num);
-		goto Exit;
+	} else {
+		startoutport = endoutport = p_port->p_physp->port_num;
+		startinport = endinport = 0;
 	}
 
-	osm_dump_slvl_map_table(sm->p_log, port_guid, in_port_num,
-				out_port_num, p_slvl_tbl, OSM_LOG_DEBUG);
-
-	osm_physp_set_slvl_tbl(p_physp, p_slvl_tbl, in_port_num);
-	goto Exit;
-
-opt_sl2vl:
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"Received optimized SLtoVL get response in_port_num %u "
-			"out_port_num %u with GUID 0x%" PRIx64 " for parent "
-			"node GUID 0x%" PRIx64 ", TID 0x%" PRIx64 "\n",
-			in_port_num, out_port_num, cl_ntoh64(port_guid),
-			cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
-
-	osm_dump_slvl_map_table(sm->p_log, port_guid, in_port_num,
-				out_port_num, p_slvl_tbl, OSM_LOG_DEBUG);
-
-	if (attr_mod & 0x10000) {
-		startoutport = ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info) ? 0 : 1;
-		endoutport = osm_node_get_num_physp(p_node);
-	} else
-		endoutport = startoutport = out_port_num;
-	if (attr_mod & 0x20000) {
-		startinport = ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info) ? 0 : 1;
-		endinport = osm_node_get_num_physp(p_node);
-	} else
-		endinport = startinport = in_port_num;
-
-	for (out_port_num = startoutport; out_port_num < endoutport;
-	     out_port_num++) {
-		p_physp = osm_node_get_physp_ptr(p_node, out_port_num);
-		for (in_port_num = startinport; in_port_num < endinport;
-		     in_port_num++)
-			osm_physp_set_slvl_tbl(p_physp, p_slvl_tbl, in_port_num);
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG, "Received SLtoVL GetResp"
+		" in_port_num %u out_port_num %u with GUID 0x%" PRIx64
+		" for parent node GUID 0x%" PRIx64 ", TID 0x%" PRIx64 "\n",
+		startinport == endinport ? startinport : 0xff,
+		startoutport == endoutport ? startoutport : 0xff,
+		cl_ntoh64(port_guid), cl_ntoh64(node_guid),
+		cl_ntoh64(p_smp->trans_id));
+
+	osm_dump_slvl_map_table(sm->p_log, port_guid,
+				startinport == endinport ? startinport : 0xff,
+				startoutport == endoutport ? startoutport : 0xff,
+				p_slvl_tbl, OSM_LOG_DEBUG);
+
+	for (out_port = startoutport; out_port <= endoutport; out_port++) {
+		p_physp = osm_node_get_physp_ptr(p_node, out_port);
+		for (in_port = startinport; in_port <= endinport; in_port++)
+			osm_physp_set_slvl_tbl(p_physp, p_slvl_tbl, in_port);
 	}
 
 Exit:

opensm/opensm/osm_qos.c

Quoted 34 lines

Removed unneeded check of p_physp in input port loop in osm_slvl_rcv_process for optimized sl2vl mapping programming

Changes since v1:
Changed optimized programming flow in osm_qos to only call sl2vl_update once per switch supporting this feature

opensm/include/opensm/osm_subnet.h +5 -0
index 3c08689..583c070 100644
@@ -206,6 +206,7 @@ typedef struct osm_subn_opt {
 	boolean_t daemon;
 	boolean_t sm_inactive;
 	boolean_t babbling_port_policy;
+	boolean_t use_optimized_slvl;
 	osm_qos_options_t qos_options;
 	osm_qos_options_t qos_ca_options;
 	osm_qos_options_t qos_sw0_options;
@@ -433,6 +434,10 @@ typedef struct osm_subn_opt {
 *	babbling_port_policy
 *		OpenSM will enforce its "babbling" port policy.
 *
+*	use_optimized_slvl
+*		Use optimized SLtoVLMappingTable programming if
+*		device indicates it supports this.
+*
 *	perfmgr
 *		Enable or disable the performance manager
 *
opensm/opensm/osm_qos.c +0 -0
index 08f9a60..617a86e 100644

I'm yet reviewing the changes in osm_qos.c.

Quoted 271 lines
opensm/opensm/osm_qos.c +86 -26
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2006-2009 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -150,7 +151,7 @@ static ib_api_status_t vlarb_update(osm_sm_t * sm, osm_physp_t * p,
 
 static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
 					  uint8_t in_port, uint8_t out_port,
-					  unsigned force_update,
+					  unsigned optimize, unsigned force_update,
 					  const ib_slvl_table_t * sl2vl_table)
 {
 	osm_madw_context_t context;
@@ -180,41 +181,47 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
 	context.slvl_context.node_guid = osm_node_get_node_guid(p_node);
 	context.slvl_context.port_guid = osm_physp_get_port_guid(p);
 	context.slvl_context.set_method = TRUE;
-	attr_mod = in_port << 8 | out_port;
+	if (optimize)
+		/* wildcard both input and output ports */
+		attr_mod = 0x30000;
+	else
+		attr_mod = in_port << 8 | out_port;
 	return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
 			   (uint8_t *) & tbl, sizeof(tbl),
 			   IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
 			   CL_DISP_MSGID_NONE, &context);
 }
 
-static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
+static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_physp_t * p0,
 				    osm_physp_t * p, uint8_t port_num,
-				    unsigned force_update,
+				    unsigned optimize, unsigned force_update,
 				    const struct qos_config *qcfg)
 {
 	ib_api_status_t status;
 	uint8_t i, num_ports;
-	osm_physp_t *p_physp;
+	osm_node_t *p_node;
 
-	if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH) {
+	p_node = osm_physp_get_node_ptr(p);
+	if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
 		if (ib_port_info_get_vl_cap(&p->port_info) == 1) {
 			/* Check port 0's capability mask */
-			p_physp = p_port->p_physp;
-			if (!
-			    (p_physp->port_info.
-			     capability_mask & IB_PORT_CAP_HAS_SL_MAP))
+			if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
 				return IB_SUCCESS;
 		}
-		num_ports = osm_node_get_num_physp(osm_physp_get_node_ptr(p));
+		num_ports = osm_node_get_num_physp(p_node);
 	} else {
 		if (!(p->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
 			return IB_SUCCESS;
 		num_ports = 1;
 	}
 
+	if (optimize)
+		return sl2vl_update_table(sm, p, 1, port_num, optimize,
+					  force_update, &qcfg->sl2vl);
+
 	for (i = 0; i < num_ports; i++) {
-		status = sl2vl_update_table(sm, p, i, port_num, force_update,
-					    &qcfg->sl2vl);
+		status = sl2vl_update_table(sm, p, i, port_num, optimize,
+					    force_update, &qcfg->sl2vl);
 		if (status != IB_SUCCESS)
 			return status;
 	}
@@ -222,22 +229,30 @@ static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
 	return IB_SUCCESS;
 }
 
-static int qos_physp_setup(osm_log_t * p_log, osm_sm_t * sm,
-			   osm_port_t * p_port, osm_physp_t * p,
-			   uint8_t port_num, unsigned force_update,
-			   const struct qos_config *qcfg)
+static int vlarb_physp_setup(osm_sm_t * sm, osm_physp_t * p, uint8_t port_num,
+			     unsigned force_update,
+			     const struct qos_config *qcfg)
 {
-	ib_api_status_t status;
-
 	/* OpVLs should be ok at this moment - just use it */
 
 	/* setup VL high limit on the physp later to be updated by link mgr */
 	p->vl_high_limit = qcfg->vl_high_limit;
 
 	/* setup VLArbitration */
-	status = vlarb_update(sm, p, port_num, force_update, qcfg);
+	return vlarb_update(sm, p, port_num, force_update, qcfg);
+}
+
+static int qos_physp_setup(osm_log_t * p_log, osm_sm_t * sm,
+			   osm_physp_t * p0, osm_physp_t * p,
+			   uint8_t port_num, unsigned force_update,
+			   const struct qos_config *qcfg)
+{
+	ib_api_status_t status;
+
+	/* setup VLArbitration */
+	status = vlarb_physp_setup(sm, p, port_num, force_update, qcfg);
 	if (status != IB_SUCCESS) {
-		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6202 : "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6202: "
 			"failed to update VLArbitration tables "
 			"for port %" PRIx64 " #%d\n",
 			cl_ntoh64(p->port_guid), port_num);
@@ -245,9 +260,9 @@ static int qos_physp_setup(osm_log_t * p_log, osm_sm_t * sm,
 	}
 
 	/* setup SL2VL tables */
-	status = sl2vl_update(sm, p_port, p, port_num, force_update, qcfg);
+	status = sl2vl_update(sm, p0, p, port_num, 0, force_update, qcfg);
 	if (status != IB_SUCCESS) {
-		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6203 : "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6203: "
 			"failed to update SL2VLMapping tables "
 			"for port %" PRIx64 " #%d\n",
 			cl_ntoh64(p->port_guid), port_num);
@@ -267,6 +282,7 @@ int osm_qos_setup(osm_opensm_t * p_osm)
 	uint32_t num_physp;
 	osm_physp_t *p_physp;
 	osm_node_t *p_node;
+	osm_switch_t *p_sw;
 	unsigned force_update;
 	int ret = 0;
 	uint8_t i;
@@ -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,
+					 &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)) {
@@ -298,6 +352,11 @@ int osm_qos_setup(osm_opensm_t * p_osm)
 
 		p_node = p_port->p_node;
 		if (p_node->sw) {
+			/* skip switches with optimized SL2VL mapping
+			   programming since already done */
+			if (ib_switch_info_get_opt_sl2vlmapping(&p_node->sw->switch_info) &&
+			    p_osm->subn.opt.use_optimized_slvl)
+				goto check_port0;
 			num_physp = osm_node_get_num_physp(p_node);
 			for (i = 1; i < num_physp; i++) {
 				p_physp = osm_node_get_physp_ptr(p_node, i);
@@ -306,10 +365,11 @@ int osm_qos_setup(osm_opensm_t * p_osm)
 				force_update = p_physp->need_update ||
 				    p_osm->subn.need_update;
 				if (qos_physp_setup(&p_osm->log, &p_osm->sm,
-						    p_port, p_physp, i,
+						    p_port->p_physp, p_physp, i,
 						    force_update, &swe_config))
 					ret = -1;
 			}
+check_port0:
 			/* skip base port 0 */
 			if (!ib_switch_info_is_enhanced_port0
 			    (&p_node->sw->switch_info))
@@ -326,8 +386,8 @@ int osm_qos_setup(osm_opensm_t * p_osm)
 			continue;
 
 		force_update = p_physp->need_update || p_osm->subn.need_update;
-		if (qos_physp_setup(&p_osm->log, &p_osm->sm, p_port, p_physp,
-				    0, force_update, cfg))
+		if (qos_physp_setup(&p_osm->log, &p_osm->sm, p_port->p_physp,
+				    p_physp, 0, force_update, cfg))
 			ret = -1;
 	}
 
opensm/opensm/osm_slvl_map_rcv.c +17 -2
index 4f75690..214a763 100644
@@ -2,6 +2,7 @@
  * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved.
  * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -70,7 +71,9 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 	osm_slvl_context_t *p_context;
 	ib_net64_t port_guid;
 	ib_net64_t node_guid;
-	uint8_t out_port_num, in_port_num;
+	uint32_t attr_mod;
+	uint8_t out_port_num, in_port_num, startinport, startoutport,
+		endinport, endoutport;
 
 	CL_ASSERT(sm);
 
@@ -109,6 +112,9 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 		    (uint8_t) cl_ntoh32(p_smp->attr_mod & 0xFF000000);
 		in_port_num =
 		    (uint8_t) cl_ntoh32((p_smp->attr_mod & 0x00FF0000) << 8);
+		attr_mod = cl_ntoh32(p_smp->attr_mod);
+		if (attr_mod & 0x30000)
+			goto opt_sl2vl;
 		p_physp = osm_node_get_physp_ptr(p_node, out_port_num);
 	} else {
 		p_physp = p_port->p_physp;
@@ -121,7 +127,7 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 	   all we want is to update the subnet.
 	 */
 	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-		"Got SLtoVL get response in_port_num %u out_port_num %u with "
+		"Received SLtoVL GetResp in_port_num %u out_port_num %u with "
 		"GUID 0x%" PRIx64 " for parent node GUID 0x%" PRIx64 ", TID 0x%"
 		PRIx64 "\n", in_port_num, out_port_num, cl_ntoh64(port_guid),
 		cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
@@ -140,6 +146,38 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 				out_port_num, p_slvl_tbl, OSM_LOG_DEBUG);
 
 	osm_physp_set_slvl_tbl(p_physp, p_slvl_tbl, in_port_num);
+	goto Exit;
+
+opt_sl2vl:
+	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
+		osm_log(sm->p_log, OSM_LOG_VERBOSE,
+			"Received optimized SLtoVL get response in_port_num %u "
+			"out_port_num %u with GUID 0x%" PRIx64 " for parent "
+			"node GUID 0x%" PRIx64 ", TID 0x%" PRIx64 "\n",
+			in_port_num, out_port_num, cl_ntoh64(port_guid),

opensm/opensm/osm_slvl_map_rcv.c void osm_slvl_rcv_process(IN void *context, IN void *p_data) · line 167

Quoted 10 lines
opensm/opensm/osm_slvl_map_rcv.c +10 -0
+			cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
+
+	osm_dump_slvl_map_table(sm->p_log, port_guid, in_port_num,
+				out_port_num, p_slvl_tbl, OSM_LOG_DEBUG);
+
+	if (attr_mod & 0x10000) {
+		startoutport = ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info) ? 0 : 1;
+		endoutport = osm_node_get_num_physp(p_node);
+	} else
+		endoutport = startoutport = out_port_num;

For this case (when endoutport == startoutport) in later loop:

	for (out_port_num = startoutport; out_port_num < endoutport;
	     out_port_num++)

nothing will be done. Right?

opensm/opensm/osm_slvl_map_rcv.c void osm_slvl_rcv_process(IN void *context, IN void *p_data) · line 172

Quoted 5 lines
opensm/opensm/osm_slvl_map_rcv.c +5 -0
+	if (attr_mod & 0x20000) {
+		startinport = ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info) ? 0 : 1;
+		endinport = osm_node_get_num_physp(p_node);
+	} else
+		endinport = startinport = in_port_num;

Ditto with 'inport'.

Sasha

Quoted 48 lines
opensm/opensm/osm_slvl_map_rcv.c +8 -0
+
+	for (out_port_num = startoutport; out_port_num < endoutport;
+	     out_port_num++) {
+		p_physp = osm_node_get_physp_ptr(p_node, out_port_num);
+		for (in_port_num = startinport; in_port_num < endinport;
+		     in_port_num++)
+			osm_physp_set_slvl_tbl(p_physp, p_slvl_tbl, in_port_num);
+	}
 
 Exit:
 	cl_plock_release(sm->p_lock);
opensm/opensm/osm_subnet.c +7 -3
index 09029db..103b5c6 100644
@@ -354,6 +354,7 @@ static const opt_rec_t opt_tbl[] = {
 	{ "daemon", OPT_OFFSET(daemon), opts_parse_boolean, NULL, 0 },
 	{ "sm_inactive", OPT_OFFSET(sm_inactive), opts_parse_boolean, NULL, 1 },
 	{ "babbling_port_policy", OPT_OFFSET(babbling_port_policy), opts_parse_boolean, NULL, 1 },
+	{ "use_optimized_slvl", OPT_OFFSET(use_optimized_slvl), opts_parse_boolean, NULL, 1 },
 #ifdef ENABLE_OSM_PERF_MGR
 	{ "perfmgr", OPT_OFFSET(perfmgr), opts_parse_boolean, NULL, 0 },
 	{ "perfmgr_redir", OPT_OFFSET(perfmgr_redir), opts_parse_boolean, NULL, 0 },
@@ -713,6 +714,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * p_opt)
 	p_opt->daemon = FALSE;
 	p_opt->sm_inactive = FALSE;
 	p_opt->babbling_port_policy = FALSE;
+	p_opt->use_optimized_slvl = FALSE;
 #ifdef ENABLE_OSM_PERF_MGR
 	p_opt->perfmgr = FALSE;
 	p_opt->perfmgr_redir = TRUE;
@@ -1499,10 +1501,13 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * p_opts)
 		"# SM Inactive\n"
 		"sm_inactive %s\n\n"
 		"# Babbling Port Policy\n"
-		"babbling_port_policy %s\n\n",
+		"babbling_port_policy %s\n\n"
+		"# Use Optimized SLtoVLMapping programming if supported by device\n"
+		"use_optimized_slvl %s\n\n",
 		p_opts->daemon ? "TRUE" : "FALSE",
 		p_opts->sm_inactive ? "TRUE" : "FALSE",
-		p_opts->babbling_port_policy ? "TRUE" : "FALSE");
+		p_opts->babbling_port_policy ? "TRUE" : "FALSE",
+		p_opts->use_optimized_slvl ? "TRUE" : "FALSE");
 
 #ifdef ENABLE_OSM_PERF_MGR
 	fprintf(out,
--
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#19 lore raw

SGkgU2FzaGEsCgpPbiBUdWUsIERlYyAyOSwgMjAwOSBhdCAxMToyOSBBTSwgU2FzaGEgS2hhcHlv cnNreSA8c2FzaGFrQHZvbHRhaXJlLmNvbT4gd3JvdGU6Cj4gSGkgSGFsLAo+Cj4gT24gMTQ6NDEg VHVlIDAxIERlYyDCoCDCoCAsIEhhbCBSb3NlbnN0b2NrIHdyb3RlOgo+Pgo+PiBPcHRpbWl6ZWQg U0x0b1ZMTWFwcGluZ1RhYmxlIHByb2dyYW1taW5nIHJlZHVjZXMgdGhlIG51bWJlciBvZiBNQURz Cj4+IG5lZWRlZCBmcm9tIE8obioqMikgdG8gTyhuKS4gU2VlIElCQSAxLjIuMSB2b2wgMSBwLiA4 NDMgMTQuMi41LjgKPj4gU0x0b1ZMTWFwcGluZ1RhYmxlLgo+Pgo+PiBTaWduZWQtb2ZmLWJ5OiBI YWwgUm9zZW5zdG9jayA8aGFsLnJvc2Vuc3RvY2tAZ21haWwuY29tPgo+PiAtLS0KPj4gQ2hhbmdl c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mIEVOQUJMRV9PU01fUEVS Rl9NR1IKPj4gwqAgwqAgwqAgZnByaW50ZihvdXQsCj4+IC0tCj4+IFRvIHVuc3Vic2NyaWJlIGZy b20gdGhpcyBsaXN0OiBzZW5kIHRoZSBsaW5lICJ1bnN1YnNjcmliZSBsaW51eC1yZG1hIiBpbgo+ PiB0aGUgYm9keSBvZiBhIG1lc3NhZ2UgdG8gbWFqb3Jkb21vQHZnZXIua2VybmVsLm9yZwo+PiBN b3JlIG1ham9yZG9tbyBpbmZvIGF0IMKgaHR0cDovL3ZnZXIua2VybmVsLm9yZy9tYWpvcmRvbW8t aW5mby5odG1sCj4+Cj4gLS0KPiBUbyB1bnN1YnNjcmliZSBmcm9tIHRoaXMgbGlzdDogc2VuZCB0 aGUgbGluZSAidW5zdWJzY3JpYmUgbGludXgtcmRtYSIgaW4KPiB0aGUgYm9keSBvZiBhIG1lc3Nh Z2UgdG8gbWFqb3Jkb21vQHZnZXIua2VybmVsLm9yZwo+IE1vcmUgbWFqb3Jkb21vIGluZm8gYXQg wqBodHRwOi8vdmdlci5rZXJuZWwub3JnL21ham9yZG9tby1pbmZvLmh0bWwKPgo= --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#20 lore raw

PATCH 1/1 opensm/osm_qos.c: merge SL2VL mapping capability check

In reply to a message not in the archive

The IBA 1.2.1 states (Vol.1, p.840, Table XX, explanation (b)) that SL2VL mapping capability for switch external ports must be indicated on its port 0 PortInfo:CapMask. So it lets us to unify this capability check over all types of IB nodes.

---
 opensm/opensm/osm_qos.c |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)
opensm/opensm/osm_qos.c +6 -14
index 08f9a60..afeaa11 100644
@@ -194,23 +194,15 @@ static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
 {
 	ib_api_status_t status;
 	uint8_t i, num_ports;
-	osm_physp_t *p_physp;
+	ib_port_info_t *pi = &p_port->p_physp->port_info;
+
+	if (!(pi->capability_mask & IB_PORT_CAP_HAS_SL_MAP))
+		return IB_SUCCESS;
 
-	if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH) {
-		if (ib_port_info_get_vl_cap(&p->port_info) == 1) {
-			/* Check port 0's capability mask */
-			p_physp = p_port->p_physp;
-			if (!
-			    (p_physp->port_info.
-			     capability_mask & IB_PORT_CAP_HAS_SL_MAP))
-				return IB_SUCCESS;
-		}
+	if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH)
 		num_ports = osm_node_get_num_physp(osm_physp_get_node_ptr(p));
-	} else {
-		if (!(p->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
-			return IB_SUCCESS;
+	else
 		num_ports = 1;
-	}
 
 	for (i = 0; i < num_ports; i++) {
 		status = sl2vl_update_table(sm, p, i, port_num, force_update,
Signature · 6 lines
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#21 lore raw

PATCH 1/1 opensm/osm_qos.c: split switch external and end ports setup

This splits QoS related port parameters setup over switch external ports and end ports. Such separation leaves us with simpler code and saves some repeated flows in case of switch external ports (actually required per switch and not per port).

Another advantages: Optimized Sl2VL Mapping procedure can be implemented easier using this model. A low level port QoS related parameters setup infrastructure is ready for supporting per port QoS related configuration (which hopefully will be implemented some days).

---
 opensm/opensm/osm_qos.c |  137 +++++++++++++++++++++--------------------------
 1 files changed, 61 insertions(+), 76 deletions(-)
opensm/opensm/osm_qos.c +61 -76
index afeaa11..f54e995 100644
@@ -77,6 +77,7 @@ static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,
 	osm_madw_context_t context;
 	uint32_t attr_mod;
 	unsigned vl_mask, i;
+	ib_api_status_t status;
 
 	vl_mask = (1 << (ib_port_info_get_op_vls(&p->port_info) - 1)) - 1;
 
@@ -96,10 +97,17 @@ static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,
 	context.vla_context.set_method = TRUE;
 	attr_mod = ((block_num + 1) << 16) | port_num;
 
-	return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
-			   (uint8_t *) & block, sizeof(block),
-			   IB_MAD_ATTR_VL_ARBITRATION, cl_hton32(attr_mod),
-			   CL_DISP_MSGID_NONE, &context);
+	status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
+			     (uint8_t *) & block, sizeof(block),
+			     IB_MAD_ATTR_VL_ARBITRATION, cl_hton32(attr_mod),
+			     CL_DISP_MSGID_NONE, &context);
+	if (status != IB_SUCCESS)
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 6202 : "
+			"failed to update VLArbitration tables "
+			"for port %" PRIx64 " block %u\n",
+			cl_ntoh64(p->port_guid), block_num);
+
+	return status;
 }
 
 static ib_api_status_t vlarb_update(osm_sm_t * sm, osm_physp_t * p,
@@ -157,6 +165,7 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
 	ib_slvl_table_t tbl, *p_tbl;
 	osm_node_t *p_node = osm_physp_get_node_ptr(p);
 	uint32_t attr_mod;
+	ib_api_status_t status;
 	unsigned vl_mask;
 	uint8_t vl1, vl2;
 	int i;
@@ -181,70 +190,65 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
 	context.slvl_context.port_guid = osm_physp_get_port_guid(p);
 	context.slvl_context.set_method = TRUE;
 	attr_mod = in_port << 8 | out_port;
-	return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
-			   (uint8_t *) & tbl, sizeof(tbl),
-			   IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
-			   CL_DISP_MSGID_NONE, &context);
+	status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
+			     (uint8_t *) & tbl, sizeof(tbl),
+			     IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
+			     CL_DISP_MSGID_NONE, &context);
+	if (status != IB_SUCCESS)
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 6203 : "
+			"failed to update SL2VLMapping tables "
+			"for port %" PRIx64 "i, attr_mod 0x%x\n",
+			cl_ntoh64(p->port_guid), attr_mod);
+	return status;
 }
 
-static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
-				    osm_physp_t * p, uint8_t port_num,
-				    unsigned force_update,
-				    const struct qos_config *qcfg)
+static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
+			      const struct qos_config *qcfg)
 {
-	ib_api_status_t status;
-	uint8_t i, num_ports;
-	ib_port_info_t *pi = &p_port->p_physp->port_info;
-
-	if (!(pi->capability_mask & IB_PORT_CAP_HAS_SL_MAP))
-		return IB_SUCCESS;
+	osm_physp_t *p0, *p;
+	unsigned force_update;
+	unsigned num_ports = osm_node_get_num_physp(node);
+	int ret = 0;
+	unsigned i, j;
 
-	if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH)
-		num_ports = osm_node_get_num_physp(osm_physp_get_node_ptr(p));
-	else
-		num_ports = 1;
+	for (i = 1; i < num_ports; i++) {
+		p = osm_node_get_physp_ptr(node, i);
+		force_update = p->need_update || sm->p_subn->need_update;
+		p->vl_high_limit = qcfg->vl_high_limit;
+		if (vlarb_update(sm, p, p->port_num, force_update, qcfg))
+			ret = -1;
+	}
 
-	for (i = 0; i < num_ports; i++) {
-		status = sl2vl_update_table(sm, p, i, port_num, force_update,
-					    &qcfg->sl2vl);
-		if (status != IB_SUCCESS)
-			return status;
+	p0 = osm_node_get_physp_ptr(node, 0);
+	if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
+		return ret;
+
+	for (i = 1; i < num_ports; i++) {
+		p = osm_node_get_physp_ptr(node, i);
+		force_update = p->need_update || sm->p_subn->need_update;
+		for (j = 0; j < num_ports; j++)
+			if (sl2vl_update_table(sm, p, i, j, force_update,
+					       &qcfg->sl2vl))
+				ret = -1;
 	}
 
-	return IB_SUCCESS;
+	return ret;
 }
 
-static int qos_physp_setup(osm_log_t * p_log, osm_sm_t * sm,
-			   osm_port_t * p_port, osm_physp_t * p,
-			   uint8_t port_num, unsigned force_update,
-			   const struct qos_config *qcfg)
+static int qos_endport_setup(osm_sm_t * sm, osm_physp_t * p,
+			     const struct qos_config *qcfg)
 {
-	ib_api_status_t status;
+	unsigned force_update = p->need_update || sm->p_subn->need_update;
 
-	/* OpVLs should be ok at this moment - just use it */
-
-	/* setup VL high limit on the physp later to be updated by link mgr */
 	p->vl_high_limit = qcfg->vl_high_limit;
-
-	/* setup VLArbitration */
-	status = vlarb_update(sm, p, port_num, force_update, qcfg);
-	if (status != IB_SUCCESS) {
-		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6202 : "
-			"failed to update VLArbitration tables "
-			"for port %" PRIx64 " #%d\n",
-			cl_ntoh64(p->port_guid), port_num);
+	if (vlarb_update(sm, p, 0, force_update, qcfg))
 		return -1;
-	}
 
-	/* setup SL2VL tables */
-	status = sl2vl_update(sm, p_port, p, port_num, force_update, qcfg);
-	if (status != IB_SUCCESS) {
-		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6203 : "
-			"failed to update SL2VLMapping tables "
-			"for port %" PRIx64 " #%d\n",
-			cl_ntoh64(p->port_guid), port_num);
+	if (!(p->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
+		return 0;
+
+	if (sl2vl_update_table(sm, p, 0, 0, force_update, &qcfg->sl2vl))
 		return -1;
-	}
 
 	return 0;
 }
@@ -256,12 +260,8 @@ int osm_qos_setup(osm_opensm_t * p_osm)
 	cl_qmap_t *p_tbl;
 	cl_map_item_t *p_next;
 	osm_port_t *p_port;
-	uint32_t num_physp;
-	osm_physp_t *p_physp;
 	osm_node_t *p_node;
-	unsigned force_update;
 	int ret = 0;
-	uint8_t i;
 
 	if (!p_osm->subn.opt.qos)
 		return 0;
@@ -290,18 +290,9 @@ int osm_qos_setup(osm_opensm_t * p_osm)
 
 		p_node = p_port->p_node;
 		if (p_node->sw) {
-			num_physp = osm_node_get_num_physp(p_node);
-			for (i = 1; i < num_physp; i++) {
-				p_physp = osm_node_get_physp_ptr(p_node, i);
-				if (!p_physp)
-					continue;
-				force_update = p_physp->need_update ||
-				    p_osm->subn.need_update;
-				if (qos_physp_setup(&p_osm->log, &p_osm->sm,
-						    p_port, p_physp, i,
-						    force_update, &swe_config))
-					ret = -1;
-			}
+			if (qos_extports_setup(&p_osm->sm, p_node, &swe_config))
+				ret = -1;
+
 			/* skip base port 0 */
 			if (!ib_switch_info_is_enhanced_port0
 			    (&p_node->sw->switch_info))
@@ -313,13 +304,7 @@ int osm_qos_setup(osm_opensm_t * p_osm)
 		else
 			cfg = &ca_config;
 
-		p_physp = p_port->p_physp;
-		if (!p_physp)
-			continue;
-
-		force_update = p_physp->need_update || p_osm->subn.need_update;
-		if (qos_physp_setup(&p_osm->log, &p_osm->sm, p_port, p_physp,
-				    0, force_update, cfg))
+		if (qos_endport_setup(&p_osm->sm, p_port->p_physp, cfg))
 			ret = -1;
 	}
 
Signature · 6 lines
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#22 lore raw

Re: [PATCH] opensm/osm_qos.c: split switch external and end ports setup

T24gVHVlLCBKYW4gNSwgMjAxMCBhdCA2OjEwIEFNLCBTYXNoYSBLaGFweW9yc2t5IDxzYXNoYWtA dm9sdGFpcmUuY29tPiB3cm90ZToKPgo+IFRoaXMgc3BsaXRzIFFvUyByZWxhdGVkIHBvcnQgcGFy YW1ldGVycyBzZXR1cCBvdmVyIHN3aXRjaCBleHRlcm5hbCBwb3J0cwo+IGFuZCBlbmQgcG9ydHMu IFN1Y2ggc2VwYXJhdGlvbiBsZWF2ZXMgdXMgd2l0aCBzaW1wbGVyIGNvZGUgYW5kIHNhdmVzCj4g c29tZSByZXBlYXRlZCBmbG93cyBp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VlOwo+IC0KPiAtIMKgIMKgIMKgIMKgIMKgIMKgIMKg IGZvcmNlX3VwZGF0ZSA9IHBfcGh5c3AtPm5lZWRfdXBkYXRlIHx8IHBfb3NtLT5zdWJuLm5lZWRf dXBkYXRlOwo+IC0gwqAgwqAgwqAgwqAgwqAgwqAgwqAgaWYgKHFvc19waHlzcF9zZXR1cCgmcF9v c20tPmxvZywgJnBfb3NtLT5zbSwgcF9wb3J0LCBwX3BoeXNwLAo+IC0gwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgMCwgZm9yY2VfdXBkYXRlLCBjZmcp KQo+ICsgwqAgwqAgwqAgwqAgwqAgwqAgwqAgaWYgKHFvc19lbmRwb3J0X3NldHVwKCZwX29zbS0+ c20sIHBfcG9ydC0+cF9waHlzcCwgY2ZnKSkKPiDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoHJldCA9IC0xOwo+IMKgIMKgIMKgIMKgfQo+Cj4gLS0KPiAxLjYuNgo+Cj4gLS0KPiBU byB1bnN1YnNjcmliZSBmcm9tIHRoaXMgbGlzdDogc2VuZCB0aGUgbGluZSAidW5zdWJzY3JpYmUg bGludXgtcmRtYSIgaW4KPiB0aGUgYm9keSBvZiBhIG1lc3NhZ2UgdG8gbWFqb3Jkb21vQHZnZXIu a2VybmVsLm9yZwo+IE1vcmUgbWFqb3Jkb21vIGluZm8gYXQgwqBodHRwOi8vdmdlci5rZXJuZWwu b3JnL21ham9yZG9tby1pbmZvLmh0bWwKPgo=
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f231001070540y26b69cb3v82dddc1d7b7134b9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#24 lore raw

Re: [PATCH] opensm/osm_qos.c: split switch external and end ports setup

Quoted 9 lines · Hal Rosenstock
Quoted 5 lines · Sasha Khapyorsky

This splits QoS related port parameters setup over switch external ports and end ports. Such separation leaves us with simpler code and saves some repeated flows in case of switch external ports (actually required per switch and not per port).

Not sure what you mean by required in this statement. What are you referring to as required per switch rather than per port ?

Duplicated per switch external port setup detection of common (per switch) data - such as: number of ports, Sl2VL mapping capability p0->port_info.capability_mask.

Quoted 104 lines
Quoted 104 lines

Another advantages: Optimized Sl2VL Mapping procedure can be implemented easier using this model. A low level port QoS related parameters setup infrastructure is ready for supporting per port QoS related configuration (which hopefully will be implemented some days).

---
 opensm/opensm/osm_qos.c |  137 +++++++++++++++++++++--------------------------

 1 files changed, 61 insertions(+), 76 deletions(-)
opensm/opensm/osm_qos.c +37 -22
index afeaa11..f54e995 100644
@@ -77,6 +77,7 @@ static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,
        osm_madw_context_t context;
        uint32_t attr_mod;
        unsigned vl_mask, i;
+       ib_api_status_t status;
 
        vl_mask = (1 << (ib_port_info_get_op_vls(&p->port_info) - 1)) - 1;
 
@@ -96,10 +97,17 @@ static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,
        context.vla_context.set_method = TRUE;
        attr_mod = ((block_num + 1) << 16) | port_num;
 
-       return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
-                          (uint8_t *) & block, sizeof(block),
-                          IB_MAD_ATTR_VL_ARBITRATION, cl_hton32(attr_mod),
-                          CL_DISP_MSGID_NONE, &context);
+       status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
+                            (uint8_t *) & block, sizeof(block),
+                            IB_MAD_ATTR_VL_ARBITRATION, cl_hton32(attr_mod),
+                            CL_DISP_MSGID_NONE, &context);
+       if (status != IB_SUCCESS)
+               OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 6202 : "
+                       "failed to update VLArbitration tables "
+                       "for port %" PRIx64 " block %u\n",
+                       cl_ntoh64(p->port_guid), block_num);
+
+       return status;
  }
 
  static ib_api_status_t vlarb_update(osm_sm_t * sm, osm_physp_t * p,
@@ -157,6 +165,7 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
        ib_slvl_table_t tbl, *p_tbl;
        osm_node_t *p_node = osm_physp_get_node_ptr(p);
        uint32_t attr_mod;
+       ib_api_status_t status;
        unsigned vl_mask;
        uint8_t vl1, vl2;
        int i;
@@ -181,70 +190,65 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
        context.slvl_context.port_guid = osm_physp_get_port_guid(p);
        context.slvl_context.set_method = TRUE;
        attr_mod = in_port << 8 | out_port;
-       return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
-                          (uint8_t *) & tbl, sizeof(tbl),
-                          IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
-                          CL_DISP_MSGID_NONE, &context);
+       status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
+                            (uint8_t *) & tbl, sizeof(tbl),
+                            IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
+                            CL_DISP_MSGID_NONE, &context);
+       if (status != IB_SUCCESS)
+               OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 6203 : "
+                       "failed to update SL2VLMapping tables "
+                       "for port %" PRIx64 "i, attr_mod 0x%x\n",
+                       cl_ntoh64(p->port_guid), attr_mod);
+       return status;
  }
 
-static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
-                                   osm_physp_t * p, uint8_t port_num,
-                                   unsigned force_update,
-                                   const struct qos_config *qcfg)
+static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
+                             const struct qos_config *qcfg)
  {
-       ib_api_status_t status;
-       uint8_t i, num_ports;
-       ib_port_info_t *pi = &p_port->p_physp->port_info;
-
-       if (!(pi->capability_mask & IB_PORT_CAP_HAS_SL_MAP))
-               return IB_SUCCESS;
+       osm_physp_t *p0, *p;
+       unsigned force_update;
+       unsigned num_ports = osm_node_get_num_physp(node);
+       int ret = 0;
+       unsigned i, j;
 
-       if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH)
-               num_ports = osm_node_get_num_physp(osm_physp_get_node_ptr(p));
-       else
-               num_ports = 1;
+       for (i = 1; i < num_ports; i++) {
+               p = osm_node_get_physp_ptr(node, i);
+               force_update = p->need_update || sm->p_subn->need_update;
+               p->vl_high_limit = qcfg->vl_high_limit;
+               if (vlarb_update(sm, p, p->port_num, force_update, qcfg))
+                       ret = -1;
+       }
 
Quoted 11 lines

opensm/opensm/osm_qos.c static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p, · line 224

Quoted 8 lines
opensm/opensm/osm_qos.c +3 -5
-       for (i = 0; i < num_ports; i++) {
-               status = sl2vl_update_table(sm, p, i, port_num, force_update,
-                                           &qcfg->sl2vl);
-               if (status != IB_SUCCESS)
-                       return status;
+       p0 = osm_node_get_physp_ptr(node, 0);
+       if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
+               return ret;

Same comment on this as previous osm_qos patch comment on merging the SL2VL mapping capability check.

I answered there.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#25 lore raw

Re: [PATCH] opensm/osm_qos.c: split switch external and end ports setup

Quoted 8 lines · Sasha Khapyorsky
Quoted 7 lines · Hal Rosenstock
Quoted 5 lines · Sasha Khapyorsky

This splits QoS related port parameters setup over switch external ports and end ports. Such separation leaves us with simpler code and saves some repeated flows in case of switch external ports (actually required per switch and not per port).

Quoted 6 lines
Quoted 2 lines

Not sure what you mean by required in this statement. What are you referring to as required per switch rather than per port ?

Duplicated per switch external port setup detection of common (per switch) data - such as: number of ports, Sl2VL mapping capability p0->port_info.capability_mask.

It was your use of the word 'required' which was confusing to me. It's clear now what you mean.

-- Hal

Quoted 117 lines
Quoted 105 lines
Quoted 105 lines

Another advantages: Optimized Sl2VL Mapping procedure can be implemented easier using this model. A low level port QoS related parameters setup infrastructure is ready for supporting per port QoS related configuration (which hopefully will be implemented some days).

---
 opensm/opensm/osm_qos.c |  137 +++++++++++++++++++++--------------------------
 1 files changed, 61 insertions(+), 76 deletions(-)
opensm/opensm/osm_qos.c +37 -22
index afeaa11..f54e995 100644
@@ -77,6 +77,7 @@ static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,
       osm_madw_context_t context;
       uint32_t attr_mod;
       unsigned vl_mask, i;
+       ib_api_status_t status;
 
       vl_mask = (1 << (ib_port_info_get_op_vls(&p->port_info) - 1)) - 1;
 
@@ -96,10 +97,17 @@ static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,
       context.vla_context.set_method = TRUE;
       attr_mod = ((block_num + 1) << 16) | port_num;
 
-       return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
-                          (uint8_t *) & block, sizeof(block),
-                          IB_MAD_ATTR_VL_ARBITRATION, cl_hton32(attr_mod),
-                          CL_DISP_MSGID_NONE, &context);
+       status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
+                            (uint8_t *) & block, sizeof(block),
+                            IB_MAD_ATTR_VL_ARBITRATION, cl_hton32(attr_mod),
+                            CL_DISP_MSGID_NONE, &context);
+       if (status != IB_SUCCESS)
+               OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 6202 : "
+                       "failed to update VLArbitration tables "
+                       "for port %" PRIx64 " block %u\n",
+                       cl_ntoh64(p->port_guid), block_num);
+
+       return status;
 }
 
 static ib_api_status_t vlarb_update(osm_sm_t * sm, osm_physp_t * p,
@@ -157,6 +165,7 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
       ib_slvl_table_t tbl, *p_tbl;
       osm_node_t *p_node = osm_physp_get_node_ptr(p);
       uint32_t attr_mod;
+       ib_api_status_t status;
       unsigned vl_mask;
       uint8_t vl1, vl2;
       int i;
@@ -181,70 +190,65 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
       context.slvl_context.port_guid = osm_physp_get_port_guid(p);
       context.slvl_context.set_method = TRUE;
       attr_mod = in_port << 8 | out_port;
-       return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
-                          (uint8_t *) & tbl, sizeof(tbl),
-                          IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
-                          CL_DISP_MSGID_NONE, &context);
+       status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
+                            (uint8_t *) & tbl, sizeof(tbl),
+                            IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
+                            CL_DISP_MSGID_NONE, &context);
+       if (status != IB_SUCCESS)
+               OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 6203 : "
+                       "failed to update SL2VLMapping tables "
+                       "for port %" PRIx64 "i, attr_mod 0x%x\n",
+                       cl_ntoh64(p->port_guid), attr_mod);
+       return status;
 }
 
-static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
-                                   osm_physp_t * p, uint8_t port_num,
-                                   unsigned force_update,
-                                   const struct qos_config *qcfg)
+static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
+                             const struct qos_config *qcfg)
 {
-       ib_api_status_t status;
-       uint8_t i, num_ports;
-       ib_port_info_t *pi = &p_port->p_physp->port_info;
-
-       if (!(pi->capability_mask & IB_PORT_CAP_HAS_SL_MAP))
-               return IB_SUCCESS;
+       osm_physp_t *p0, *p;
+       unsigned force_update;
+       unsigned num_ports = osm_node_get_num_physp(node);
+       int ret = 0;
+       unsigned i, j;
 
-       if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH)
-               num_ports = osm_node_get_num_physp(osm_physp_get_node_ptr(p));
-       else
-               num_ports = 1;
+       for (i = 1; i < num_ports; i++) {
+               p = osm_node_get_physp_ptr(node, i);
+               force_update = p->need_update || sm->p_subn->need_update;
+               p->vl_high_limit = qcfg->vl_high_limit;
+               if (vlarb_update(sm, p, p->port_num, force_update, qcfg))
+                       ret = -1;
+       }
 
Quoted 11 lines

opensm/opensm/osm_qos.c static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p, · line 224

Quoted 8 lines
opensm/opensm/osm_qos.c +3 -5
-       for (i = 0; i < num_ports; i++) {
-               status = sl2vl_update_table(sm, p, i, port_num, force_update,
-                                           &qcfg->sl2vl);
-               if (status != IB_SUCCESS)
-                       return status;
+       p0 = osm_node_get_physp_ptr(node, 0);
+       if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
+               return ret;

Same comment on this as previous osm_qos patch comment on merging the SL2VL mapping capability check.

Quoted 4 lines

I answered there.

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#26 lore raw

Re: [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check

In reply to Sasha Khapyorsky
Quoted 2 lines · Sasha Khapyorsky

The IBA 1.2.1 states (Vol.1, p.840, Table XX,

Table 146 PortInfo

Quoted 3 lines

explanation (b)) that
SL2VL mapping capability for switch external ports must be indicated on its port 0 PortInfo:CapMask.

That footnote was added at IBA 1.2.1.

Quoted 1 line

So it lets us to unify this capability check over all types of IB nodes.

Change appears to be for switches to always rely on this bit rather than only when VLCap is 1. I wonder if there are any switches with VLCap > 1 that don't set the IsSLMappingSupported CapabilityMask bit. There shouldn't be (at least if they are IBA 1.2.1 compliant) but are you sure about this ?

-- Hal

Quoted 42 lines

---
 opensm/opensm/osm_qos.c |   22 +++++++---------------

 1 files changed, 7 insertions(+), 15 deletions(-)
opensm/opensm/osm_qos.c +6 -15
index 08f9a60..afeaa11 100644
@@ -194,23 +194,15 @@ static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
  {
        ib_api_status_t status;
        uint8_t i, num_ports;
-       osm_physp_t *p_physp;
+       ib_port_info_t *pi = &p_port->p_physp->port_info;
+
+       if (!(pi->capability_mask & IB_PORT_CAP_HAS_SL_MAP))
+               return IB_SUCCESS;
 
-       if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH) {
-               if (ib_port_info_get_vl_cap(&p->port_info) == 1) {
-                       /* Check port 0's capability mask */
-                       p_physp = p_port->p_physp;
-                       if (!
-                           (p_physp->port_info.
-                            capability_mask & IB_PORT_CAP_HAS_SL_MAP))
-                               return IB_SUCCESS;
-               }
+       if (osm_node_get_type(osm_physp_get_node_ptr(p)) == IB_NODE_TYPE_SWITCH)
                num_ports = osm_node_get_num_physp(osm_physp_get_node_ptr(p));
-       } else {
-               if (!(p->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
-                       return IB_SUCCESS;
+       else
                num_ports = 1;
-       }
 
        for (i = 0; i < num_ports; i++) {
                status = sl2vl_update_table(sm, p, i, port_num, force_update,
--

1.6.6

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f231001070538q78453f91kd47c931087dfa735-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#28 lore raw

Re: [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check

Quoted 6 lines · Hal Rosenstock

Change appears to be for switches to always rely on this bit rather than only when VLCap is 1. I wonder if there are any switches with VLCap > 1 that don't set the IsSLMappingSupported CapabilityMask bit. There shouldn't be (at least if they are IBA 1.2.1 compliant) but are you sure about this ?

I'm not sure about this, but think that probability of using such hypothetical old switches for any sort of QoS is very low. And anyway it doesn't look for me that we have any stronger SL2VL mapping capability indication - 'VLCap > 1' by itself doesn't do this too, right?

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#29 lore raw

Re: [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check

Quoted 10 lines · Sasha Khapyorsky
Quoted 6 lines · Hal Rosenstock

Change appears to be for switches to always rely on this bit rather than only when VLCap is 1. I wonder if there are any switches with VLCap > 1 that don't set the IsSLMappingSupported CapabilityMask bit. There shouldn't be (at least if they are IBA 1.2.1 compliant) but are you sure about this ?

I'm not sure about this, but think that probability of using such hypothetical old switches for any sort of QoS is very low.

Low but not zero... I'm also not sure it's just old switches... I've seen many rejections (status 7) since you made this change.

Quoted 3 lines

And anyway it
doesn't look for me that we have any stronger SL2VL mapping capability indication - 'VLCap > 1' by itself doesn't do this too, right?

It does. There's a requirement that SL2VL mapping is required when VLCap > 1.

-- Hal

Quoted 2 lines

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f231001131213r4a743d6boc1b07e9fadc773ac-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#31 lore raw

Re: [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check

Quoted 9 lines · Hal Rosenstock
Quoted 8 lines · Sasha Khapyorsky
Quoted 6 lines · Hal Rosenstock

Change appears to be for switches to always rely on this bit rather than only when VLCap is 1. I wonder if there are any switches with VLCap > 1 that don't set the IsSLMappingSupported CapabilityMask bit. There shouldn't be (at least if they are IBA 1.2.1 compliant) but are you sure about this ?

Quoted 5 lines
Quoted 2 lines

I'm not sure about this, but think that probability of using such hypothetical old switches for any sort of QoS is very low.

Low but not zero... I'm also not sure it's just old switches... I've seen many rejections (status 7) since you made this change.

This is interesting. Do you have any details?

Quoted 5 lines
Quoted 3 lines

And anyway it
doesn't look for me that we have any stronger SL2VL mapping capability indication - 'VLCap > 1' by itself doesn't do this too, right?

It does. There's a requirement that SL2VL mapping is required when VLCap > 1.

Correct, I found it in o7-4. Basically we can check both (now after switch/endport separation in the code this should be easier), but I would prefer to understand better an issue (if we have) first.

Also same o7-4 is applicable to CA and router ports. Do you know why was VLCap > 1 condition ignored there?

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#32 lore raw

Re: [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check

Quoted 10 lines · Sasha Khapyorsky
Quoted 9 lines · Hal Rosenstock
Quoted 8 lines · Sasha Khapyorsky
Quoted 6 lines · Hal Rosenstock

Change appears to be for switches to always rely on this bit rather than only when VLCap is 1. I wonder if there are any switches with VLCap > 1 that don't set the IsSLMappingSupported CapabilityMask bit. There shouldn't be (at least if they are IBA 1.2.1 compliant) but are you sure about this ?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

I'm not sure about this, but think that probability of using such hypothetical old switches for any sort of QoS is very low.

Low but not zero... I'm also not sure it's just old switches... I've seen many rejections (status 7) since you made this change.

This is interesting. Do you have any details?

I've been unable to get test time for this as yet.

Quoted 11 lines
Quoted 5 lines
Quoted 3 lines

And anyway it
doesn't look for me that we have any stronger SL2VL mapping capability indication - 'VLCap > 1' by itself doesn't do this too, right?

It does. There's a requirement that SL2VL mapping is required when VLCap > 1.

Correct, I found it in o7-4. Basically we can check both (now after switch/endport separation in the code this should be easier), but I would prefer to understand better an issue (if we have) first.

Also same o7-4 is applicable to CA and router ports.

I see no mention of CA and router ports in o7-4. What are you referring to here ?

Quoted 2 lines

Do you know why
was VLCap > 1 condition ignored there?

Where is the "there" that you are referring to above ?

-- Hal

Quoted 2 lines

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f231001230425j28ced479if608a75bb4216186-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#34 lore raw

Re: [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check

Quoted 10 lines · Hal Rosenstock
Quoted 8 lines
Quoted 2 lines

It does. There's a requirement that SL2VL mapping is required when VLCap > 1.

Correct, I found it in o7-4. Basically we can check both (now after switch/endport separation in the code this should be easier), but I would prefer to understand better an issue (if we have) first.

Also same o7-4 is applicable to CA and router ports.

I see no mention of CA and router ports in o7-4.

This is the point. o7-4 is not limited by switch ports.

Quoted 2 lines

What are you
referring to here ?

This was the question, why such capability check should be (was) ideologically different for CA ports? If 'VLCap > 1' is significant capability indication for switch ports this should be the same interpretation with CA and router ports.

Quoted 5 lines
Quoted 3 lines

Do you know why
was VLCap > 1 condition ignored there?

Where is the "there" that you are referring to above ?

not switch ports.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#35 lore raw

Re: [PATCH] opensm/osm_qos.c: merge SL2VL mapping capability check

Quoted 14 lines · Sasha Khapyorsky
Quoted 10 lines · Hal Rosenstock
Quoted 8 lines
Quoted 2 lines

It does. There's a requirement that SL2VL mapping is required when VLCap > 1.

Correct, I found it in o7-4. Basically we can check both (now after switch/endport separation in the code this should be easier), but I would prefer to understand better an issue (if we have) first.

Also same o7-4 is applicable to CA and router ports.

I see no mention of CA and router ports in o7-4.

This is the point. o7-4 is not limited by switch ports.

Quoted 7 lines
Quoted 2 lines

What are you
referring to here ?

This was the question, why such capability check should be (was) ideologically different for CA ports? If 'VLCap > 1' is significant capability indication for switch ports this should be the same interpretation with CA and router ports.

The difference is due to capability mask being valid for CA and router ports and only valid for switch port 0. Later on (at IBA 1.2.1), we came back and said for switch external ports they were the same as switch port 0 which was how footnote (b) came to be added but I'm not sure about relying on the conformance to this.

-- Hal

Quoted 11 lines
Quoted 6 lines
Quoted 4 lines

Do you know why
was VLCap > 1 condition ignored there?

Where is the "there" that you are referring to above ?

not switch ports.

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#36 lore raw
In reply to a message not in the archive

Hi Hal,

Quoted 7 lines · Hal Rosenstock

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.

---

[snip]

Quoted 4 lines
opensm/opensm/osm_qos.c +0 -0
index 08f9a60..617a86e 100644

[snip]

Quoted 20 lines
opensm/opensm/osm_qos.c +16 -0
@@ -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;

opensm/opensm/osm_qos.c int osm_qos_setup(osm_opensm_t * p_osm) · line 334

Quoted 10 lines
opensm/opensm/osm_qos.c +10 -0
+				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

Quoted 5 lines
opensm/opensm/osm_qos.c +5 -0
+					 &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);

opensm/opensm/osm_qos.c int osm_qos_setup(osm_opensm_t * p_osm) · line 349

Quoted 10 lines
opensm/opensm/osm_qos.c +7 -0
+				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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#37 lore raw
Quoted 8 lines · Sasha Khapyorsky
Quoted 7 lines

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.

---

Quoted 7 lines

[snip]

opensm/opensm/osm_qos.c

Quoted 4 lines
opensm/opensm/osm_qos.c +0 -0
index 08f9a60..617a86e 100644

After rebasing this part over recently posted patches it becomes:

opensm/opensm/osm_qos.c +12 -5
index f54e995..6bbbfa2 100644
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2006-2009 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -157,14 +158,13 @@ static ib_api_status_t vlarb_update(osm_sm_t * sm, osm_physp_t * p,
 }
 
 static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
-					  uint8_t in_port, uint8_t out_port,
+					  uint8_t in_port, uint32_t attr_mod,
 					  unsigned force_update,
 					  const ib_slvl_table_t * sl2vl_table)
 {
 	osm_madw_context_t context;
 	ib_slvl_table_t tbl, *p_tbl;
 	osm_node_t *p_node = osm_physp_get_node_ptr(p);
-	uint32_t attr_mod;
 	ib_api_status_t status;
 	unsigned vl_mask;
 	uint8_t vl1, vl2;
@@ -189,7 +189,6 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
 	context.slvl_context.node_guid = osm_node_get_node_guid(p_node);
 	context.slvl_context.port_guid = osm_physp_get_port_guid(p);
 	context.slvl_context.set_method = TRUE;
-	attr_mod = in_port << 8 | out_port;
 	status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
 			     (uint8_t *) & tbl, sizeof(tbl),
 			     IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
@@ -223,12 +222,20 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
 	if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
 		return ret;
 
+	if (ib_switch_info_get_opt_sl2vlmapping(&node->sw->switch_info) &&
+	    sm->p_subn->opt.use_optimized_slvl) {
+		p = osm_node_get_physp_ptr(node, 1);
+		force_update = p->need_update || sm->p_subn->need_update;
+		return sl2vl_update_table(sm, p, 1, 0x30000, force_update,
+					  &qcfg->sl2vl);
+	}
+
 	for (i = 1; i < num_ports; i++) {
 		p = osm_node_get_physp_ptr(node, i);
 		force_update = p->need_update || sm->p_subn->need_update;
 		for (j = 0; j < num_ports; j++)
-			if (sl2vl_update_table(sm, p, i, j, force_update,
-					       &qcfg->sl2vl))
+			if (sl2vl_update_table(sm, p, i, i << 8 | j,
+					       force_update, &qcfg->sl2vl))
 				ret = -1;
 	}
 

, does it look fine for you?

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#38 lore raw
Quoted 78 lines · Sasha Khapyorsky
Quoted 8 lines · Sasha Khapyorsky
Quoted 7 lines

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.

---

Quoted 7 lines

[snip]

opensm/opensm/osm_qos.c

Quoted 4 lines
opensm/opensm/osm_qos.c +0 -0
index 08f9a60..617a86e 100644

After rebasing this part over recently posted patches it becomes:

opensm/opensm/osm_qos.c +12 -5
index f54e995..6bbbfa2 100644
@@ -1,5 +1,6 @@
  /*
  * Copyright (c) 2006-2009 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -157,14 +158,13 @@ static ib_api_status_t vlarb_update(osm_sm_t * sm, osm_physp_t * p,
  }
 
  static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
-                                         uint8_t in_port, uint8_t out_port,
+                                         uint8_t in_port, uint32_t attr_mod,
                                          unsigned force_update,
                                          const ib_slvl_table_t * sl2vl_table)
  {
        osm_madw_context_t context;
        ib_slvl_table_t tbl, *p_tbl;
        osm_node_t *p_node = osm_physp_get_node_ptr(p);
-       uint32_t attr_mod;
        ib_api_status_t status;
        unsigned vl_mask;
        uint8_t vl1, vl2;
@@ -189,7 +189,6 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
        context.slvl_context.node_guid = osm_node_get_node_guid(p_node);
        context.slvl_context.port_guid = osm_physp_get_port_guid(p);
        context.slvl_context.set_method = TRUE;
-       attr_mod = in_port << 8 | out_port;
        status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
                             (uint8_t *) & tbl, sizeof(tbl),
                             IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
@@ -223,12 +222,20 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
        if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
                return ret;
 
+       if (ib_switch_info_get_opt_sl2vlmapping(&node->sw->switch_info) &&
+           sm->p_subn->opt.use_optimized_slvl) {
+               p = osm_node_get_physp_ptr(node, 1);
+               force_update = p->need_update || sm->p_subn->need_update;
+               return sl2vl_update_table(sm, p, 1, 0x30000, force_update,
+                                         &qcfg->sl2vl);
+       }
+
        for (i = 1; i < num_ports; i++) {
                p = osm_node_get_physp_ptr(node, i);
                force_update = p->need_update || sm->p_subn->need_update;
                for (j = 0; j < num_ports; j++)
-                       if (sl2vl_update_table(sm, p, i, j, force_update,
-                                              &qcfg->sl2vl))
+                       if (sl2vl_update_table(sm, p, i, i << 8 | j,
+                                              force_update, &qcfg->sl2vl))
                                ret = -1;
        }
 
Quoted 1 line

, does it look fine for you?

In the optimized case, doesn't this send extra SL2VL mapping table ? Couldn''t that be eliminated by checking for this in the new endport routine (and skipping the remainder of that routine) ?

-- Hal

Quoted 7 lines

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f231001070535l382f1d54t7f6290607e52b196-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#40 lore raw
Quoted 60 lines · Hal Rosenstock
Quoted 60 lines
opensm/opensm/osm_qos.c +12 -5
index f54e995..6bbbfa2 100644
@@ -1,5 +1,6 @@
  /*
  * Copyright (c) 2006-2009 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -157,14 +158,13 @@ static ib_api_status_t vlarb_update(osm_sm_t * sm, osm_physp_t * p,
  }
 
  static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
-                                         uint8_t in_port, uint8_t out_port,
+                                         uint8_t in_port, uint32_t attr_mod,
                                          unsigned force_update,
                                          const ib_slvl_table_t * sl2vl_table)
  {
        osm_madw_context_t context;
        ib_slvl_table_t tbl, *p_tbl;
        osm_node_t *p_node = osm_physp_get_node_ptr(p);
-       uint32_t attr_mod;
        ib_api_status_t status;
        unsigned vl_mask;
        uint8_t vl1, vl2;
@@ -189,7 +189,6 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
        context.slvl_context.node_guid = osm_node_get_node_guid(p_node);
        context.slvl_context.port_guid = osm_physp_get_port_guid(p);
        context.slvl_context.set_method = TRUE;
-       attr_mod = in_port << 8 | out_port;
        status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
                             (uint8_t *) & tbl, sizeof(tbl),
                             IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
@@ -223,12 +222,20 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
        if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
                return ret;
 
+       if (ib_switch_info_get_opt_sl2vlmapping(&node->sw->switch_info) &&
+           sm->p_subn->opt.use_optimized_slvl) {
+               p = osm_node_get_physp_ptr(node, 1);
+               force_update = p->need_update || sm->p_subn->need_update;
+               return sl2vl_update_table(sm, p, 1, 0x30000, force_update,
+                                         &qcfg->sl2vl);
+       }
+
        for (i = 1; i < num_ports; i++) {
                p = osm_node_get_physp_ptr(node, i);
                force_update = p->need_update || sm->p_subn->need_update;
                for (j = 0; j < num_ports; j++)
-                       if (sl2vl_update_table(sm, p, i, j, force_update,
-                                              &qcfg->sl2vl))
+                       if (sl2vl_update_table(sm, p, i, i << 8 | j,
+                                              force_update, &qcfg->sl2vl))
                                ret = -1;
        }
 
Quoted 3 lines
Quoted 1 line

, does it look fine for you?

In the optimized case, doesn't this send extra SL2VL mapping table ?

I don't see how, could you elaborate?

Sasha

Quoted 13 lines

Couldn''t that be eliminated by checking for this in the new endport routine (and skipping the remainder of that routine) ?

-- Hal

Quoted 7 lines

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#41 lore raw
Quoted 61 lines · Sasha Khapyorsky
Quoted 60 lines · Hal Rosenstock
Quoted 60 lines
opensm/opensm/osm_qos.c +12 -5
index f54e995..6bbbfa2 100644
@@ -1,5 +1,6 @@
 /*
 * Copyright (c) 2006-2009 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
@@ -157,14 +158,13 @@ static ib_api_status_t vlarb_update(osm_sm_t * sm, osm_physp_t * p,
 }
 
 static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
-                                         uint8_t in_port, uint8_t out_port,
+                                         uint8_t in_port, uint32_t attr_mod,
                                         unsigned force_update,
                                         const ib_slvl_table_t * sl2vl_table)
 {
       osm_madw_context_t context;
       ib_slvl_table_t tbl, *p_tbl;
       osm_node_t *p_node = osm_physp_get_node_ptr(p);
-       uint32_t attr_mod;
       ib_api_status_t status;
       unsigned vl_mask;
       uint8_t vl1, vl2;
@@ -189,7 +189,6 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
       context.slvl_context.node_guid = osm_node_get_node_guid(p_node);
       context.slvl_context.port_guid = osm_physp_get_port_guid(p);
       context.slvl_context.set_method = TRUE;
-       attr_mod = in_port << 8 | out_port;
       status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
                            (uint8_t *) & tbl, sizeof(tbl),
                            IB_MAD_ATTR_SLVL_TABLE, cl_hton32(attr_mod),
@@ -223,12 +222,20 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
       if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
               return ret;
 
+       if (ib_switch_info_get_opt_sl2vlmapping(&node->sw->switch_info) &&
+           sm->p_subn->opt.use_optimized_slvl) {
+               p = osm_node_get_physp_ptr(node, 1);
+               force_update = p->need_update || sm->p_subn->need_update;
+               return sl2vl_update_table(sm, p, 1, 0x30000, force_update,
+                                         &qcfg->sl2vl);
+       }
+
       for (i = 1; i < num_ports; i++) {
               p = osm_node_get_physp_ptr(node, i);
               force_update = p->need_update || sm->p_subn->need_update;
               for (j = 0; j < num_ports; j++)
-                       if (sl2vl_update_table(sm, p, i, j, force_update,
-                                              &qcfg->sl2vl))
+                       if (sl2vl_update_table(sm, p, i, i << 8 | j,
+                                              force_update, &qcfg->sl2vl))
                               ret = -1;
       }
 
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

, does it look fine for you?

In the optimized case, doesn't this send extra SL2VL mapping table ?

I don't see how, could you elaborate?

Doesn't this send a table for the endport even when optimized ?

-- Hal

Quoted 17 lines

Sasha

Quoted 13 lines

Couldn''t that be eliminated by checking for this in the new endport routine (and skipping the remainder of that routine) ?

-- Hal

Quoted 7 lines

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f231001131214w790b1f34s46cbbda8b6454ac3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#43 lore raw
Quoted 24 lines · Hal Rosenstock
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
opensm/opensm/osm_qos.c +10 -2
@@ -223,12 +222,20 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
       if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
               return ret;
 
+       if (ib_switch_info_get_opt_sl2vlmapping(&node->sw->switch_info) &&
+           sm->p_subn->opt.use_optimized_slvl) {
+               p = osm_node_get_physp_ptr(node, 1);
+               force_update = p->need_update || sm->p_subn->need_update;
+               return sl2vl_update_table(sm, p, 1, 0x30000, force_update,
+                                         &qcfg->sl2vl);
+       }
+
       for (i = 1; i < num_ports; i++) {
               p = osm_node_get_physp_ptr(node, i);
               force_update = p->need_update || sm->p_subn->need_update;
               for (j = 0; j < num_ports; j++)
-                       if (sl2vl_update_table(sm, p, i, j, force_update,
-                                              &qcfg->sl2vl))
+                       if (sl2vl_update_table(sm, p, i, i << 8 | j,
+                                              force_update, &qcfg->sl2vl))
                               ret = -1;
       }
 
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

, does it look fine for you?

In the optimized case, doesn't this send extra SL2VL mapping table ?

I don't see how, could you elaborate?

Doesn't this send a table for the endport even when optimized ?

Yes, and how is this different from the original patch?

Remember, that there is a different configuration for switch's port 0 (needed or not - this is another question), so we must to take it into account.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#44 lore raw
Quoted 29 lines · Sasha Khapyorsky
Quoted 28 lines · Hal Rosenstock
Quoted 28 lines
Quoted 27 lines
Quoted 24 lines
(quoted diff) +10 -2
@@ -223,12 +222,20 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node,
        if (!(p0->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
                return ret;
 
+       if (ib_switch_info_get_opt_sl2vlmapping(&node->sw->switch_info) &&
+           sm->p_subn->opt.use_optimized_slvl) {
+               p = osm_node_get_physp_ptr(node, 1);
+               force_update = p->need_update || sm->p_subn->need_update;
+               return sl2vl_update_table(sm, p, 1, 0x30000, force_update,
+                                         &qcfg->sl2vl);
+       }
+
        for (i = 1; i < num_ports; i++) {
                p = osm_node_get_physp_ptr(node, i);
                force_update = p->need_update || sm->p_subn->need_update;
                for (j = 0; j < num_ports; j++)
-                       if (sl2vl_update_table(sm, p, i, j, force_update,
-                                              &qcfg->sl2vl))
+                       if (sl2vl_update_table(sm, p, i, i << 8 | j,
+                                              force_update, &qcfg->sl2vl))
                                ret = -1;
        }
 
Quoted 1 line

, does it look fine for you?

In the optimized case, doesn't this send extra SL2VL mapping table ?

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I don't see how, could you elaborate?

Doesn't this send a table for the endport even when optimized ?

Yes, and how is this different from the original patch?

The original patch didn't do this but missed accounting for the switch port 0 configuration.

Quoted 3 lines

Remember, that there is a different configuration for switch's port 0 (needed or not - this is another question), so we must to take it into account.

Yes but is there a need for this if they are the same and wildcarding is used ? That will save what seems to me to be an unneeded MAD request/response pair per switch.

-- Hal

Quoted 2 lines

Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f0e08f231001230426t2e48aa58pbcb2d3f1323c6e56-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#46 lore raw
Quoted 5 lines · Hal Rosenstock
Quoted 2 lines

Yes, and how is this different from the original patch?

The original patch didn't do this but missed accounting for the switch port 0 configuration.

I cannot understand. What do you mean?

Quoted 7 lines
Quoted 3 lines

Remember, that there is a different configuration for switch's port 0 (needed or not - this is another question), so we must to take it into account.

Yes but is there a need for this if they are the same and wildcarding is used ? That will save what seems to me to be an unneeded MAD request/response pair per switch.

This leads us to switch ports (0 and externals) QoS configuration unification. Basically I have nothing against this, but this is not actually related to this patch series. And should be done first as completely separate change, then we can merge SL2VL setup too.

However, there is some related long time pended task - QoS policy and QoS port parameters configurations merge. Keeping this in the mind I would think that finally we will need ability to have "per-port" SL2VL and VLArb configuration. We can take it into account even now.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#47 lore raw
In reply to Sasha Khapyorsky

SGkgU2FzaGEsCgpPbiBUdWUsIEphbiA1LCAyMDEwIGF0IDY6MTggQU0sIFNhc2hhIEtoYXB5b3Jz a3kgPHNhc2hha0B2b2x0YWlyZS5jb20+IHdyb3RlOgo+IEhpIEhhbCwKPgo+IE9uIDE0OjQxIFR1 ZSAwMSBEZWMgwqAgwqAgLCBIYWwgUm9zZW5zdG9jayB3cm90ZToKPj4KPj4gT3B0aW1pemVkIFNM dG9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wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgcmV0ID0gLTE7Cj4+ICsgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgfQo+PiArIMKgIMKgIMKgIMKgIMKgIMKgIH0KPj4gKyDCoCDCoCB9Cj4+ ICsKPj4gKyDCoCDCoCAvKiBub3csIGxvb3Agb24gcG9ydHMgc2tpcHBpbmcgdGhlIGV4dGVybmFs IHBvcnRzIG9mIHN3aXRjaGVzCj4+ICsgwqAgwqAgwqAgwqB0aGF0IHN1cHBvcnQgb3B0aW1pemVk IFNMMlZMIHByb2dyYW1taW5nICovCj4+IMKgIMKgIMKgIHBfdGJsID0gJnBfb3NtLT5zdWJuLnBv cnRfZ3VpZF90Ymw7Cj4+IMKgIMKgIMKgIHBfbmV4dCA9IGNsX3FtYXBfaGVhZChwX3RibCk7Cj4+ IMKgIMKgIMKgIHdoaWxlIChwX25leHQgIT0gY2xfcW1hcF9lbmQocF90YmwpKSB7Cj4gLS0KPiBU byB1bnN1YnNjcmliZSBmcm9tIHRoaXMgbGlzdDogc2VuZCB0aGUgbGluZSAidW5zdWJzY3JpYmUg bGludXgtcmRtYSIgaW4KPiB0aGUgYm9keSBvZiBhIG1lc3NhZ2UgdG8gbWFqb3Jkb21vQHZnZXIu a2VybmVsLm9yZwo+IE1vcmUgbWFqb3Jkb21vIGluZm8gYXQgwqBodHRwOi8vdmdlci5rZXJuZWwu b3JnL21ham9yZG9tby1pbmZvLmh0bWwKPgo=
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#48 lore raw
In reply to a message not in the archive
Quoted 6 lines · Hal Rosenstock

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.

Rebased and Applied. Thanks.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html