Fix dropping node after setPkey mad
PATCH 1/1 Fix dropping node after setPkey mad
From: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/[email protected]>
Need to check pkey received counter flag only
after get mads and not set.
--- include/opensm/osm_port.h | 3 ++- opensm/osm_pkey_rcv.c | 3 ++- opensm/osm_port.c | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-)
include/opensm/osm_port.h +2 -1
@@ -558,7 +558,8 @@ void osm_physp_set_port_info(IN osm_physp_t * p_physp, void osm_physp_set_pkey_tbl(IN osm_log_t * p_log, IN const osm_subn_t * p_subn, IN osm_physp_t * p_physp, IN ib_pkey_table_t * p_pkey_tbl, - IN uint16_t block_num); + IN uint16_t block_num, + IN boolean_t is_set);/* * PARAMETERS * p_log
opensm/osm_pkey_rcv.c +2 -1
@@ -186,7 +186,8 @@ void osm_pkey_rcv_process(IN void *context, IN void *data) p_pkey_tbl, FILE_ID, OSM_LOG_DEBUG);osm_physp_set_pkey_tbl (sm->p_log, sm->p_subn, - p_physp, p_pkey_tbl, block_num); + p_physp, p_pkey_tbl, block_num, + p_context->set_method); Exit:cl_plock_release (sm->p_lock);
opensm/osm_port.c +4 -2
@@ -646,7 +646,8 @@ boolean_t osm_link_is_healthy(IN const osm_physp_t * p_physp) void osm_physp_set_pkey_tbl(IN osm_log_t * p_log, IN const osm_subn_t * p_subn, IN osm_physp_t * p_physp, IN ib_pkey_table_t * p_pkey_tbl, - IN uint16_t block_num) + IN uint16_t block_num, + IN boolean_t is_set) {uint16_t max_blocks;
@@ -687,7 +688,8 @@ void osm_physp_set_pkey_tbl(IN osm_log_t * p_log, IN const osm_subn_t * p_subn, }/* decrement block received counter */ - p_physp->pkeys.rcv_blocks_cnt--; +if (!is_set) + p_physp->pkeys.rcv_blocks_cnt--;osm_pkey_tbl_set (&p_physp->pkeys, block_num, p_pkey_tbl, p_subn->opt.allow_both_pkeys); }
Signature · 6 lines
1.7.8.2 -- 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