diff mbox

opensm/osm_qos_policy.c: Fix source & destination GUID policy check

Message ID 51251DB3.4090906@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Hal Rosenstock Feb. 20, 2013, 7:02 p.m. UTC
in __qos_policy_get_match_rule_by_params

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
---
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/opensm/osm_qos_policy.c b/opensm/osm_qos_policy.c
index 796fb89..1afc289 100644
--- a/opensm/osm_qos_policy.c
+++ b/opensm/osm_qos_policy.c
@@ -640,19 +640,19 @@  static osm_qos_match_rule_t *__qos_policy_get_match_rule_by_params(
 		 */
 		if (cl_list_count(&p_qos_match_rule->source_group_list)
 		    && cl_list_count(&p_qos_match_rule->destination_group_list)) {
-			if (!__qos_policy_is_port_in_group_list(p_qos_policy,
-								p_src_physp,
-								&p_qos_match_rule->
-								source_group_list)
-			    && !__qos_policy_is_port_in_group_list(p_qos_policy,
-								   p_dest_physp,
-								   &p_qos_match_rule->
-								   destination_group_list))
-			{
+			if (__qos_policy_is_port_in_group_list(p_qos_policy,
+							       p_src_physp,
+							       &p_qos_match_rule->
+							       source_group_list)
+			    && __qos_policy_is_port_in_group_list(p_qos_policy,
+								  p_dest_physp,
+								  &p_qos_match_rule->
+								  destination_group_list))
+				matched_by_sordguid = TRUE;
+			else {
 				list_iterator = cl_list_next(list_iterator);
 				continue;
 			}
-			matched_by_sordguid = TRUE;
 		}
 
 		/* If a match rule has QoS classes, PR request HAS