diff --git a/opensm-3.3.17-prefix.patch b/opensm-3.3.17-prefix.patch new file mode 100644 index 0000000..2446f1c --- /dev/null +++ b/opensm-3.3.17-prefix.patch @@ -0,0 +1,60 @@ +diff --git a/man/opensm.8.in b/man/opensm.8.in +index df55768..79e1bfb 100644 +--- a/man/opensm.8.in ++++ b/man/opensm.8.in +@@ -11,6 +11,7 @@ opensm \- InfiniBand subnet manager and administration (SM/SA) + [\-g(uid) ] + [\-l(mc) ] + [\-p(riority) ] ++[\-\-subnet_prefix ] + [\-\-smkey ] + [\-\-sm_sl ] + [\-r(eassign_lids)] +@@ -136,6 +137,13 @@ This will effect the handover cases, where master + is chosen by priority and GUID. Range goes from 0 + (default and lowest priority) to 15 (highest). + .TP ++\fB\-\-subnet_prefix\fR ++This option specifies the subnet prefix to use in ++on the fabric. The default prefix is ++0xfe80000000000000. OpenMPI in particular requires ++separate fabrics plugged into different ports to ++have different prefixes or else it won't run. ++.TP + \fB\-\-smkey\fR + This option specifies the SM\'s SM_Key (64 bits). + This will effect SM authentication. +diff --git a/opensm/main.c b/opensm/main.c +index 2d23fe2..b4bb348 100644 +--- a/opensm/main.c ++++ b/opensm/main.c +@@ -161,6 +161,9 @@ static void show_usage(void) + " This will effect the handover cases, where master\n" + " is chosen by priority and GUID. Range goes\n" + " from 0 (lowest priority) to 15 (highest).\n\n"); ++ printf("--subnet_prefix \n" ++ " Set the subnet prefix to something other than the\n" ++ " default value of 0xfe80000000000000\n\n"); + printf("--smkey, -k \n" + " This option specifies the SM's SM_Key (64 bits).\n" + " This will effect SM authentication.\n" +@@ -665,6 +668,7 @@ int main(int argc, char *argv[]) + {"once", 0, NULL, 'o'}, + {"reassign_lids", 0, NULL, 'r'}, + {"priority", 1, NULL, 'p'}, ++ {"subnet_prefix", 1, NULL, 15}, + {"smkey", 1, NULL, 'k'}, + {"routing_engine", 1, NULL, 'R'}, + {"ucast_cache", 0, NULL, 'A'}, +@@ -1008,6 +1012,11 @@ int main(int argc, char *argv[]) + printf(" Priority = %d\n", temp); + break; + ++ case 16: ++ opt.subnet_prefix = cl_hton64(strtoull(optarg, NULL, 16)); ++ printf(" Subnet_Prefix = <0x%" PRIx64 ">\n", cl_hton64(opt.subnet_prefix)); ++ break; ++ + case 'k': + sm_key = cl_hton64(strtoull(optarg, NULL, 16)); + printf(" SM Key <0x%" PRIx64 ">\n", cl_hton64(sm_key)); diff --git a/opensm.spec b/opensm.spec index c19ee8c..de3ab34 100644 --- a/opensm.spec +++ b/opensm.spec @@ -2,7 +2,7 @@ Name: opensm Version: 3.3.21 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OpenIB InfiniBand Subnet Manager and management utilities License: GPLv2 or BSD Url: https://github.com/linux-rdma/opensm @@ -15,6 +15,8 @@ Source6: opensm.launch Source7: opensm.rwtab Source8: opensm.partitions +Patch100: opensm-3.3.17-prefix.patch + BuildRequires: gcc BuildRequires: libibumad-devel, systemd, systemd-units BuildRequires: bison, flex, byacc @@ -60,6 +62,7 @@ Static version of opensm libraries %prep %setup -q +%patch100 -p1 %build %if %{__remake_config} @@ -125,6 +128,10 @@ fi %{_libdir}/lib*.a %changelog +* Mon Jan 21 2019 Honggang Li - 3.3.21-2 +- Restore the subnet prefix patch +- Resolves: bz1663785 + * Mon Oct 8 2018 Honggang Li - 3.3.21-1 - Rebase opensm to latest upstream release 3.3.21 - Resolves: bz1637260