opensm: Fix PathRecord reply to be the same for allow_both_pkeys ON and OFF
PATCH 1/1 opensm: Fix PathRecord reply to be the same for allow_both_pkeys ON and OFF
--- opensm/osm_pkey.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-)
opensm/osm_pkey.c +11 -2
@@ -335,12 +335,21 @@ boolean_t osm_physp_share_this_pkey(IN const osm_physp_t * p_physp1, IN boolean_t allow_both_pkeys) {ib_net16_t *pkey1, *pkey2; +ib_net16_t full_pkey, limited_pkey;if (allow_both_pkeys) { + full_pkey = pkey |IB_PKEY_TYPE_MASK ; + limited_pkey = pkey & ~IB_PKEY_TYPE_MASK ; pkey1 =cl_map_get (&(osm_physp_get_pkey_tbl (p_physp1))->keys, - pkey); + full_pkey); +if (!pkey1) + pkey1 =cl_map_get (&(osm_physp_get_pkey_tbl (p_physp1))->keys, + limited_pkey); pkey2 =cl_map_get (&(osm_physp_get_pkey_tbl (p_physp2))->keys, - pkey); + full_pkey); +if (!pkey2) + pkey2 =cl_map_get (&(osm_physp_get_pkey_tbl (p_physp2))->keys, + limited_pkey); }else { pkey1 =cl_map_get (&(osm_physp_get_pkey_tbl (p_physp1))->keys,ib_pkey_get_base (pkey));
Signature · 7 lines
1.7.7.6 -- Alex -- 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