Lines Matching defs:sm

62  Return TRUE if the remote sm given (by ib_sm_info_t) is higher,
68 __osm_sminfo_rcv_remote_sm_is_higher(IN osm_sm_t * sm,
73 sm->p_subn->opt.sm_priority,
74 sm->p_subn->sm_port_guid));
81 __osm_sminfo_rcv_process_get_request(IN osm_sm_t * sm,
90 OSM_LOG_ENTER(sm->p_log);
101 p_smi->guid = sm->p_subn->sm_port_guid;
102 p_smi->act_count = cl_hton32(sm->p_subn->p_osm->stats.qp0_mads_sent);
103 p_smi->pri_state = (uint8_t) (sm->p_subn->sm_state |
104 sm->p_subn->opt.sm_priority << 4);
111 OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
113 p_smi->sm_key = sm->p_subn->opt.sm_key;
116 OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
121 status = osm_resp_send(sm, p_madw, 0, payload);
123 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F02: "
130 OSM_LOG_EXIT(sm->p_log);
167 __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
178 OSM_LOG_ENTER(sm->p_log);
188 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F03: "
193 CL_PLOCK_EXCL_ACQUIRE(sm->p_lock);
195 p_smi->guid = sm->p_subn->sm_port_guid;
196 p_smi->act_count = cl_hton32(sm->p_subn->p_osm->stats.qp0_mads_sent);
197 p_smi->pri_state = (uint8_t) (sm->p_subn->sm_state |
198 sm->p_subn->opt.sm_priority << 4);
205 OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
207 p_smi->sm_key = sm->p_subn->opt.sm_key;
210 OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
218 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F04: "
222 status = osm_resp_send(sm, p_madw, 7, payload);
224 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F05: "
227 CL_PLOCK_RELEASE(sm->p_lock);
253 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F06: "
255 CL_PLOCK_RELEASE(sm->p_lock);
260 status = osm_sm_state_mgr_check_legality(sm, sm_signal);
262 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F07: "
266 status = osm_resp_send(sm, p_madw, 7, payload);
268 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F08: "
271 CL_PLOCK_RELEASE(sm->p_lock);
276 status = osm_resp_send(sm, p_madw, 0, payload);
278 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F09: "
284 /* if the AttributeModifier is STANDBY - need to save on the sm in */
287 OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
291 sm->master_sm_guid = sm_smi->guid;
294 CL_PLOCK_RELEASE(sm->p_lock);
295 status = osm_sm_state_mgr_process(sm, sm_signal);
298 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F10: "
303 OSM_LOG_EXIT(sm->p_log);
309 __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
315 OSM_LOG_ENTER(sm->p_log);
319 OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
324 switch (sm->p_subn->sm_state) {
333 sm->master_sm_found = 1;
334 /* save on the sm the guid of the current master. */
335 OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
338 sm->master_sm_guid = p_sm->p_port->guid;
342 if (__osm_sminfo_rcv_remote_sm_is_higher(sm, p_smi)
344 /* the remote is a higher sm - need to stop sweeping */
345 sm->master_sm_found = 1;
346 /* save on the sm the guid of the higher SM we found - */
348 OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
352 sm->master_sm_guid = p_sm->p_port->guid;
367 osm_sm_state_mgr_signal_master_is_alive(sm);
370 /* This should be the response from the sm we are polling. */
372 if (sm->master_sm_guid == p_sm->p_port->guid) {
378 (sm, p_smi) == TRUE)
379 osm_sm_state_mgr_signal_master_is_alive(sm);
394 if (sm->p_polling_sm)
395 osm_sm_state_mgr_signal_master_is_alive(sm);
404 __osm_sminfo_rcv_remote_sm_is_higher(sm, p_smi))
405 sm->p_subn->force_heavy_sweep = TRUE;
417 OSM_LOG_EXIT(sm->p_log);
424 __osm_sminfo_rcv_process_get_response(IN osm_sm_t * sm,
434 OSM_LOG_ENTER(sm->p_log);
441 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F11: "
447 p_sm_tbl = &sm->p_subn->sm_guid_tbl;
450 osm_dump_sm_info(sm->p_log, p_smi, OSM_LOG_DEBUG);
454 if (p_smi->sm_key != 0 && p_smi->sm_key != sm->p_subn->opt.sm_key) {
455 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F18: "
458 osm_log(sm->p_log, OSM_LOG_SYS,
465 CL_PLOCK_EXCL_ACQUIRE(sm->p_lock);
467 p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
469 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F12: "
475 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F13: "
483 if (port_guid == sm->p_subn->sm_port_guid) {
484 OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
494 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F14: "
506 __osm_sminfo_rcv_process_get_sm(sm, p_sm,
510 CL_PLOCK_RELEASE(sm->p_lock);
513 OSM_LOG_EXIT(sm->p_log);
519 __osm_sminfo_rcv_process_set_response(IN osm_sm_t * sm,
525 OSM_LOG_ENTER(sm->p_log);
532 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F16: "
538 osm_dump_sm_info(sm->p_log, p_smi, OSM_LOG_DEBUG);
542 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F17: "
551 OSM_LOG_EXIT(sm->p_log);
558 osm_sm_t *sm = context;
563 OSM_LOG_ENTER(sm->p_log);
580 OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F19: "
591 __osm_sminfo_rcv_process_get_response(sm, p_madw);
594 __osm_sminfo_rcv_process_set_response(sm, p_madw);
597 __osm_sminfo_rcv_process_get_request(sm, p_madw);
600 __osm_sminfo_rcv_process_set_request(sm, p_madw);
603 OSM_LOG_EXIT(sm->p_log);