Codebase list opensm / 8b37100
New upstream release. Debian Janitor 2 years ago
20 changed file(s) with 289 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
238238 CL_ASSERT(p_heap);
239239 CL_ASSERT(cl_is_heap_inited(p_heap));
240240
241 if (index < 0 || index >= p_heap->size)
241 if (index >= p_heap->size)
242242 return (CL_INVALID_PARAMETER);
243243
244244 old_key = p_heap->element_array[index].key;
285285
286286 if (!p_heap->size)
287287 return NULL;
288 if (index < 0 || index >= p_heap->size)
288 if (index >= p_heap->size)
289289 return NULL;
290290 if (p_heap->size == 1)
291291 return p_heap->element_array[--(p_heap->size)].context;
332332 CL_ASSERT(p_heap);
333333 CL_ASSERT(cl_is_heap_inited(p_heap));
334334
335 return ((index < 0 || index >= p_heap->size ||
335 return ((index >= p_heap->size ||
336336 p_heap->element_array[index].context != ctx) ? FALSE : TRUE);
337337 }
338338
55 # API_REV - advance on any added API
66 # RUNNING_REV - advance any change to the vendor files
77 # AGE - number of backward versions the API still supports
8 LIBVERSION=5:0:0
8 LIBVERSION=5:1:0
00 dnl Process this file with autoconf to produce a configure script.
11
22 AC_PREREQ(2.57)
3 AC_INIT(opensm, 3.3.23, linux-rdma@vger.kernel.org)
3 AC_INIT(opensm, 3.3.24, linux-rdma@vger.kernel.org)
44 AC_CONFIG_SRCDIR([opensm/osm_opensm.c])
55 AC_CONFIG_AUX_DIR(config)
66 AC_CONFIG_MACRO_DIR(config)
0 opensm (3.3.24-1) UNRELEASED; urgency=low
1
2 * New upstream release.
3
4 -- Debian Janitor <janitor@jelmer.uk> Thu, 22 Jul 2021 07:48:56 -0000
5
06 opensm (3.3.23-2) unstable; urgency=medium
17
28 * Team upload.
99 This document describes the contents of the OpenSM 3.3 release.
1010 OpenSM is an InfiniBand compliant Subnet Manager and Administration,
1111 and runs on top of OpenIB. The OpenSM version for this release
12 is opensm-3.3.23.
12 is opensm-3.3.24.
1313
1414 This document includes the following sections:
1515 1 This Overview section (describing new features and software
2222
2323 1.1 Major New Features
2424
25 * Support for NDR link speed
26
2527 * Support for HDR link speed and 2x link width
2628 IBTA has recently (beyond IBA 1.3) added support for HDR link speed
2729 and 2x link width.
120122
121123 1.2 Minor New Features:
122124
125 b17b4db Backward compatibility for old drivers
123126 924f030 Add support for registering an opensm plugin as a new routing engine
124127 82c3ea6 Add '--subnet_prefix' and '--dump_files_dir' options
125128 dfc383e osm_port_info_rcv.c: Optimize PKEY sending during heavy sweep
866869
867870 4.2 Other Bug Fixes
868871
872 580e6d8 Remove redundant negativity check of size_t type, which is unsigned thus non negative.
873 086c870 libopensm/osm_helper.c: Fix printing trap 256 details
874 8870b89 libopensm/osm_helper.c: Fix printing trap 259 details
875 9b3e860 osm_link_mgr.c: Fix checking if port support link width 2x
876 0a8d939 osm_sa_mcmember_record.c: Allow MCMR requests with default subnet prefix
869877 9b9ea72 Fix spelling mistake of "switches"
870878 70722b4 ib_types: Drop packed attribute where unnecessary
871879 9a7cc0d opensm.spec.in: Move COPYING back into doc
32153215 * 20: 50 Gb/sec.
32163216 * 21: 400 Gb/sec.
32173217 * 22: 600 Gb/sec.
3218 * 23 : 800 Gb/sec.
3219 * 24 : 1200 Gb/sec.
32183220 * others: reserved
32193221 *
32203222 * NOTES
47014703 #define IB_PORT_CAP2_IS_SWITCH_PORT_STATE_TBL_SUPP (CL_HTON16(0x0008))
47024704 #define IB_PORT_CAP2_IS_LINK_WIDTH_2X_SUPPORTED (CL_HTON16(0x0010))
47034705 #define IB_PORT_CAP2_IS_LINK_SPEED_HDR_SUPPORTED (CL_HTON16(0x0020))
4706 #define IB_PORT_CAP2_IS_LINK_SPEED_NDR_SUPPORTED (CL_HTON16(0x0400))
47044707
47054708 /****s* IBA Base: Types/ib_port_info_ext_t
47064709 * NAME
47204723 ib_net16_t edr_fec_mode_enable;
47214724 ib_net16_t hdr_fec_mode_sup;
47224725 ib_net16_t hdr_fec_mode_enable;
4723 uint8_t reserved[46];
4726 ib_net16_t ndr_fec_mode_sup;
4727 ib_net16_t ndr_fec_mode_enable;
4728 uint8_t reserved[42];
47244729 } ib_port_info_ext_t;
47254730 /************/
47264731
51815186 #define IB_LINK_SPEED_EXT_ACTIVE_14 1
51825187 #define IB_LINK_SPEED_EXT_ACTIVE_25 2
51835188 #define IB_LINK_SPEED_EXT_ACTIVE_50 4
5189 #define IB_LINK_SPEED_EXT_ACTIVE_100 8
51845190 #define IB_LINK_SPEED_EXT_14_25_OR_50 (IB_LINK_SPEED_EXT_ACTIVE_14 | \
51855191 IB_LINK_SPEED_EXT_ACTIVE_25 | \
51865192 IB_LINK_SPEED_EXT_ACTIVE_50)
5193 #define IB_LINK_SPEED_EXT_MAX_VALUE (IB_LINK_SPEED_EXT_ACTIVE_14 | \
5194 IB_LINK_SPEED_EXT_ACTIVE_25 | \
5195 IB_LINK_SPEED_EXT_ACTIVE_50 | \
5196 IB_LINK_SPEED_EXT_ACTIVE_100)
51875197 #define IB_LINK_SPEED_EXT_DISABLE 30
51885198 #define IB_LINK_SPEED_EXT_SET_LSES 31
51895199
52095219 #define IB_PATH_RECORD_RATE_50_GBS 20
52105220 #define IB_PATH_RECORD_RATE_400_GBS 21
52115221 #define IB_PATH_RECORD_RATE_600_GBS 22
5222 /* following v1 ver1.5 p1044 */
5223 #define IB_PATH_RECORD_RATE_800_GBS 23
5224 #define IB_PATH_RECORD_RATE_1200_GBS 24
52125225
52135226 #define IB_MIN_RATE IB_PATH_RECORD_RATE_2_5_GBS
5214 #define IB_MAX_RATE IB_PATH_RECORD_RATE_600_GBS
5215 #define IB_RATE_MAX IB_PATH_RECORD_RATE_600_GBS
5227 #define IB_MAX_RATE IB_PATH_RECORD_RATE_1200_GBS
5228 #define IB_RATE_MAX IB_PATH_RECORD_RATE_1200_GBS
52165229
52175230 static inline uint8_t OSM_API
52185231 ib_port_info_get_link_speed_ext_active(IN const ib_port_info_t * const p_pi);
53125325
53135326 default:
53145327 rate = IB_PATH_RECORD_RATE_50_GBS;
5328 break;
5329 }
5330 break;
5331 case IB_LINK_SPEED_EXT_ACTIVE_100:
5332 switch (p_pi->link_width_active) {
5333 case IB_LINK_WIDTH_ACTIVE_1X:
5334 rate = IB_PATH_RECORD_RATE_100_GBS;
5335 break;
5336
5337 case IB_LINK_WIDTH_ACTIVE_4X:
5338 rate = IB_PATH_RECORD_RATE_400_GBS;
5339 break;
5340
5341 case IB_LINK_WIDTH_ACTIVE_8X:
5342 rate = IB_PATH_RECORD_RATE_800_GBS;
5343 break;
5344
5345 case IB_LINK_WIDTH_ACTIVE_12X:
5346 rate = IB_PATH_RECORD_RATE_1200_GBS;
5347 break;
5348
5349 case IB_LINK_WIDTH_ACTIVE_2X:
5350 rate = IB_PATH_RECORD_RATE_200_GBS;
5351 break;
5352
5353 default:
5354 rate = IB_PATH_RECORD_RATE_100_GBS;
53155355 break;
53165356 }
53175357 break;
64556495 uint8_t ret = 0;
64566496 uint8_t extspeeds = (speeds >> 4);
64576497
6458 if (extspeeds & IB_LINK_SPEED_EXT_ACTIVE_50)
6498 if (extspeeds & IB_LINK_SPEED_EXT_ACTIVE_100)
6499 ret = IB_LINK_SPEED_EXT_ACTIVE_100 << 4;
6500 else if (extspeeds & IB_LINK_SPEED_EXT_ACTIVE_50)
64596501 ret = IB_LINK_SPEED_EXT_ACTIVE_50 << 4;
64606502 else if (extspeeds & IB_LINK_SPEED_EXT_ACTIVE_25)
64616503 ret = IB_LINK_SPEED_EXT_ACTIVE_25 << 4;
931931 * SYNOPSIS
932932 */
933933 #define OSM_CAP2_IS_LINK_SPEED_HDR_SUPPORTED (1 << 15)
934
935 /****d* OpenSM: OSM_CAP2_IS_LINK_SPEED_NDR_SUPPORTED
936 * Name
937 * OSM_CAP2_IS_LINK_SPEED_NDR_SUPPORTED
938 *
939 * DESCRIPTION
940 * NDR link speed supported
941 *
942 * SYNOPSIS
943 */
944 #define OSM_CAP2_IS_LINK_SPEED_NDR_SUPPORTED (1 << 17)
934945
935946 /****d* OpenSM: osm_signal_t
936947 * NAME
840840 * ib_path_rate_max_12xedr
841841 *
842842 * DESCRIPTION
843 * Function is deprecated and SHOULD NOT BE USED.
844 * Use osm_sa_limit_rate instead.
845 *
843846 * Obtains encoded rate from the set of "original" extended
844847 * SA rates (up through and including 300 Gbps - 12x EDR).
845848 *
853856 * [in] Encoded path rate.
854857 *
855858 * RETURN VALUES
859 * Function is deprecated and SHOULD NOT BE USED.
860 * Use osm_sa_limit_rate instead.
861 *
856862 * Returns an int indicating the encoded rate
857863 * with a maximum of 300 Gbps (12x EDR).
858864 * For new rates (relating to 2x and HDR), the
894900 * SEE ALSO
895901 *********/
896902
903 /****f* IBA Base: Types/ib_path_get_reduced_rate
904 * NAME
905 * ib_path_get_reduced_rate
906 *
907 * DESCRIPTION
908 * Obtains encoded rate for a reduced rate, subsequent
909 * to input maximal rate.
910 *
911 * SYNOPSIS
912 */
913 int ib_path_get_reduced_rate(IN const uint8_t rate, IN const uint8_t limit);
914 /*
915 * PARAMETERS
916 * rate
917 * [in] Encoded path rate.
918 *
919 * limit
920 * [in] Encoded maximal rate supported.
921 *
922 * RETURN VALUES
923 * Returns an int indicating reduced encoded rate supported,
924 * or minimal rate if none can be found.
925 *
926 * NOTES
927 *
928 * SEE ALSO
929 *********/
930
897931 /****f* OpenSM: Helper/sprint_uint8_arr
898932 * NAME
899933 * sprint_uint8_arr
6464 # define BEGIN_C_DECLS
6565 # define END_C_DECLS
6666 #endif /* __cplusplus */
67
68 #define SA_RATE_MAX_ENUM 63
6769
6870 BEGIN_C_DECLS
6971 /****h* OpenSM/SA
612614 IN const ib_gid_t * p_dgid,
613615 IN cl_qlist_t * p_list);
614616
617 /****f* OpenSM: SA/osm_sa_limit_rate
618 * NAME
619 * osm_sa_limit_rate
620 *
621 * DESCRIPTION
622 * Find reduced rate of input rate that does not exceed the maximal
623 * rate value of subnet.
624 *
625 * SYNOPSIS
626 */
627 uint8_t osm_sa_limit_rate(IN osm_sa_t *sa, IN const uint8_t rate);
628 /*
629 * PARAMETERS
630 * sa
631 * [in] Pointer to a SA object.
632 *
633 * rate
634 * [in] Rate to be adjusted to maximal rate value of subnet.
635 *
636 * RETURN VALUE
637 * The rate after adjusting to maximal rate, may be the same or lower.
638 *
639 * SEE ALSO
640 * SA object, osm_sa_construct, osm_sa_init
641 *********/
642
615643 END_C_DECLS
616644 #endif /* _OSM_SA_H_ */
337337 boolean_t ipoib_mcgroup_creation_validation;
338338 boolean_t mcgroup_join_validation;
339339 boolean_t use_original_extended_sa_rates_only;
340 uint8_t max_rate_enum;
340341 boolean_t use_optimized_slvl;
341342 boolean_t fsync_high_avail_files;
342343 osm_qos_options_t qos_options;
640641 * old kernels/drivers that don't understand the
641642 * new SA rates for 2x link width and/or HDR link speed (19-22).
642643 *
644 * max_rate_enum
645 * Enumeration of the maximal rate subnet supports. Option is
646 * required for subnets with old kernels/drivers that don't
647 * understand new SA rates.
648 * See also : use_original_extended_sa_rates_only.
649 *
643650 * use_optimized_slvl
644651 * Use optimized SLtoVLMappingTable programming if
645652 * device indicates it supports this.
9090 sprint_uint8_arr;
9191 ib_path_rate_max_12xedr;
9292 ib_path_rate_2x_hdr_fixups;
93 ib_path_get_reduced_rate;
9394 local: *;
9495 };
55 # API_REV - advance on any added API
66 # RUNNING_REV - advance any change to the vendor files
77 # AGE - number of backward versions the API still supports
8 LIBVERSION=10:0:1
8 LIBVERSION=11:0:2
463463 11, /* 20 - 50 Gbps (62.5 Gbps equiv) */
464464 20, /* 21 - 400 Gbps (500 Gbps equiv) */
465465 21, /* 22 - 600 Gbps (750 Gbps equiv) */
466 22, /* 23 - 800 Gbps (1000 Gbps equiv) */
467 23, /* 24 - 1200 Gbps (1500 Gbps equiv) */
466468 };
467469
468470 int sprint_uint8_arr(char *buf, size_t size,
25192521 mkey),
25202522 p_ntci->data_details.ntc_256.
25212523 dr_trunc_hop >> 7,
2522 p_ntci->data_details.ntc_256.
2523 dr_trunc_hop >> 6,
2524 (p_ntci->data_details.ntc_256.
2525 dr_trunc_hop & 0x40) >> 6,
25242526 p_ntci->data_details.ntc_256.
25252527 dr_trunc_hop & 0x3f);
25262528 n += snprintf(buff + n, sizeof(buff) - n,
25872589 cl_ntoh16(p_ntci->data_details.ntc_259.lid2),
25882590 cl_ntoh16(p_ntci->data_details.ntc_259.pkey),
25892591 cl_ntoh32(p_ntci->data_details.ntc_259.
2590 sl_qp1) >> 24,
2592 sl_qp1) >> 28,
25912593 cl_ntoh32(p_ntci->data_details.ntc_259.
25922594 sl_qp1) & 0xffffff,
2593 cl_ntoh32(p_ntci->data_details.ntc_259.qp2),
2595 cl_ntoh32(p_ntci->data_details.ntc_259.
2596 qp2) & 0xffffff,
25942597 inet_ntop(AF_INET6, p_ntci->data_details.
25952598 ntc_259.gid1.raw, gid_str,
25962599 sizeof gid_str),
32143217 "14 ",
32153218 "25 ",
32163219 "????",
3217 "50 "
3220 "50 ",
3221 "????",
3222 "????",
3223 "????",
3224 "100 "
32183225 };
32193226
32203227 const char *osm_get_lsa_str(IN uint8_t lsa, IN uint8_t lsea, IN uint8_t state,
32283235 else
32293236 return lsa_str_fixed_width[lsa];
32303237 }
3231 if (lsea > IB_LINK_SPEED_EXT_ACTIVE_50)
3238 if (lsea > IB_LINK_SPEED_EXT_ACTIVE_100)
32323239 return lsa_str_fixed_width[3];
32333240 return lsea_str_fixed_width[lsea];
32343241 }
33433350 return find_ordered_rate(orate);
33443351 }
33453352
3353 int ib_path_get_reduced_rate(IN const uint8_t rate, IN const uint8_t limit)
3354 {
3355 int i = ib_path_rate_get_prev(rate);
3356
3357 while (i > IB_MIN_RATE &&
3358 (ordered_rates[i] > ordered_rates[limit] || i > limit))
3359 i = ib_path_rate_get_prev(i);
3360
3361 return i ? i : IB_MIN_RATE;
3362 }
3363
33463364 int ib_path_rate_max_12xedr(IN const int rate)
33473365 {
33483366 CL_ASSERT(rate >= IB_MIN_RATE && rate <= IB_MAX_RATE);
33573375 return IB_PATH_RECORD_RATE_40_GBS;
33583376 case IB_PATH_RECORD_RATE_400_GBS:
33593377 case IB_PATH_RECORD_RATE_600_GBS:
3378 case IB_PATH_RECORD_RATE_800_GBS:
3379 case IB_PATH_RECORD_RATE_1200_GBS:
33603380 return IB_PATH_RECORD_RATE_300_GBS;
33613381 default:
33623382 break;
33963416 case IB_PATH_RECORD_RATE_600_GBS:
33973417 /* HDR not supported but HDR only rate */
33983418 if (!(p_pi->capability_mask & IB_PORT_CAP_HAS_CAP_MASK2) ||
3419 ((p_pi->capability_mask & IB_PORT_CAP_HAS_CAP_MASK2) &&
3420 !(p_pi->capability_mask2 &
3421 (IB_PORT_CAP2_IS_LINK_SPEED_HDR_SUPPORTED |
3422 IB_PORT_CAP2_IS_LINK_SPEED_NDR_SUPPORTED))))
3423 new_rate = IB_PATH_RECORD_RATE_300_GBS;
3424 break;
3425 case IB_PATH_RECORD_RATE_800_GBS:
3426 case IB_PATH_RECORD_RATE_1200_GBS:
3427 /* NDR not supported but NDR only rate */
3428 if (!(p_pi->capability_mask & IB_PORT_CAP_HAS_CAP_MASK2) ||
33993429 (p_pi->capability_mask & IB_PORT_CAP_HAS_CAP_MASK2 &&
3400 !(p_pi->capability_mask2 & IB_PORT_CAP2_IS_LINK_SPEED_HDR_SUPPORTED)))
3401 new_rate = IB_PATH_RECORD_RATE_300_GBS;
3430 !(p_pi->capability_mask2 & IB_PORT_CAP2_IS_LINK_SPEED_NDR_SUPPORTED))) {
3431 if ((p_pi->capability_mask & IB_PORT_CAP_HAS_CAP_MASK2) &&
3432 !(p_pi->capability_mask2 & IB_PORT_CAP2_IS_LINK_SPEED_HDR_SUPPORTED)) {
3433 /* HDR not supported */
3434 new_rate = IB_PATH_RECORD_RATE_300_GBS;
3435 } else {
3436 /* HDR is supported */
3437 new_rate = IB_PATH_RECORD_RATE_600_GBS;
3438 }
3439 }
34023440 break;
34033441 default:
34043442 break;
729729 uint64_t ports_fdr;
730730 uint64_t ports_edr;
731731 uint64_t ports_hdr;
732 uint64_t ports_ndr;
732733 uint64_t ports_unknown_speed;
733734 port_report_t *unknown_speed_ports;
734735 uint64_t ports_unenabled_speed;
995996 fprintf(out, " %" PRIu64 " at 25.78125 Gbps\n", fs.ports_edr);
996997 if (fs.ports_hdr)
997998 fprintf(out, " %" PRIu64 " at 53.125 Gbps\n", fs.ports_hdr);
999 if (fs.ports_ndr)
1000 fprintf(out, " %" PRIu64 " at 106.25 Gbps\n", fs.ports_ndr);
9981001
9991002 if (fs.ports_disabled + fs.ports_reduced_speed + fs.ports_reduced_width
10001003 + fs.ports_unenabled_width + fs.ports_unenabled_speed
106106 ib_net32_t attr_mod, cap_mask;
107107 boolean_t update_mkey = FALSE;
108108 ib_net64_t m_key = 0;
109 ib_net16_t capability_mask2;
109110 osm_port_t *p_port;
110111
111112 OSM_LOG_ENTER(sm->p_log);
195196 p_pi->state_info2 = 0x02;
196197 ib_port_info_set_port_state(p_pi, port_state);
197198
198 /* Determine ports' M_Key */
199 /* Determine ports' M_Key and CapabilityMask2 */
199200 if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH &&
200 osm_physp_get_port_num(p_physp) != 0)
201 osm_physp_get_port_num(p_physp) != 0) {
201202 m_key = ib_port_info_get_m_key(&physp0->port_info);
202 else
203 capability_mask2 = physp0->port_info.capability_mask2;
204 } else {
203205 m_key = ib_port_info_get_m_key(p_pi);
206 capability_mask2 = p_pi->capability_mask2;
207 }
204208
205209 /* Check whether this is base port0 smsl handling only */
206210 if (port_num == 0 && esp0 == FALSE) {
340344 */
341345 if (sm->p_subn->opt.force_link_width &&
342346 (sm->p_subn->opt.force_link_width < IB_LINK_WIDTH_ACTIVE_2X ||
343 (p_pi->capability_mask2 &
347 (capability_mask2 &
344348 IB_PORT_CAP2_IS_LINK_WIDTH_2X_SUPPORTED)) &&
345349 (sm->p_subn->opt.force_link_width != IB_LINK_WIDTH_SET_LWS ||
346350 p_pi->link_width_enabled != p_pi->link_width_supported)) {
13741374 fclose(file);
13751375 return ret;
13761376 }
1377
1378 uint8_t osm_sa_limit_rate(IN osm_sa_t *sa, IN const uint8_t rate)
1379 {
1380 if (sa->p_subn->opt.max_rate_enum < rate)
1381 return ib_path_get_reduced_rate(rate, sa->p_subn->opt.max_rate_enum);
1382
1383 return rate;
1384 }
774774 return FALSE;
775775 }
776776 }
777 if (sa->p_subn->opt.use_original_extended_sa_rates_only) {
778 new_rate = ib_path_rate_max_12xedr(rate);
777 if (sa->p_subn->opt.max_rate_enum < SA_RATE_MAX_ENUM) {
778 new_rate = osm_sa_limit_rate(sa, rate);
779779 if (new_rate != rate) {
780780 OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
781781 "Rate decreased from %u to %u\n",
973973 ib_member_rec_t *p_recvd_mcmember_rec;
974974 ib_member_rec_t mcmember_rec;
975975 osm_mcm_alias_guid_t *p_mcm_alias_guid;
976 ib_net64_t prefix;
976977
977978 OSM_LOG_ENTER(sa->p_log);
978979
979980 p_sa_mad = osm_madw_get_sa_mad_ptr(p_madw);
980981 p_recvd_mcmember_rec =
981982 (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(p_sa_mad);
983
984 if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) {
985 OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of record\n");
986 osm_dump_mc_record_v2(sa->p_log, p_recvd_mcmember_rec, FILE_ID, OSM_LOG_DEBUG);
987 }
988
989 /* Use ports actual subnet prefix */
990 prefix = p_recvd_mcmember_rec->port_gid.unicast.prefix;
991 if (prefix == IB_DEFAULT_SUBNET_PREFIX)
992 p_recvd_mcmember_rec->port_gid.unicast.prefix = sa->p_subn->opt.subnet_prefix;
982993
983994 mcmember_rec = *p_recvd_mcmember_rec;
984995
10091020 "Requester port GUID 0x%" PRIx64 "\n",
10101021 cl_ntoh64(osm_physp_get_port_guid(p_req_physp)));
10111022 }
1012 OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of record\n");
1013 osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG);
10141023 }
10151024
10161025 p_mgrp = osm_get_mgrp_by_mgid(sa->p_subn, &p_recvd_mcmember_rec->mgid);
10471056 &mcmember_rec);
10481057 CL_PLOCK_RELEASE(sa->p_lock);
10491058
1059 /* Return response with same subnet prefix of the request */
1060 mcmember_rec.port_gid.unicast.prefix = prefix;
10501061 mcmr_rcv_respond(sa, p_madw, &mcmember_rec);
10511062
10521063 Exit:
11551166 uint8_t is_new_group; /* TRUE = there is a need to create a group */
11561167 uint8_t join_state;
11571168 boolean_t proxy;
1169 ib_net64_t prefix;
11581170
11591171 OSM_LOG_ENTER(sa->p_log);
11601172
11611173 p_sa_mad = osm_madw_get_sa_mad_ptr(p_madw);
11621174 p_recvd_mcmember_rec = ib_sa_mad_get_payload_ptr(p_sa_mad);
11631175
1176 if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) {
1177 OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of incoming record\n");
1178 osm_dump_mc_record_v2(sa->p_log, p_recvd_mcmember_rec, FILE_ID, OSM_LOG_DEBUG);
1179 }
1180
11641181 portguid = p_recvd_mcmember_rec->port_gid.unicast.interface_id;
1182
1183 /* Use ports actual subnet prefix */
1184 prefix = p_recvd_mcmember_rec->port_gid.unicast.prefix;
1185 if (prefix == IB_DEFAULT_SUBNET_PREFIX)
1186 p_recvd_mcmember_rec->port_gid.unicast.prefix = sa->p_subn->opt.subnet_prefix;
11651187
11661188 mcmember_rec = *p_recvd_mcmember_rec;
11671189
11921214 "Requester port GUID 0x%" PRIx64 "\n",
11931215 cl_ntoh64(osm_physp_get_port_guid(p_req_physp)));
11941216 }
1195 OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of incoming record\n");
1196 osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG);
11971217 }
11981218
11991219 /* make sure the requested port guid is known to the SM */
14211441 /* Release the lock as we don't need it. */
14221442 CL_PLOCK_RELEASE(sa->p_lock);
14231443
1444 /* Return response with same subnet prefix of the request */
1445 mcmember_rec.port_gid.unicast.prefix = prefix;
1446
14241447 if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG))
14251448 osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG);
14261449
852852 ib_path_rec_set_sl(p_pr, p_parms->sl);
853853 p_pr->mtu = (uint8_t) (p_parms->mtu | 0x80);
854854 rate = p_parms->rate;
855 if (sa->p_subn->opt.use_original_extended_sa_rates_only) {
856 new_rate = ib_path_rate_max_12xedr(rate);
855 if (sa->p_subn->opt.max_rate_enum < SA_RATE_MAX_ENUM) {
856 new_rate = osm_sa_limit_rate(sa, rate);
857857 if (new_rate != rate) {
858858 OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
859859 "Rate decreased from %u to %u\n",
920920 ib_path_rec_set_qos_class(p_pr, 0);
921921 p_pr->mtu = (uint8_t) (p_parms->mtu | 0x80);
922922 rate = p_parms->rate;
923 if (sa->p_subn->opt.use_original_extended_sa_rates_only) {
924 new_rate = ib_path_rate_max_12xedr(rate);
923 if (sa->p_subn->opt.max_rate_enum < SA_RATE_MAX_ENUM) {
924 new_rate = osm_sa_limit_rate(sa, rate);
925925 if (new_rate != rate) {
926926 OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
927927 "Rate decreased from %u to %u\n",
850850 { "ipoib_mcgroup_creation_validation", OPT_OFFSET(ipoib_mcgroup_creation_validation), opts_parse_boolean, NULL, 1 },
851851 { "mcgroup_join_validation", OPT_OFFSET(mcgroup_join_validation), opts_parse_boolean, NULL, 1 },
852852 { "use_original_extended_sa_rates_only", OPT_OFFSET(use_original_extended_sa_rates_only), opts_parse_boolean, NULL, 1 },
853 { "max_rate_enum", OPT_OFFSET(max_rate_enum), opts_parse_uint8, NULL, 1},
853854 { "use_optimized_slvl", OPT_OFFSET(use_optimized_slvl), opts_parse_boolean, NULL, 1 },
854855 { "fsync_high_avail_files", OPT_OFFSET(fsync_high_avail_files), opts_parse_boolean, NULL, 1 },
855856 #ifdef ENABLE_OSM_PERF_MGR
16851686 p_opt->cc_cct.entries_len = 0;
16861687 p_opt->cc_cct.input_str = NULL;
16871688 p_opt->quasi_ftree_indexing = FALSE;
1689 p_opt->max_rate_enum = SA_RATE_MAX_ENUM;
16881690 }
16891691
16901692 static char *clean_val(char *val)
20632065 }
20642066
20652067 if ((IB_LINK_SPEED_EXT_SET_LSES < p_opts->force_link_speed_ext) ||
2066 (p_opts->force_link_speed_ext > IB_LINK_SPEED_EXT_14_25_OR_50 &&
2068 (p_opts->force_link_speed_ext > IB_LINK_SPEED_EXT_MAX_VALUE &&
20672069 p_opts->force_link_speed_ext < IB_LINK_SPEED_EXT_DISABLE)) {
20682070 log_report(" Invalid Cached Option Value:force_link_speed_ext = %u:"
20692071 "Using Default:%u\n", p_opts->force_link_speed_ext,
21982200 p_opts->m_key_lease_period =
21992201 cl_hton16(p_opts->sweep_interval + 1);
22002202 }
2203 }
2204
2205 if (p_opts->use_original_extended_sa_rates_only &&
2206 p_opts->max_rate_enum > IB_PATH_RECORD_RATE_300_GBS) {
2207 if (p_opts->max_rate_enum != SA_RATE_MAX_ENUM)
2208 log_report(" Warning:"
2209 " use_original_extended_sa_rates_only"
2210 " defines a rate limit lower"
2211 " than max_rate_enum.\n\t "
2212 " Setting max_rate_enum to %d\n",
2213 IB_PATH_RECORD_RATE_300_GBS);
2214
2215 p_opts->max_rate_enum = IB_PATH_RECORD_RATE_300_GBS;
2216 }
2217
2218 if (p_opts->max_rate_enum < IB_MIN_RATE ||
2219 (p_opts->max_rate_enum > IB_MAX_RATE &&
2220 p_opts->max_rate_enum != SA_RATE_MAX_ENUM)) {
2221 log_report("Illegal max_rate_enum %u, setting to default "
2222 "value (%u), support all rates\n",
2223 p_opts->max_rate_enum, SA_RATE_MAX_ENUM);
2224 p_opts->max_rate_enum = SA_RATE_MAX_ENUM;
22012225 }
22022226
22032227 return 0;
24292453 "# 5: 14.0625 Gbps or 53.125 Gbps\n"
24302454 "# 6: 25.78125 Gbps or 53.125 Gbps\n"
24312455 "# 7: 14.0625 Gbps, 25.78125 Gbps or 53.125 Gbps\n"
2456 "# 8: 106.25 Gbps\n"
2457 "# 9: 14.0625 Gbps or 106.25 Gbps\n"
2458 "# 10: 25.78125 Gbps or 106.25 Gbps\n"
2459 "# 11: 14.0625 Gbps or 25.78125 Gbps or 106.25 Gbps\n"
2460 "# 12: 53.125 Gbps or 106.25 Gbps\n"
2461 "# 13: 14.0625 Gbps or 53.125 Gbps or 106.25 Gbps\n"
2462 "# 14: 25.78125 Gbps or 53.125 Gbps or 106.25 Gbps\n"
2463 "# 15: 14.0625 Gbps, 25.78125 Gbps or 53.125 Gbps or 106.25 Gbps\n"
24322464 "# 30: Disable extended link speeds\n"
24332465 "# Default 31: set to PortInfo:LinkSpeedExtSupported\n"
24342466 "force_link_speed_ext %u\n\n"
27862818 "# Set to TRUE for subnets with old kernels/drivers that don't understand\n"
27872819 "# the new SA rates for 2x link width and/or HDR link speed (19-22)\n"
27882820 "# default is FALSE\n"
2821 "# Notice: use_original_extended_sa_rates_only is deprecated by max_rate_enum!\n"
2822 "# Use max_rate_enum 18 instead.\n"
27892823 "use_original_extended_sa_rates_only %s\n\n"
2824 "# Enumeration of the maximal rate subnet supports. Option is needed for\n"
2825 "# subnets with old kernels/drivers that don't understand new SA rates.\n"
2826 "# For example:"
2827 "# 18: Rate of 300Gbps - support speeds up to 12xEDR\n"
2828 "# 22: Rate of 600Gbps - support speeds up to HDR\n"
2829 "# For farther reference refer to IB specification chapter 15.2.5.16.1\n"
2830 "max_rate_enum %u\n\n"
27902831 "# Use Optimized SLtoVLMapping programming if supported by device\n"
27912832 "use_optimized_slvl %s\n\n"
27922833 "# Sync in memory files used for high availability with storage\n"
27982839 p_opts->ipoib_mcgroup_creation_validation ? "TRUE" : "FALSE",
27992840 p_opts->mcgroup_join_validation ? "TRUE" : "FALSE",
28002841 p_opts->use_original_extended_sa_rates_only ? "TRUE" : "FALSE",
2842 p_opts->max_rate_enum,
28012843 p_opts->use_optimized_slvl ? "TRUE" : "FALSE",
28022844 p_opts->fsync_high_avail_files ? "TRUE" : "FALSE");
28032845