2 * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved.
3 * Copyright (c) 2002-2011 Mellanox Technologies LTD. All rights reserved.
4 * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
5 * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU
9 * General Public License (GPL) Version 2, available from the file
10 * COPYING in the main directory of this source tree, or the
11 * OpenIB.org BSD license below:
13 * Redistribution and use in source and binary forms, with or
14 * without modification, are permitted provided that the following
17 * - Redistributions of source code must retain the above
18 * copyright notice, this list of conditions and the following
21 * - Redistributions in binary form must reproduce the above
22 * copyright notice, this list of conditions and the following
23 * disclaimer in the documentation and/or other materials
24 * provided with the distribution.
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
30 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
31 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39 * Implementation of osm_pir_rcv_t.
40 * This object represents the PortInfoRecord Receiver object.
41 * This object is part of the opensm family of objects.
46 #endif /* HAVE_CONFIG_H */
49 #include <iba/ib_types.h>
50 #include <complib/cl_qmap.h>
51 #include <complib/cl_passivelock.h>
52 #include <complib/cl_debug.h>
53 #include <complib/cl_qlist.h>
54 #include <opensm/osm_file_ids.h>
55 #define FILE_ID OSM_FILE_SA_PORTINFO_RECORD_C
56 #include <vendor/osm_vendor_api.h>
57 #include <opensm/osm_port.h>
58 #include <opensm/osm_node.h>
59 #include <opensm/osm_switch.h>
60 #include <opensm/osm_helper.h>
61 #include <opensm/osm_pkey.h>
62 #include <opensm/osm_sa.h>
64 #define SA_PIR_RESP_SIZE SA_ITEM_RESP_SIZE(port_rec)
66 typedef struct osm_pir_search_ctxt {
67 const ib_portinfo_record_t *p_rcvd_rec;
71 const osm_physp_t *p_req_physp;
72 boolean_t is_enhanced_comp_mask;
73 } osm_pir_search_ctxt_t;
75 static ib_api_status_t pir_rcv_new_pir(IN osm_sa_t * sa,
76 IN const osm_physp_t * p_physp,
77 IN osm_pir_search_ctxt_t * p_ctxt,
78 IN ib_net16_t const lid)
80 osm_sa_item_t *p_rec_item;
82 osm_physp_t *p_physp0;
83 ib_api_status_t status = IB_SUCCESS;
85 OSM_LOG_ENTER(sa->p_log);
87 p_rec_item = malloc(SA_PIR_RESP_SIZE);
88 if (p_rec_item == NULL) {
89 OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2102: "
90 "rec_item alloc failed\n");
91 status = IB_INSUFFICIENT_RESOURCES;
95 OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
96 "New PortInfoRecord: port 0x%016" PRIx64
97 ", lid %u, port %u\n",
98 cl_ntoh64(osm_physp_get_port_guid(p_physp)),
99 cl_ntoh16(lid), osm_physp_get_port_num(p_physp));
101 memset(p_rec_item, 0, SA_PIR_RESP_SIZE);
103 p_rec_item->resp.port_rec.lid = lid;
104 p_rec_item->resp.port_rec.port_info = p_physp->port_info;
105 if (p_ctxt->comp_mask & IB_PIR_COMPMASK_OPTIONS)
106 p_rec_item->resp.port_rec.options = p_ctxt->p_rcvd_rec->options;
107 if ((p_ctxt->comp_mask & IB_PIR_COMPMASK_OPTIONS) == 0 ||
108 (p_ctxt->p_rcvd_rec->options & 0x80) == 0) {
109 /* Does requested port have an extended link speed active ? */
110 if (osm_node_get_type(p_physp->p_node) ==
111 IB_NODE_TYPE_SWITCH) {
112 p_physp0 = osm_node_get_physp_ptr(p_physp->p_node, 0);
113 p_pi = &p_physp0->port_info;
115 p_pi = (ib_port_info_t *) &p_physp->port_info;
116 if ((p_pi->capability_mask & IB_PORT_CAP_HAS_EXT_SPEEDS) > 0) {
117 if (ib_port_info_get_link_speed_ext_active(&p_physp->port_info)) {
118 /* Add QDR bits to original link speed components */
119 p_pi = &p_rec_item->resp.port_rec.port_info;
120 ib_port_info_set_link_speed_enabled(p_pi,
121 ib_port_info_get_link_speed_enabled(p_pi) | IB_LINK_SPEED_ACTIVE_10);
123 (uint8_t) ((p_pi->state_info1 & IB_PORT_STATE_MASK) |
124 (ib_port_info_get_link_speed_sup(p_pi) | IB_LINK_SPEED_ACTIVE_10) << IB_PORT_LINK_SPEED_SHIFT);
126 (uint8_t) ((p_pi->link_speed & IB_PORT_LINK_SPEED_ENABLED_MASK) |
127 (ib_port_info_get_link_speed_active(p_pi) | IB_LINK_SPEED_ACTIVE_10) << IB_PORT_LINK_SPEED_SHIFT);
131 p_rec_item->resp.port_rec.port_num = osm_physp_get_port_num(p_physp);
133 cl_qlist_insert_tail(p_ctxt->p_list, &p_rec_item->list_item);
136 OSM_LOG_EXIT(sa->p_log);
140 static void sa_pir_create(IN osm_sa_t * sa, IN const osm_physp_t * p_physp,
141 IN osm_pir_search_ctxt_t * p_ctxt)
145 uint16_t base_lid_ho;
146 uint16_t match_lid_ho;
147 osm_physp_t *p_node_physp;
149 OSM_LOG_ENTER(sa->p_log);
151 if (p_physp->p_node->sw) {
152 p_node_physp = osm_node_get_physp_ptr(p_physp->p_node, 0);
153 base_lid_ho = cl_ntoh16(osm_physp_get_base_lid(p_node_physp));
155 osm_switch_sp0_is_lmc_capable(p_physp->p_node->sw,
157 osm_physp_get_lmc(p_node_physp) : 0;
159 lmc = osm_physp_get_lmc(p_physp);
160 base_lid_ho = cl_ntoh16(osm_physp_get_base_lid(p_physp));
162 max_lid_ho = (uint16_t) (base_lid_ho + (1 << lmc) - 1);
164 if (p_ctxt->comp_mask & IB_PIR_COMPMASK_LID) {
165 match_lid_ho = cl_ntoh16(p_ctxt->p_rcvd_rec->lid);
168 We validate that the lid belongs to this node.
170 OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
171 "Comparing LID: %u <= %u <= %u\n",
172 base_lid_ho, match_lid_ho, max_lid_ho);
174 if (match_lid_ho < base_lid_ho || match_lid_ho > max_lid_ho)
178 pir_rcv_new_pir(sa, p_physp, p_ctxt, cl_hton16(base_lid_ho));
181 OSM_LOG_EXIT(sa->p_log);
184 static void sa_pir_check_physp(IN osm_sa_t * sa, IN const osm_physp_t * p_physp,
185 osm_pir_search_ctxt_t * p_ctxt)
187 const ib_portinfo_record_t *p_rcvd_rec;
188 ib_net64_t comp_mask;
189 const ib_port_info_t *p_comp_pi;
190 const ib_port_info_t *p_pi;
191 const osm_physp_t * p_physp0;
194 OSM_LOG_ENTER(sa->p_log);
196 p_rcvd_rec = p_ctxt->p_rcvd_rec;
197 comp_mask = p_ctxt->comp_mask;
198 p_comp_pi = &p_rcvd_rec->port_info;
199 p_pi = &p_physp->port_info;
201 osm_dump_port_info_v2(sa->p_log, osm_node_get_node_guid(p_physp->p_node),
202 p_physp->port_guid, p_physp->port_num,
203 &p_physp->port_info, FILE_ID, OSM_LOG_DEBUG);
205 /* We have to re-check the base_lid, since if the given
206 base_lid in p_pi is zero - we are comparing on all ports. */
207 if (comp_mask & IB_PIR_COMPMASK_BASELID) {
208 if (p_comp_pi->base_lid != p_pi->base_lid)
211 if (comp_mask & IB_PIR_COMPMASK_MKEY) {
212 if (p_comp_pi->m_key != p_pi->m_key)
215 if (comp_mask & IB_PIR_COMPMASK_GIDPRE) {
216 if (p_comp_pi->subnet_prefix != p_pi->subnet_prefix)
219 if (comp_mask & IB_PIR_COMPMASK_SMLID) {
220 if (p_comp_pi->master_sm_base_lid != p_pi->master_sm_base_lid)
224 /* IBTA 1.2 errata provides support for bitwise compare if the bit 31
225 of the attribute modifier of the Get/GetTable is set */
226 if (comp_mask & IB_PIR_COMPMASK_CAPMASK) {
227 if (p_ctxt->is_enhanced_comp_mask) {
228 if ((p_comp_pi->capability_mask & p_pi->
229 capability_mask) != p_comp_pi->capability_mask)
232 if (p_comp_pi->capability_mask != p_pi->capability_mask)
237 if (comp_mask & IB_PIR_COMPMASK_DIAGCODE) {
238 if (p_comp_pi->diag_code != p_pi->diag_code)
241 if (comp_mask & IB_PIR_COMPMASK_MKEYLEASEPRD) {
242 if (p_comp_pi->m_key_lease_period != p_pi->m_key_lease_period)
245 if (comp_mask & IB_PIR_COMPMASK_LOCALPORTNUM) {
246 if (p_comp_pi->local_port_num != p_pi->local_port_num)
249 if (comp_mask & IB_PIR_COMPMASK_LNKWIDTHSUPPORT) {
250 if (p_comp_pi->link_width_supported !=
251 p_pi->link_width_supported)
254 if (comp_mask & IB_PIR_COMPMASK_LNKWIDTHACTIVE) {
255 if (p_comp_pi->link_width_active != p_pi->link_width_active)
258 if (comp_mask & IB_PIR_COMPMASK_LINKWIDTHENABLED) {
259 if (p_comp_pi->link_width_enabled != p_pi->link_width_enabled)
262 if (comp_mask & IB_PIR_COMPMASK_LNKSPEEDSUPPORT) {
263 if (ib_port_info_get_link_speed_sup(p_comp_pi) !=
264 ib_port_info_get_link_speed_sup(p_pi))
267 if (comp_mask & IB_PIR_COMPMASK_PORTSTATE) {
268 if (ib_port_info_get_port_state(p_comp_pi) !=
269 ib_port_info_get_port_state(p_pi))
272 if (comp_mask & IB_PIR_COMPMASK_PORTPHYSTATE) {
273 if (ib_port_info_get_port_phys_state(p_comp_pi) !=
274 ib_port_info_get_port_phys_state(p_pi))
277 if (comp_mask & IB_PIR_COMPMASK_LINKDWNDFLTSTATE) {
278 if (ib_port_info_get_link_down_def_state(p_comp_pi) !=
279 ib_port_info_get_link_down_def_state(p_pi))
282 if (comp_mask & IB_PIR_COMPMASK_MKEYPROTBITS) {
283 if (ib_port_info_get_mpb(p_comp_pi) !=
284 ib_port_info_get_mpb(p_pi))
287 if (comp_mask & IB_PIR_COMPMASK_LMC) {
288 if (ib_port_info_get_lmc(p_comp_pi) !=
289 ib_port_info_get_lmc(p_pi))
292 if (comp_mask & IB_PIR_COMPMASK_LINKSPEEDACTIVE) {
293 if (ib_port_info_get_link_speed_active(p_comp_pi) !=
294 ib_port_info_get_link_speed_active(p_pi))
297 if (comp_mask & IB_PIR_COMPMASK_LINKSPEEDENABLE) {
298 if (ib_port_info_get_link_speed_enabled(p_comp_pi) !=
299 ib_port_info_get_link_speed_enabled(p_pi))
302 if (comp_mask & IB_PIR_COMPMASK_NEIGHBORMTU) {
303 if (ib_port_info_get_neighbor_mtu(p_comp_pi) !=
304 ib_port_info_get_neighbor_mtu(p_pi))
307 if (comp_mask & IB_PIR_COMPMASK_MASTERSMSL) {
308 if (ib_port_info_get_master_smsl(p_comp_pi) !=
309 ib_port_info_get_master_smsl(p_pi))
312 if (comp_mask & IB_PIR_COMPMASK_VLCAP) {
313 if (ib_port_info_get_vl_cap(p_comp_pi) !=
314 ib_port_info_get_vl_cap(p_pi))
317 if (comp_mask & IB_PIR_COMPMASK_INITTYPE) {
318 if (ib_port_info_get_init_type(p_comp_pi) !=
319 ib_port_info_get_init_type(p_pi))
322 if (comp_mask & IB_PIR_COMPMASK_VLHIGHLIMIT) {
323 if (p_comp_pi->vl_high_limit != p_pi->vl_high_limit)
326 if (comp_mask & IB_PIR_COMPMASK_VLARBHIGHCAP) {
327 if (p_comp_pi->vl_arb_high_cap != p_pi->vl_arb_high_cap)
330 if (comp_mask & IB_PIR_COMPMASK_VLARBLOWCAP) {
331 if (p_comp_pi->vl_arb_low_cap != p_pi->vl_arb_low_cap)
334 if (comp_mask & IB_PIR_COMPMASK_MTUCAP) {
335 if (ib_port_info_get_mtu_cap(p_comp_pi) !=
336 ib_port_info_get_mtu_cap(p_pi))
339 if (comp_mask & IB_PIR_COMPMASK_VLSTALLCNT) {
340 if (ib_port_info_get_vl_stall_count(p_comp_pi) !=
341 ib_port_info_get_vl_stall_count(p_pi))
344 if (comp_mask & IB_PIR_COMPMASK_HOQLIFE) {
345 if ((p_comp_pi->vl_stall_life & 0x1F) !=
346 (p_pi->vl_stall_life & 0x1F))
349 if (comp_mask & IB_PIR_COMPMASK_OPVLS) {
350 if ((p_comp_pi->vl_enforce & 0xF0) != (p_pi->vl_enforce & 0xF0))
353 if (comp_mask & IB_PIR_COMPMASK_PARENFIN) {
354 if ((p_comp_pi->vl_enforce & 0x08) != (p_pi->vl_enforce & 0x08))
357 if (comp_mask & IB_PIR_COMPMASK_PARENFOUT) {
358 if ((p_comp_pi->vl_enforce & 0x04) != (p_pi->vl_enforce & 0x04))
361 if (comp_mask & IB_PIR_COMPMASK_FILTERRAWIN) {
362 if ((p_comp_pi->vl_enforce & 0x02) != (p_pi->vl_enforce & 0x02))
365 if (comp_mask & IB_PIR_COMPMASK_FILTERRAWOUT) {
366 if ((p_comp_pi->vl_enforce & 0x01) != (p_pi->vl_enforce & 0x01))
369 if (comp_mask & IB_PIR_COMPMASK_MKEYVIO) {
370 if (p_comp_pi->m_key_violations != p_pi->m_key_violations)
373 if (comp_mask & IB_PIR_COMPMASK_PKEYVIO) {
374 if (p_comp_pi->p_key_violations != p_pi->p_key_violations)
377 if (comp_mask & IB_PIR_COMPMASK_QKEYVIO) {
378 if (p_comp_pi->q_key_violations != p_pi->q_key_violations)
381 if (comp_mask & IB_PIR_COMPMASK_GUIDCAP) {
382 if (p_comp_pi->guid_cap != p_pi->guid_cap)
385 if (comp_mask & IB_PIR_COMPMASK_SUBNTO) {
386 if (ib_port_info_get_timeout(p_comp_pi) !=
387 ib_port_info_get_timeout(p_pi))
390 if (comp_mask & IB_PIR_COMPMASK_RESPTIME) {
391 if ((p_comp_pi->resp_time_value & 0x1F) !=
392 (p_pi->resp_time_value & 0x1F))
395 if (comp_mask & IB_PIR_COMPMASK_LOCALPHYERR) {
396 if (ib_port_info_get_local_phy_err_thd(p_comp_pi) !=
397 ib_port_info_get_local_phy_err_thd(p_pi))
400 if (comp_mask & IB_PIR_COMPMASK_OVERRUNERR) {
401 if (ib_port_info_get_overrun_err_thd(p_comp_pi) !=
402 ib_port_info_get_overrun_err_thd(p_pi))
406 /* IBTA 1.2 errata provides support for bitwise compare if the bit 31
407 of the attribute modifier of the Get/GetTable is set */
408 if (comp_mask & IB_PIR_COMPMASK_CAPMASK2) {
409 if (p_ctxt->is_enhanced_comp_mask) {
410 if ((cl_ntoh16(p_comp_pi->capability_mask2) &
411 cl_ntoh16(p_pi->capability_mask2)) !=
412 cl_ntoh16(p_comp_pi->capability_mask2))
415 if (cl_ntoh16(p_comp_pi->capability_mask2) !=
416 cl_ntoh16(p_pi->capability_mask2))
420 if (osm_node_get_type(p_physp->p_node) == IB_NODE_TYPE_SWITCH) {
421 p_physp0 = osm_node_get_physp_ptr(p_physp->p_node, 0);
422 cap_mask = p_physp0->port_info.capability_mask;
424 cap_mask = p_pi->capability_mask;
425 if (comp_mask & IB_PIR_COMPMASK_LINKSPDEXTACT) {
426 if (((cap_mask & IB_PORT_CAP_HAS_EXT_SPEEDS) > 0) &&
427 (ib_port_info_get_link_speed_ext_active(p_comp_pi) !=
428 ib_port_info_get_link_speed_ext_active(p_pi)))
431 if (comp_mask & IB_PIR_COMPMASK_LINKSPDEXTSUPP) {
432 if (((cap_mask & IB_PORT_CAP_HAS_EXT_SPEEDS) > 0) &&
433 (ib_port_info_get_link_speed_ext_sup(p_comp_pi) !=
434 ib_port_info_get_link_speed_ext_sup(p_pi)))
437 if (comp_mask & IB_PIR_COMPMASK_LINKSPDEXTENAB) {
438 if (((cap_mask & IB_PORT_CAP_HAS_EXT_SPEEDS) > 0) &&
439 (ib_port_info_get_link_speed_ext_enabled(p_comp_pi) !=
440 ib_port_info_get_link_speed_ext_enabled(p_pi)))
443 sa_pir_create(sa, p_physp, p_ctxt);
446 OSM_LOG_EXIT(sa->p_log);
449 static void sa_pir_by_comp_mask(IN osm_sa_t * sa, IN osm_node_t * p_node,
450 osm_pir_search_ctxt_t * p_ctxt)
452 const ib_portinfo_record_t *p_rcvd_rec;
453 ib_net64_t comp_mask;
454 const osm_physp_t *p_physp;
457 const osm_physp_t *p_req_physp;
459 OSM_LOG_ENTER(sa->p_log);
461 p_rcvd_rec = p_ctxt->p_rcvd_rec;
462 comp_mask = p_ctxt->comp_mask;
463 p_req_physp = p_ctxt->p_req_physp;
465 num_ports = osm_node_get_num_physp(p_node);
467 if (comp_mask & IB_PIR_COMPMASK_PORTNUM) {
468 if (p_rcvd_rec->port_num < num_ports) {
470 osm_node_get_physp_ptr(p_node,
471 p_rcvd_rec->port_num);
472 /* Check that the p_physp is valid, and that the
473 p_physp and the p_req_physp share a pkey. */
475 osm_physp_share_pkey(sa->p_log, p_req_physp, p_physp,
476 sa->p_subn->opt.allow_both_pkeys))
477 sa_pir_check_physp(sa, p_physp, p_ctxt);
480 for (port_num = 0; port_num < num_ports; port_num++) {
481 p_physp = osm_node_get_physp_ptr(p_node, port_num);
485 /* if the requester and the p_physp don't share a pkey -
487 if (!osm_physp_share_pkey(sa->p_log, p_req_physp, p_physp,
488 sa->p_subn->opt.allow_both_pkeys))
491 sa_pir_check_physp(sa, p_physp, p_ctxt);
495 OSM_LOG_EXIT(sa->p_log);
498 static void sa_pir_by_comp_mask_cb(IN cl_map_item_t * p_map_item, IN void *cxt)
500 osm_node_t *p_node = (osm_node_t *) p_map_item;
501 osm_pir_search_ctxt_t *p_ctxt = cxt;
503 sa_pir_by_comp_mask(p_ctxt->sa, p_node, p_ctxt);
506 void osm_pir_rcv_process(IN void *ctx, IN void *data)
509 osm_madw_t *p_madw = data;
510 const ib_sa_mad_t *p_rcvd_mad;
511 const ib_portinfo_record_t *p_rcvd_rec;
512 const osm_port_t *p_port = NULL;
514 osm_pir_search_ctxt_t context;
515 ib_net64_t comp_mask;
516 osm_physp_t *p_req_physp;
520 OSM_LOG_ENTER(sa->p_log);
524 p_rcvd_mad = osm_madw_get_sa_mad_ptr(p_madw);
526 (ib_portinfo_record_t *) ib_sa_mad_get_payload_ptr(p_rcvd_mad);
527 comp_mask = p_rcvd_mad->comp_mask;
529 CL_ASSERT(p_rcvd_mad->attr_id == IB_MAD_ATTR_PORTINFO_RECORD);
531 /* we only support SubnAdmGet and SubnAdmGetTable methods */
532 if (p_rcvd_mad->method != IB_MAD_METHOD_GET &&
533 p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE) {
534 OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2105: "
535 "Unsupported Method (%s) for PortInfoRecord request\n",
536 ib_get_sa_method_str(p_rcvd_mad->method));
537 osm_sa_send_error(sa, p_madw, IB_MAD_STATUS_UNSUP_METHOD_ATTR);
541 cl_plock_acquire(sa->p_lock);
543 /* update the requester physical port */
544 p_req_physp = osm_get_physp_by_mad_addr(sa->p_log, sa->p_subn,
545 osm_madw_get_mad_addr_ptr
547 if (p_req_physp == NULL) {
548 cl_plock_release(sa->p_lock);
549 OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2104: "
550 "Cannot find requester physical port\n");
554 if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) {
555 OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
556 "Requester port GUID 0x%" PRIx64 "\n",
557 cl_ntoh64(osm_physp_get_port_guid(p_req_physp)));
558 osm_dump_portinfo_record_v2(sa->p_log, p_rcvd_rec, FILE_ID, OSM_LOG_DEBUG);
561 cl_qlist_init(&rec_list);
563 context.p_rcvd_rec = p_rcvd_rec;
564 context.p_list = &rec_list;
565 context.comp_mask = p_rcvd_mad->comp_mask;
567 context.p_req_physp = p_req_physp;
568 context.is_enhanced_comp_mask =
569 cl_ntoh32(p_rcvd_mad->attr_mod) & (1 << 31);
572 If the user specified a LID, it obviously narrows our
573 work load, since we don't have to search every port
575 if (comp_mask & (IB_PIR_COMPMASK_LID | IB_PIR_COMPMASK_BASELID)) {
576 p_port = osm_get_port_by_lid(sa->p_subn, p_rcvd_rec->lid);
578 sa_pir_by_comp_mask(sa, p_port->p_node, &context);
580 OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2109: "
581 "No port found with requested LID %u\n",
582 cl_ntoh16(p_rcvd_rec->lid));
584 cl_qmap_apply_func(&sa->p_subn->node_guid_tbl,
585 sa_pir_by_comp_mask_cb, &context);
587 cl_plock_release(sa->p_lock);
590 p922 - The M_Key returned shall be zero, except in the case of a
592 Note: In the mad controller we check that the SM_Key received on
593 the mad is valid. Meaning - is either zero or equal to the local
596 if (!p_rcvd_mad->sm_key) {
598 for (item = (osm_sa_item_t *) cl_qlist_head(&rec_list);
599 item != (osm_sa_item_t *) cl_qlist_end(&rec_list);
600 item = (osm_sa_item_t *) cl_qlist_next(&item->list_item))
601 item->resp.port_rec.port_info.m_key = 0;
604 osm_sa_respond(sa, p_madw, sizeof(ib_portinfo_record_t), &rec_list);
607 OSM_LOG_EXIT(sa->p_log);