diff --git a/.gitignore b/.gitignore index 14c9a69..99d6eca 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/opensm-3.3.23.tar.gz +SOURCES/opensm-3.3.24.tar.gz diff --git a/.opensm.metadata b/.opensm.metadata index 19c2d89..54ac3fa 100644 --- a/.opensm.metadata +++ b/.opensm.metadata @@ -1 +1 @@ -927bc2d2cdde68ce6a2510faa149165215e44e69 SOURCES/opensm-3.3.23.tar.gz +285f447c556b67dc5be1deaaab9294b7a8697317 SOURCES/opensm-3.3.24.tar.gz diff --git a/SOURCES/0001-osm_sa_mcmember_record.c-Allow-MCMR-requests-with-de.patch b/SOURCES/0001-osm_sa_mcmember_record.c-Allow-MCMR-requests-with-de.patch deleted file mode 100644 index 4830365..0000000 --- a/SOURCES/0001-osm_sa_mcmember_record.c-Allow-MCMR-requests-with-de.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 0a8d9392b649a6797060f653bae9b5e5648a87d3 Mon Sep 17 00:00:00 2001 -From: Daniel Klein -Date: Sun, 18 Oct 2020 14:39:25 +0300 -Subject: [PATCH 1/2] osm_sa_mcmember_record.c: Allow MCMR requests with - default subnet prefix - -Allow handling MCMR join/leave requests where PortGID is with the -default subnet prefix and OpenSM is configured to use non-default subnet -prefix. - -Signed-off-by: Daniel Klein ---- - opensm/osm_sa_mcmember_record.c | 31 +++++++++++++++++++++++++++---- - 1 file changed, 27 insertions(+), 4 deletions(-) - -diff --git a/opensm/osm_sa_mcmember_record.c b/opensm/osm_sa_mcmember_record.c -index 3a75a97545af..b334ea0a2f55 100644 ---- a/opensm/osm_sa_mcmember_record.c -+++ b/opensm/osm_sa_mcmember_record.c -@@ -974,6 +974,7 @@ static void mcmr_rcv_leave_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) - ib_member_rec_t *p_recvd_mcmember_rec; - ib_member_rec_t mcmember_rec; - osm_mcm_alias_guid_t *p_mcm_alias_guid; -+ ib_net64_t prefix; - - OSM_LOG_ENTER(sa->p_log); - -@@ -981,6 +982,16 @@ static void mcmr_rcv_leave_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) - p_recvd_mcmember_rec = - (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(p_sa_mad); - -+ if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) { -+ OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of record\n"); -+ osm_dump_mc_record_v2(sa->p_log, p_recvd_mcmember_rec, FILE_ID, OSM_LOG_DEBUG); -+ } -+ -+ /* Use ports actual subnet prefix */ -+ prefix = p_recvd_mcmember_rec->port_gid.unicast.prefix; -+ if (prefix == IB_DEFAULT_SUBNET_PREFIX) -+ p_recvd_mcmember_rec->port_gid.unicast.prefix = sa->p_subn->opt.subnet_prefix; -+ - mcmember_rec = *p_recvd_mcmember_rec; - - /* Validate the subnet prefix in the PortGID */ -@@ -1010,8 +1021,6 @@ static void mcmr_rcv_leave_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) - "Requester port GUID 0x%" PRIx64 "\n", - cl_ntoh64(osm_physp_get_port_guid(p_req_physp))); - } -- OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of record\n"); -- osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG); - } - - p_mgrp = osm_get_mgrp_by_mgid(sa->p_subn, &p_recvd_mcmember_rec->mgid); -@@ -1048,6 +1057,8 @@ static void mcmr_rcv_leave_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) - &mcmember_rec); - CL_PLOCK_RELEASE(sa->p_lock); - -+ /* Return response with same subnet prefix of the request */ -+ mcmember_rec.port_gid.unicast.prefix = prefix; - mcmr_rcv_respond(sa, p_madw, &mcmember_rec); - - Exit: -@@ -1156,14 +1167,25 @@ static void mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) - uint8_t is_new_group; /* TRUE = there is a need to create a group */ - uint8_t join_state; - boolean_t proxy; -+ ib_net64_t prefix; - - OSM_LOG_ENTER(sa->p_log); - - p_sa_mad = osm_madw_get_sa_mad_ptr(p_madw); - p_recvd_mcmember_rec = ib_sa_mad_get_payload_ptr(p_sa_mad); - -+ if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) { -+ OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of incoming record\n"); -+ osm_dump_mc_record_v2(sa->p_log, p_recvd_mcmember_rec, FILE_ID, OSM_LOG_DEBUG); -+ } -+ - portguid = p_recvd_mcmember_rec->port_gid.unicast.interface_id; - -+ /* Use ports actual subnet prefix */ -+ prefix = p_recvd_mcmember_rec->port_gid.unicast.prefix; -+ if (prefix == IB_DEFAULT_SUBNET_PREFIX) -+ p_recvd_mcmember_rec->port_gid.unicast.prefix = sa->p_subn->opt.subnet_prefix; -+ - mcmember_rec = *p_recvd_mcmember_rec; - - /* Validate the subnet prefix in the PortGID */ -@@ -1193,8 +1215,6 @@ static void mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) - "Requester port GUID 0x%" PRIx64 "\n", - cl_ntoh64(osm_physp_get_port_guid(p_req_physp))); - } -- OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of incoming record\n"); -- osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG); - } - - /* make sure the requested port guid is known to the SM */ -@@ -1422,6 +1442,9 @@ static void mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) - /* Release the lock as we don't need it. */ - CL_PLOCK_RELEASE(sa->p_lock); - -+ /* Return response with same subnet prefix of the request */ -+ mcmember_rec.port_gid.unicast.prefix = prefix; -+ - if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) - osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG); - --- -2.25.4 - diff --git a/SOURCES/0002-osm_link_mgr.c-Fix-checking-if-port-support-link-wid.patch b/SOURCES/0002-osm_link_mgr.c-Fix-checking-if-port-support-link-wid.patch deleted file mode 100644 index 98458a5..0000000 --- a/SOURCES/0002-osm_link_mgr.c-Fix-checking-if-port-support-link-wid.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 9b3e860495cdca9ed050968608f02798cda2943b Mon Sep 17 00:00:00 2001 -From: Daniel Klein -Date: Tue, 3 Nov 2020 08:11:51 +0000 -Subject: [PATCH 2/2] osm_link_mgr.c: Fix checking if port support link width - 2x - -Bug description: -When force_link_width option is enabled, OpenSM checks for switch -external ports if the port support link width 2x in PortInfo of the -external port, instead of PortInfo of switch port 0. - -With this change, when OpenSM checks if a switch supports link width 2x, -it checks in PortInfo of port 0 of the device. - -Signed-off-by: Daniel Klein ---- - opensm/osm_link_mgr.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/opensm/osm_link_mgr.c b/opensm/osm_link_mgr.c -index ca69375378a0..a02be5b8d219 100644 ---- a/opensm/osm_link_mgr.c -+++ b/opensm/osm_link_mgr.c -@@ -107,6 +107,7 @@ static int link_mgr_set_physp_pi(osm_sm_t * sm, IN osm_physp_t * p_physp, - ib_net32_t attr_mod, cap_mask; - boolean_t update_mkey = FALSE; - ib_net64_t m_key = 0; -+ ib_net16_t capability_mask2; - osm_port_t *p_port; - - OSM_LOG_ENTER(sm->p_log); -@@ -196,12 +197,15 @@ static int link_mgr_set_physp_pi(osm_sm_t * sm, IN osm_physp_t * p_physp, - p_pi->state_info2 = 0x02; - ib_port_info_set_port_state(p_pi, port_state); - -- /* Determine ports' M_Key */ -+ /* Determine ports' M_Key and CapabilityMask2 */ - if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH && -- osm_physp_get_port_num(p_physp) != 0) -+ osm_physp_get_port_num(p_physp) != 0) { - m_key = ib_port_info_get_m_key(&physp0->port_info); -- else -+ capability_mask2 = physp0->port_info.capability_mask2; -+ } else { - m_key = ib_port_info_get_m_key(p_pi); -+ capability_mask2 = p_pi->capability_mask2; -+ } - - /* Check whether this is base port0 smsl handling only */ - if (port_num == 0 && esp0 == FALSE) { -@@ -341,7 +345,7 @@ static int link_mgr_set_physp_pi(osm_sm_t * sm, IN osm_physp_t * p_physp, - */ - if (sm->p_subn->opt.force_link_width && - (sm->p_subn->opt.force_link_width < IB_LINK_WIDTH_ACTIVE_2X || -- (p_pi->capability_mask2 & -+ (capability_mask2 & - IB_PORT_CAP2_IS_LINK_WIDTH_2X_SUPPORTED)) && - (sm->p_subn->opt.force_link_width != IB_LINK_WIDTH_SET_LWS || - p_pi->link_width_enabled != p_pi->link_width_supported)) { --- -2.25.4 - diff --git a/SPECS/opensm.spec b/SPECS/opensm.spec index f4ecf51..fb5787d 100644 --- a/SPECS/opensm.spec +++ b/SPECS/opensm.spec @@ -1,8 +1,8 @@ %global __remake_config 1 Name: opensm -Version: 3.3.23 -Release: 4%{?dist} +Version: 3.3.24 +Release: 1%{?dist} Summary: OpenIB InfiniBand Subnet Manager and management utilities Group: System Environment/Daemons License: GPLv2 or BSD @@ -15,8 +15,6 @@ Source5: opensm.service Source6: opensm.launch Source7: opensm.rwtab Source8: opensm.partitions -Patch1: 0001-osm_sa_mcmember_record.c-Allow-MCMR-requests-with-de.patch -Patch2: 0002-osm_link_mgr.c-Fix-checking-if-port-support-link-wid.patch BuildRequires: libibumad-devel, systemd, systemd-units BuildRequires: bison, flex, byacc, gcc @@ -62,8 +60,6 @@ Static version of opensm libraries %prep %setup -q -%patch1 -p1 -%patch2 -p1 %build %if %{__remake_config} @@ -129,6 +125,10 @@ fi %{_libdir}/lib*.a %changelog +* Tue Jun 15 2021 Honggang Li - 3.3.24-1 +- Rebase to latest upstream release 3.3.24 +- Resolves: bz1961961 + * Thu Dec 10 2020 Honggang Li - 3.3.23-4 - opensm service should after rdma-hw.target - Resolves: bz1906252