New upstream release.
Debian Janitor
2 years ago
238 | 238 | CL_ASSERT(p_heap); |
239 | 239 | CL_ASSERT(cl_is_heap_inited(p_heap)); |
240 | 240 | |
241 | if (index < 0 || index >= p_heap->size) | |
241 | if (index >= p_heap->size) | |
242 | 242 | return (CL_INVALID_PARAMETER); |
243 | 243 | |
244 | 244 | old_key = p_heap->element_array[index].key; |
285 | 285 | |
286 | 286 | if (!p_heap->size) |
287 | 287 | return NULL; |
288 | if (index < 0 || index >= p_heap->size) | |
288 | if (index >= p_heap->size) | |
289 | 289 | return NULL; |
290 | 290 | if (p_heap->size == 1) |
291 | 291 | return p_heap->element_array[--(p_heap->size)].context; |
332 | 332 | CL_ASSERT(p_heap); |
333 | 333 | CL_ASSERT(cl_is_heap_inited(p_heap)); |
334 | 334 | |
335 | return ((index < 0 || index >= p_heap->size || | |
335 | return ((index >= p_heap->size || | |
336 | 336 | p_heap->element_array[index].context != ctx) ? FALSE : TRUE); |
337 | 337 | } |
338 | 338 |
5 | 5 | # API_REV - advance on any added API |
6 | 6 | # RUNNING_REV - advance any change to the vendor files |
7 | 7 | # AGE - number of backward versions the API still supports |
8 | LIBVERSION=5:0:0 | |
8 | LIBVERSION=5:1:0 |
0 | 0 | dnl Process this file with autoconf to produce a configure script. |
1 | 1 | |
2 | 2 | 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) | |
4 | 4 | AC_CONFIG_SRCDIR([opensm/osm_opensm.c]) |
5 | 5 | AC_CONFIG_AUX_DIR(config) |
6 | 6 | 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 | ||
0 | 6 | opensm (3.3.23-2) unstable; urgency=medium |
1 | 7 | |
2 | 8 | * Team upload. |
9 | 9 | This document describes the contents of the OpenSM 3.3 release. |
10 | 10 | OpenSM is an InfiniBand compliant Subnet Manager and Administration, |
11 | 11 | and runs on top of OpenIB. The OpenSM version for this release |
12 | is opensm-3.3.23. | |
12 | is opensm-3.3.24. | |
13 | 13 | |
14 | 14 | This document includes the following sections: |
15 | 15 | 1 This Overview section (describing new features and software |
22 | 22 | |
23 | 23 | 1.1 Major New Features |
24 | 24 | |
25 | * Support for NDR link speed | |
26 | ||
25 | 27 | * Support for HDR link speed and 2x link width |
26 | 28 | IBTA has recently (beyond IBA 1.3) added support for HDR link speed |
27 | 29 | and 2x link width. |
120 | 122 | |
121 | 123 | 1.2 Minor New Features: |
122 | 124 | |
125 | b17b4db Backward compatibility for old drivers | |
123 | 126 | 924f030 Add support for registering an opensm plugin as a new routing engine |
124 | 127 | 82c3ea6 Add '--subnet_prefix' and '--dump_files_dir' options |
125 | 128 | dfc383e osm_port_info_rcv.c: Optimize PKEY sending during heavy sweep |
866 | 869 | |
867 | 870 | 4.2 Other Bug Fixes |
868 | 871 | |
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 | |
869 | 877 | 9b9ea72 Fix spelling mistake of "switches" |
870 | 878 | 70722b4 ib_types: Drop packed attribute where unnecessary |
871 | 879 | 9a7cc0d opensm.spec.in: Move COPYING back into doc |
3215 | 3215 | * 20: 50 Gb/sec. |
3216 | 3216 | * 21: 400 Gb/sec. |
3217 | 3217 | * 22: 600 Gb/sec. |
3218 | * 23 : 800 Gb/sec. | |
3219 | * 24 : 1200 Gb/sec. | |
3218 | 3220 | * others: reserved |
3219 | 3221 | * |
3220 | 3222 | * NOTES |
4701 | 4703 | #define IB_PORT_CAP2_IS_SWITCH_PORT_STATE_TBL_SUPP (CL_HTON16(0x0008)) |
4702 | 4704 | #define IB_PORT_CAP2_IS_LINK_WIDTH_2X_SUPPORTED (CL_HTON16(0x0010)) |
4703 | 4705 | #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)) | |
4704 | 4707 | |
4705 | 4708 | /****s* IBA Base: Types/ib_port_info_ext_t |
4706 | 4709 | * NAME |
4720 | 4723 | ib_net16_t edr_fec_mode_enable; |
4721 | 4724 | ib_net16_t hdr_fec_mode_sup; |
4722 | 4725 | 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]; | |
4724 | 4729 | } ib_port_info_ext_t; |
4725 | 4730 | /************/ |
4726 | 4731 | |
5181 | 5186 | #define IB_LINK_SPEED_EXT_ACTIVE_14 1 |
5182 | 5187 | #define IB_LINK_SPEED_EXT_ACTIVE_25 2 |
5183 | 5188 | #define IB_LINK_SPEED_EXT_ACTIVE_50 4 |
5189 | #define IB_LINK_SPEED_EXT_ACTIVE_100 8 | |
5184 | 5190 | #define IB_LINK_SPEED_EXT_14_25_OR_50 (IB_LINK_SPEED_EXT_ACTIVE_14 | \ |
5185 | 5191 | IB_LINK_SPEED_EXT_ACTIVE_25 | \ |
5186 | 5192 | 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) | |
5187 | 5197 | #define IB_LINK_SPEED_EXT_DISABLE 30 |
5188 | 5198 | #define IB_LINK_SPEED_EXT_SET_LSES 31 |
5189 | 5199 | |
5209 | 5219 | #define IB_PATH_RECORD_RATE_50_GBS 20 |
5210 | 5220 | #define IB_PATH_RECORD_RATE_400_GBS 21 |
5211 | 5221 | #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 | |
5212 | 5225 | |
5213 | 5226 | #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 | |
5216 | 5229 | |
5217 | 5230 | static inline uint8_t OSM_API |
5218 | 5231 | ib_port_info_get_link_speed_ext_active(IN const ib_port_info_t * const p_pi); |
5312 | 5325 | |
5313 | 5326 | default: |
5314 | 5327 | 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; | |
5315 | 5355 | break; |
5316 | 5356 | } |
5317 | 5357 | break; |
6455 | 6495 | uint8_t ret = 0; |
6456 | 6496 | uint8_t extspeeds = (speeds >> 4); |
6457 | 6497 | |
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) | |
6459 | 6501 | ret = IB_LINK_SPEED_EXT_ACTIVE_50 << 4; |
6460 | 6502 | else if (extspeeds & IB_LINK_SPEED_EXT_ACTIVE_25) |
6461 | 6503 | ret = IB_LINK_SPEED_EXT_ACTIVE_25 << 4; |
931 | 931 | * SYNOPSIS |
932 | 932 | */ |
933 | 933 | #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) | |
934 | 945 | |
935 | 946 | /****d* OpenSM: osm_signal_t |
936 | 947 | * NAME |
840 | 840 | * ib_path_rate_max_12xedr |
841 | 841 | * |
842 | 842 | * DESCRIPTION |
843 | * Function is deprecated and SHOULD NOT BE USED. | |
844 | * Use osm_sa_limit_rate instead. | |
845 | * | |
843 | 846 | * Obtains encoded rate from the set of "original" extended |
844 | 847 | * SA rates (up through and including 300 Gbps - 12x EDR). |
845 | 848 | * |
853 | 856 | * [in] Encoded path rate. |
854 | 857 | * |
855 | 858 | * RETURN VALUES |
859 | * Function is deprecated and SHOULD NOT BE USED. | |
860 | * Use osm_sa_limit_rate instead. | |
861 | * | |
856 | 862 | * Returns an int indicating the encoded rate |
857 | 863 | * with a maximum of 300 Gbps (12x EDR). |
858 | 864 | * For new rates (relating to 2x and HDR), the |
894 | 900 | * SEE ALSO |
895 | 901 | *********/ |
896 | 902 | |
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 | ||
897 | 931 | /****f* OpenSM: Helper/sprint_uint8_arr |
898 | 932 | * NAME |
899 | 933 | * sprint_uint8_arr |
64 | 64 | # define BEGIN_C_DECLS |
65 | 65 | # define END_C_DECLS |
66 | 66 | #endif /* __cplusplus */ |
67 | ||
68 | #define SA_RATE_MAX_ENUM 63 | |
67 | 69 | |
68 | 70 | BEGIN_C_DECLS |
69 | 71 | /****h* OpenSM/SA |
612 | 614 | IN const ib_gid_t * p_dgid, |
613 | 615 | IN cl_qlist_t * p_list); |
614 | 616 | |
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 | ||
615 | 643 | END_C_DECLS |
616 | 644 | #endif /* _OSM_SA_H_ */ |
337 | 337 | boolean_t ipoib_mcgroup_creation_validation; |
338 | 338 | boolean_t mcgroup_join_validation; |
339 | 339 | boolean_t use_original_extended_sa_rates_only; |
340 | uint8_t max_rate_enum; | |
340 | 341 | boolean_t use_optimized_slvl; |
341 | 342 | boolean_t fsync_high_avail_files; |
342 | 343 | osm_qos_options_t qos_options; |
640 | 641 | * old kernels/drivers that don't understand the |
641 | 642 | * new SA rates for 2x link width and/or HDR link speed (19-22). |
642 | 643 | * |
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 | * | |
643 | 650 | * use_optimized_slvl |
644 | 651 | * Use optimized SLtoVLMappingTable programming if |
645 | 652 | * device indicates it supports this. |
90 | 90 | sprint_uint8_arr; |
91 | 91 | ib_path_rate_max_12xedr; |
92 | 92 | ib_path_rate_2x_hdr_fixups; |
93 | ib_path_get_reduced_rate; | |
93 | 94 | local: *; |
94 | 95 | }; |
5 | 5 | # API_REV - advance on any added API |
6 | 6 | # RUNNING_REV - advance any change to the vendor files |
7 | 7 | # AGE - number of backward versions the API still supports |
8 | LIBVERSION=10:0:1 | |
8 | LIBVERSION=11:0:2 |
463 | 463 | 11, /* 20 - 50 Gbps (62.5 Gbps equiv) */ |
464 | 464 | 20, /* 21 - 400 Gbps (500 Gbps equiv) */ |
465 | 465 | 21, /* 22 - 600 Gbps (750 Gbps equiv) */ |
466 | 22, /* 23 - 800 Gbps (1000 Gbps equiv) */ | |
467 | 23, /* 24 - 1200 Gbps (1500 Gbps equiv) */ | |
466 | 468 | }; |
467 | 469 | |
468 | 470 | int sprint_uint8_arr(char *buf, size_t size, |
2519 | 2521 | mkey), |
2520 | 2522 | p_ntci->data_details.ntc_256. |
2521 | 2523 | 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, | |
2524 | 2526 | p_ntci->data_details.ntc_256. |
2525 | 2527 | dr_trunc_hop & 0x3f); |
2526 | 2528 | n += snprintf(buff + n, sizeof(buff) - n, |
2587 | 2589 | cl_ntoh16(p_ntci->data_details.ntc_259.lid2), |
2588 | 2590 | cl_ntoh16(p_ntci->data_details.ntc_259.pkey), |
2589 | 2591 | cl_ntoh32(p_ntci->data_details.ntc_259. |
2590 | sl_qp1) >> 24, | |
2592 | sl_qp1) >> 28, | |
2591 | 2593 | cl_ntoh32(p_ntci->data_details.ntc_259. |
2592 | 2594 | 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, | |
2594 | 2597 | inet_ntop(AF_INET6, p_ntci->data_details. |
2595 | 2598 | ntc_259.gid1.raw, gid_str, |
2596 | 2599 | sizeof gid_str), |
3214 | 3217 | "14 ", |
3215 | 3218 | "25 ", |
3216 | 3219 | "????", |
3217 | "50 " | |
3220 | "50 ", | |
3221 | "????", | |
3222 | "????", | |
3223 | "????", | |
3224 | "100 " | |
3218 | 3225 | }; |
3219 | 3226 | |
3220 | 3227 | const char *osm_get_lsa_str(IN uint8_t lsa, IN uint8_t lsea, IN uint8_t state, |
3228 | 3235 | else |
3229 | 3236 | return lsa_str_fixed_width[lsa]; |
3230 | 3237 | } |
3231 | if (lsea > IB_LINK_SPEED_EXT_ACTIVE_50) | |
3238 | if (lsea > IB_LINK_SPEED_EXT_ACTIVE_100) | |
3232 | 3239 | return lsa_str_fixed_width[3]; |
3233 | 3240 | return lsea_str_fixed_width[lsea]; |
3234 | 3241 | } |
3343 | 3350 | return find_ordered_rate(orate); |
3344 | 3351 | } |
3345 | 3352 | |
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 | ||
3346 | 3364 | int ib_path_rate_max_12xedr(IN const int rate) |
3347 | 3365 | { |
3348 | 3366 | CL_ASSERT(rate >= IB_MIN_RATE && rate <= IB_MAX_RATE); |
3357 | 3375 | return IB_PATH_RECORD_RATE_40_GBS; |
3358 | 3376 | case IB_PATH_RECORD_RATE_400_GBS: |
3359 | 3377 | case IB_PATH_RECORD_RATE_600_GBS: |
3378 | case IB_PATH_RECORD_RATE_800_GBS: | |
3379 | case IB_PATH_RECORD_RATE_1200_GBS: | |
3360 | 3380 | return IB_PATH_RECORD_RATE_300_GBS; |
3361 | 3381 | default: |
3362 | 3382 | break; |
3396 | 3416 | case IB_PATH_RECORD_RATE_600_GBS: |
3397 | 3417 | /* HDR not supported but HDR only rate */ |
3398 | 3418 | 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) || | |
3399 | 3429 | (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 | } | |
3402 | 3440 | break; |
3403 | 3441 | default: |
3404 | 3442 | break; |
729 | 729 | uint64_t ports_fdr; |
730 | 730 | uint64_t ports_edr; |
731 | 731 | uint64_t ports_hdr; |
732 | uint64_t ports_ndr; | |
732 | 733 | uint64_t ports_unknown_speed; |
733 | 734 | port_report_t *unknown_speed_ports; |
734 | 735 | uint64_t ports_unenabled_speed; |
995 | 996 | fprintf(out, " %" PRIu64 " at 25.78125 Gbps\n", fs.ports_edr); |
996 | 997 | if (fs.ports_hdr) |
997 | 998 | 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); | |
998 | 1001 | |
999 | 1002 | if (fs.ports_disabled + fs.ports_reduced_speed + fs.ports_reduced_width |
1000 | 1003 | + fs.ports_unenabled_width + fs.ports_unenabled_speed |
106 | 106 | ib_net32_t attr_mod, cap_mask; |
107 | 107 | boolean_t update_mkey = FALSE; |
108 | 108 | ib_net64_t m_key = 0; |
109 | ib_net16_t capability_mask2; | |
109 | 110 | osm_port_t *p_port; |
110 | 111 | |
111 | 112 | OSM_LOG_ENTER(sm->p_log); |
195 | 196 | p_pi->state_info2 = 0x02; |
196 | 197 | ib_port_info_set_port_state(p_pi, port_state); |
197 | 198 | |
198 | /* Determine ports' M_Key */ | |
199 | /* Determine ports' M_Key and CapabilityMask2 */ | |
199 | 200 | 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) { | |
201 | 202 | m_key = ib_port_info_get_m_key(&physp0->port_info); |
202 | else | |
203 | capability_mask2 = physp0->port_info.capability_mask2; | |
204 | } else { | |
203 | 205 | m_key = ib_port_info_get_m_key(p_pi); |
206 | capability_mask2 = p_pi->capability_mask2; | |
207 | } | |
204 | 208 | |
205 | 209 | /* Check whether this is base port0 smsl handling only */ |
206 | 210 | if (port_num == 0 && esp0 == FALSE) { |
340 | 344 | */ |
341 | 345 | if (sm->p_subn->opt.force_link_width && |
342 | 346 | (sm->p_subn->opt.force_link_width < IB_LINK_WIDTH_ACTIVE_2X || |
343 | (p_pi->capability_mask2 & | |
347 | (capability_mask2 & | |
344 | 348 | IB_PORT_CAP2_IS_LINK_WIDTH_2X_SUPPORTED)) && |
345 | 349 | (sm->p_subn->opt.force_link_width != IB_LINK_WIDTH_SET_LWS || |
346 | 350 | p_pi->link_width_enabled != p_pi->link_width_supported)) { |
1374 | 1374 | fclose(file); |
1375 | 1375 | return ret; |
1376 | 1376 | } |
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 | } |
774 | 774 | return FALSE; |
775 | 775 | } |
776 | 776 | } |
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); | |
779 | 779 | if (new_rate != rate) { |
780 | 780 | OSM_LOG(sa->p_log, OSM_LOG_VERBOSE, |
781 | 781 | "Rate decreased from %u to %u\n", |
973 | 973 | ib_member_rec_t *p_recvd_mcmember_rec; |
974 | 974 | ib_member_rec_t mcmember_rec; |
975 | 975 | osm_mcm_alias_guid_t *p_mcm_alias_guid; |
976 | ib_net64_t prefix; | |
976 | 977 | |
977 | 978 | OSM_LOG_ENTER(sa->p_log); |
978 | 979 | |
979 | 980 | p_sa_mad = osm_madw_get_sa_mad_ptr(p_madw); |
980 | 981 | p_recvd_mcmember_rec = |
981 | 982 | (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; | |
982 | 993 | |
983 | 994 | mcmember_rec = *p_recvd_mcmember_rec; |
984 | 995 | |
1009 | 1020 | "Requester port GUID 0x%" PRIx64 "\n", |
1010 | 1021 | cl_ntoh64(osm_physp_get_port_guid(p_req_physp))); |
1011 | 1022 | } |
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); | |
1014 | 1023 | } |
1015 | 1024 | |
1016 | 1025 | p_mgrp = osm_get_mgrp_by_mgid(sa->p_subn, &p_recvd_mcmember_rec->mgid); |
1047 | 1056 | &mcmember_rec); |
1048 | 1057 | CL_PLOCK_RELEASE(sa->p_lock); |
1049 | 1058 | |
1059 | /* Return response with same subnet prefix of the request */ | |
1060 | mcmember_rec.port_gid.unicast.prefix = prefix; | |
1050 | 1061 | mcmr_rcv_respond(sa, p_madw, &mcmember_rec); |
1051 | 1062 | |
1052 | 1063 | Exit: |
1155 | 1166 | uint8_t is_new_group; /* TRUE = there is a need to create a group */ |
1156 | 1167 | uint8_t join_state; |
1157 | 1168 | boolean_t proxy; |
1169 | ib_net64_t prefix; | |
1158 | 1170 | |
1159 | 1171 | OSM_LOG_ENTER(sa->p_log); |
1160 | 1172 | |
1161 | 1173 | p_sa_mad = osm_madw_get_sa_mad_ptr(p_madw); |
1162 | 1174 | p_recvd_mcmember_rec = ib_sa_mad_get_payload_ptr(p_sa_mad); |
1163 | 1175 | |
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 | ||
1164 | 1181 | 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; | |
1165 | 1187 | |
1166 | 1188 | mcmember_rec = *p_recvd_mcmember_rec; |
1167 | 1189 | |
1192 | 1214 | "Requester port GUID 0x%" PRIx64 "\n", |
1193 | 1215 | cl_ntoh64(osm_physp_get_port_guid(p_req_physp))); |
1194 | 1216 | } |
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); | |
1197 | 1217 | } |
1198 | 1218 | |
1199 | 1219 | /* make sure the requested port guid is known to the SM */ |
1421 | 1441 | /* Release the lock as we don't need it. */ |
1422 | 1442 | CL_PLOCK_RELEASE(sa->p_lock); |
1423 | 1443 | |
1444 | /* Return response with same subnet prefix of the request */ | |
1445 | mcmember_rec.port_gid.unicast.prefix = prefix; | |
1446 | ||
1424 | 1447 | if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) |
1425 | 1448 | osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG); |
1426 | 1449 |
852 | 852 | ib_path_rec_set_sl(p_pr, p_parms->sl); |
853 | 853 | p_pr->mtu = (uint8_t) (p_parms->mtu | 0x80); |
854 | 854 | 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); | |
857 | 857 | if (new_rate != rate) { |
858 | 858 | OSM_LOG(sa->p_log, OSM_LOG_VERBOSE, |
859 | 859 | "Rate decreased from %u to %u\n", |
920 | 920 | ib_path_rec_set_qos_class(p_pr, 0); |
921 | 921 | p_pr->mtu = (uint8_t) (p_parms->mtu | 0x80); |
922 | 922 | 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); | |
925 | 925 | if (new_rate != rate) { |
926 | 926 | OSM_LOG(sa->p_log, OSM_LOG_VERBOSE, |
927 | 927 | "Rate decreased from %u to %u\n", |
850 | 850 | { "ipoib_mcgroup_creation_validation", OPT_OFFSET(ipoib_mcgroup_creation_validation), opts_parse_boolean, NULL, 1 }, |
851 | 851 | { "mcgroup_join_validation", OPT_OFFSET(mcgroup_join_validation), opts_parse_boolean, NULL, 1 }, |
852 | 852 | { "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}, | |
853 | 854 | { "use_optimized_slvl", OPT_OFFSET(use_optimized_slvl), opts_parse_boolean, NULL, 1 }, |
854 | 855 | { "fsync_high_avail_files", OPT_OFFSET(fsync_high_avail_files), opts_parse_boolean, NULL, 1 }, |
855 | 856 | #ifdef ENABLE_OSM_PERF_MGR |
1685 | 1686 | p_opt->cc_cct.entries_len = 0; |
1686 | 1687 | p_opt->cc_cct.input_str = NULL; |
1687 | 1688 | p_opt->quasi_ftree_indexing = FALSE; |
1689 | p_opt->max_rate_enum = SA_RATE_MAX_ENUM; | |
1688 | 1690 | } |
1689 | 1691 | |
1690 | 1692 | static char *clean_val(char *val) |
2063 | 2065 | } |
2064 | 2066 | |
2065 | 2067 | 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 && | |
2067 | 2069 | p_opts->force_link_speed_ext < IB_LINK_SPEED_EXT_DISABLE)) { |
2068 | 2070 | log_report(" Invalid Cached Option Value:force_link_speed_ext = %u:" |
2069 | 2071 | "Using Default:%u\n", p_opts->force_link_speed_ext, |
2198 | 2200 | p_opts->m_key_lease_period = |
2199 | 2201 | cl_hton16(p_opts->sweep_interval + 1); |
2200 | 2202 | } |
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; | |
2201 | 2225 | } |
2202 | 2226 | |
2203 | 2227 | return 0; |
2429 | 2453 | "# 5: 14.0625 Gbps or 53.125 Gbps\n" |
2430 | 2454 | "# 6: 25.78125 Gbps or 53.125 Gbps\n" |
2431 | 2455 | "# 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" | |
2432 | 2464 | "# 30: Disable extended link speeds\n" |
2433 | 2465 | "# Default 31: set to PortInfo:LinkSpeedExtSupported\n" |
2434 | 2466 | "force_link_speed_ext %u\n\n" |
2786 | 2818 | "# Set to TRUE for subnets with old kernels/drivers that don't understand\n" |
2787 | 2819 | "# the new SA rates for 2x link width and/or HDR link speed (19-22)\n" |
2788 | 2820 | "# 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" | |
2789 | 2823 | "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" | |
2790 | 2831 | "# Use Optimized SLtoVLMapping programming if supported by device\n" |
2791 | 2832 | "use_optimized_slvl %s\n\n" |
2792 | 2833 | "# Sync in memory files used for high availability with storage\n" |
2798 | 2839 | p_opts->ipoib_mcgroup_creation_validation ? "TRUE" : "FALSE", |
2799 | 2840 | p_opts->mcgroup_join_validation ? "TRUE" : "FALSE", |
2800 | 2841 | p_opts->use_original_extended_sa_rates_only ? "TRUE" : "FALSE", |
2842 | p_opts->max_rate_enum, | |
2801 | 2843 | p_opts->use_optimized_slvl ? "TRUE" : "FALSE", |
2802 | 2844 | p_opts->fsync_high_avail_files ? "TRUE" : "FALSE"); |
2803 | 2845 |