diff mbox

[13/27] Fix pre-creation of MC group with MGID containing P_Key

Message ID 1343750695-28063-13-git-send-email-alexne@mellanox.com (mailing list archive)
State Accepted
Delegated to: Alex Netes
Headers show

Commit Message

Alex Netes July 31, 2012, 4:04 p.m. UTC
IPoIB MGID can contain only full P_Key.

Signed-off-by: Alex Netes <alexne@mellanox.com>
---
 opensm/osm_prtn_config.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/opensm/osm_prtn_config.c b/opensm/osm_prtn_config.c
index 750cbe0..8714eba 100644
--- a/opensm/osm_prtn_config.c
+++ b/opensm/osm_prtn_config.c
@@ -129,8 +129,10 @@  static inline boolean_t ip_mgroup_pkey_ok(struct part_conf *conf,
 	char gid_str[INET6_ADDRSTRLEN];
 
 	if (mgid_is_broadcast(&group->mgid)
-	    || mpkey == 0x0000 /* user requested "wild card" of pkey */
-	    || mpkey == conf->p_prtn->pkey) /* user was smart enough to match */
+	    /* user requested "wild card" of pkey */
+	    || mpkey == 0x0000
+	    /* user was smart enough to match */
+	    || mpkey == (conf->p_prtn->pkey | cl_hton16(0x8000)))
 		return (TRUE);
 
 	OSM_LOG(conf->p_log, OSM_LOG_ERROR,