Commit 3f73c559 authored by Scott Breyer's avatar Scott Breyer

Update to latest from build 10.4.0.0.92 (IFS 10.4.0.0.97)

parent 81410c66
......@@ -92,6 +92,8 @@ my @delta_components_other = (
my @delta_components_rhel72 = ( @delta_components_other );
my @delta_components_rhel67 = ( @delta_components_other );
my @delta_components_rhel70 = (
"opa_stack", # Kernel drivers.
"ibacm", # OFA IB communication manager assistant.
......@@ -353,6 +355,18 @@ my %opa_stack_dev_rhel70_comp_info = (
},
);
my %opa_stack_dev_rhel67_comp_info = (
'opa_stack_dev' => {
KernelRpms => [ "ifs-kernel-updates-devel" ],
UserRpms => [ "ibacm-devel",
"libibumad-devel", "libibumad-static"
],
DebugRpms => [ ],
Drivers => "", # none
StartupScript => "",
StartupParams => [ ],
},
);
my %opa_stack_dev_rhel72_comp_info = (
'opa_stack_dev' => {
......@@ -461,6 +475,24 @@ my %opa_stack_other_comp_info = (
},
);
my %opa_stack_rhel67_comp_info = (
'opa_stack' => {
KernelRpms => [ "ifs-kernel-updates" ], # special case
UserRpms => [ "opa-scripts",
"libibumad",
"srptools",
"libibmad",
"infiniband-diags",
],
DebugRpms => [ "libibumad-debuginfo",
"srptools-debuginfo",
],
Drivers => "",
StartupScript => "opa",
StartupParams => [ "ARPTABLE_TUNING" ],
},
);
my %opa_stack_rhel72_comp_info = (
'opa_stack' => {
KernelRpms => [ "kmod-ifs-kernel-updates" ], # special case
......@@ -549,6 +581,24 @@ my %delta_comp_info_other = (
%delta_debug_comp_info,
);
my %delta_comp_info_rhel67 = (
%opa_stack_rhel67_comp_info,
%ibacm_comp_info,
%intel_hfi_comp_info,
%ib_wfr_lite_comp_info,
%delta_ipoib_comp_info,
%mpi_selector_comp_info,
%mvapich2_comp_info,
%openmpi_comp_info,
%gasnet_comp_info,
%openshmem_comp_info,
%opa_stack_dev_rhel67_comp_info,
%delta_mpisrc_comp_info,
%mpiRest_comp_info,
%hfi1_uefi_comp_info,
%delta_debug_comp_info,
);
my %delta_comp_info_rhel72 = (
%opa_stack_rhel72_comp_info,
%ibacm_comp_info,
......@@ -651,6 +701,7 @@ my %delta_kernel_ib_options = (
my @delta_kernel_srpms_other = ( 'compat-rdma' );
my @delta_kernel_srpms_rhel72 = ( 'kmod-ifs-kernel-updates' );
my @delta_kernel_srpms_rhel70 = ( 'compat-rdma' );
my @delta_kernel_srpms_rhel67 = ( 'ifs-kernel-updates' );
my @delta_kernel_srpms_sles = ( 'compat-rdma' );
my @delta_kernel_srpms_sles12_sp2 = ( 'ifs-kernel-updates-kmp-default' );
my @delta_kernel_srpms_rhel73 = ( 'kmod-ifs-kernel-updates' );
......@@ -664,6 +715,12 @@ my @delta_user_srpms_other = (
"mvapich2", "openmpi", "gasnet", "openshmem", "openshmem-test-suite",
"shmem-benchmarks", "srptools", "libibmad", "infiniband-diags", "hfi1_uefi"
);
my @delta_user_srpms_rhel67 = (
"opa-scripts", "libibumad", "ibacm", "mpi-selector",
"libhfi1", "libpsm2", "hfi1-diagtools-sw", "hfidiags", "hfi1-firmware", "hfi1-firmware_debug",
"mvapich2", "openmpi", "gasnet", "openshmem", "openshmem-test-suite",
"shmem-benchmarks", "srptools", "libibmad", "infiniband-diags", "hfi1_uefi"
);
my @delta_user_srpms_rhel72 = (
"opa-scripts", "mpi-selector", "ibacm",
"libhfi1", "libpsm2", "hfi1-diagtools-sw", "hfidiags", "hfi1-firmware", "hfi1-firmware_debug",
......@@ -964,6 +1021,15 @@ my %kmod_ifs_kernel_updates_srpm_info = (
},
);
my %ifs_kernel_updates_rhel67_srpm_info = (
"ifs-kernel-updates" => { Available => "",
Builds => "ifs-kernel-updates ifs-kernel-updates-devel",
PostReq => "ifs-kernel-updates-devel",
PartOf => "", # filled in at runtime
BuildPrereq => [],
},
);
my %delta_srpm_info_other = (
%compat_rdma_srpm_info,
%hfi1_psm_srpm_info,
......@@ -989,6 +1055,31 @@ my %delta_srpm_info_other = (
%hfi1_uefi_srpm_info,
);
my %delta_srpm_info_rhel67 = (
%ifs_kernel_updates_rhel67_srpm_info,
%hfi1_psm_srpm_info,
%libhfi1_srpm_info,
%hfi1_diagtools_sw_srpm_info,
%hfidiags_srpm_info,
%hfi1_firmware_srpm_info,
%hfi1_firmware_debug_srpm_info,
%ib_wfr_lite_srpm_info,
%opa_scripts_srpm_info,
%libibumad_srpm_info,
%ibacm_srpm_info,
%mpi_selector_srpm_info,
%mvapich2_srpm_info,
%openmpi_srpm_info,
%gasnet_srpm_info,
%openshmem_srpm_info,
%openshmem_test_suite_srpm_info,
%shmem_benchmarks_srpm_info,
%srptools_srpm_info,
%libibmad_srpm_info,
%infiniband_diags_srpm_info,
%hfi1_uefi_srpm_info,
);
my %delta_srpm_info_rhel72 = (
%kmod_ifs_kernel_updates_srpm_info,
%hfi1_psm_srpm_info,
......@@ -1175,6 +1266,12 @@ sub init_delta_rpm_info($)
@delta_kernel_srpms = ( @delta_kernel_srpms_rhel70 );
@delta_user_srpms = ( @delta_user_srpms_rhel70 );
%delta_srpm_info = ( %delta_srpm_info_rhel70 );
} elsif ( "$CUR_VENDOR_VER" eq "ES67" ) {
@delta_components = ( @delta_components_rhel67 );
%delta_comp_info = ( %delta_comp_info_rhel67 );
@delta_kernel_srpms = ( @delta_kernel_srpms_rhel67 );
@delta_user_srpms = ( @delta_user_srpms_rhel67 );
%delta_srpm_info = ( %delta_srpm_info_rhel67 );
} else {
@delta_components = ( @delta_components_other );
%delta_comp_info = ( %delta_comp_info_other );
......@@ -1327,6 +1424,11 @@ sub delta_rpm_install_list($$$@)
next if ( $skip_kernelib);
$ret = 1;
}
} elsif ( "$CUR_VENDOR_VER" eq "ES67" ) {
if ( " $package " =~ / ifs-kernel-updates / ) {
next if ( $skip_kernelib);
$ret = 1;
}
} else {
if ( " $package " =~ / compat-rdma / ) {
next if ( $skip_kernelib);
......@@ -2599,7 +2701,11 @@ sub available_opa_stack()
sub installed_delta_opa_stack()
{
my $driver_subdir=$ComponentInfo{'opa_stack'}{'DriverSubdir'};
if ( "$CUR_VENDOR_VER" eq "ES72" || "$CUR_VENDOR_VER" eq "ES73" ) {
if ( "$CUR_VENDOR_VER" eq "ES67" ) {
return ( -e "$ROOT$BASE_DIR/version_delta"
&& rpm_is_installed("libibumad", "user")
&& rpm_is_installed("ifs-kernel-updates", $CUR_OS_VER));
} elsif ( "$CUR_VENDOR_VER" eq "ES72" || "$CUR_VENDOR_VER" eq "ES73" ) {
return ( -e "$ROOT$BASE_DIR/version_delta"
&& rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER));
} elsif ( "$CUR_VENDOR_VER" eq 'ES122' ) {
......@@ -2747,6 +2853,9 @@ sub install_opa_stack($$)
check_rpm_config_file("/etc/logrotate.d/srp_daemon");
check_rpm_config_file("/etc/rsyslog.d/srp_daemon.conf");
# Start rdma on run level 235 on RHEL67
run_rdma_on_startup();
need_reboot();
$ComponentWasInstalled{'opa_stack'}=1;
}
......@@ -2867,7 +2976,11 @@ sub available_intel_hfi()
sub installed_intel_hfi()
{
my $driver_subdir=$ComponentInfo{'intel_hfi'}{'DriverSubdir'};
if ( "$CUR_VENDOR_VER" eq "ES72" || "$CUR_VENDOR_VER" eq "ES73" ) {
if ( "$CUR_VENDOR_VER" eq "ES67" ) {
return ( -e "$ROOT$BASE_DIR/version_delta"
&& rpm_is_installed("libhfi1", "user")
&& rpm_is_installed("ifs-kernel-updates", $CUR_OS_VER));
} elsif ( "$CUR_VENDOR_VER" eq "ES72" || "$CUR_VENDOR_VER" eq "ES73" ) {
return (rpm_is_installed("libhfi1", "user")
&& -e "$ROOT$BASE_DIR/version_delta"
&& rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER));
......@@ -3111,9 +3224,8 @@ sub available_opa_stack_dev()
sub installed_opa_stack_dev()
{
return ((rpm_is_installed("libibumad-devel", "user")
&& -e "$ROOT$BASE_DIR/version_delta")
|| installed_ibdev);
return (rpm_is_installed("libibumad-devel", "user")
&& -e "$ROOT$BASE_DIR/version_delta");
}
# only called if installed_opa_stack_dev is true
......@@ -3122,7 +3234,7 @@ sub installed_version_opa_stack_dev()
if ( -e "$ROOT$BASE_DIR/version_delta" ) {
return `cat $ROOT$BASE_DIR/version_delta`;
} else {
return installed_version_ibdev;
return "";
}
}
......@@ -3183,10 +3295,6 @@ sub uninstall_opa_stack_dev($$)
print_uninstall_banner_delta_comp('opa_stack_dev');
uninstall_delta_comp('opa_stack_dev', $install_list, $uninstalling_list, 'verbose');
$ComponentWasInstalled{'opa_stack_dev'}=0;
if (installed_ibdev) {
print_separator;
uninstall_ibdev("", " ibdev ");
}
}
# ==========================================================================
......@@ -3228,7 +3336,10 @@ sub available_delta_ipoib()
sub installed_delta_ipoib()
{
my $driver_subdir=$ComponentInfo{'delta_ipoib'}{'DriverSubdir'};
if ( "$CUR_VENDOR_VER" eq "ES72" || "$CUR_VENDOR_VER" eq "ES73" ) {
if ( "$CUR_VENDOR_VER" eq "ES67" ) {
return (( -e "$ROOT$BASE_DIR/version_delta"
&& rpm_is_installed("ifs-kernel-updates", $CUR_OS_VER)));
} elsif ( "$CUR_VENDOR_VER" eq "ES72" || "$CUR_VENDOR_VER" eq "ES73" ) {
return ((-e "$ROOT$BASE_DIR/version_delta"
&& rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER)));
} elsif ( "$CUR_VENDOR_VER" eq "ES122" ) {
......
#!/usr/bin/perl
# BEGIN_ICS_COPYRIGHT8 ****************************************
#
# Copyright (c) 2015, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Intel Corporation nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# END_ICS_COPYRIGHT8 ****************************************
# [ICS VERSION STRING: unknown]
use strict;
#use Term::ANSIColor;
#use Term::ANSIColor qw(:constants);
#use File::Basename;
#use Math::BigInt;
# ==========================================================================
# IB Development installation
sub available_ibdev
{
my $srcdir=$ComponentInfo{'ibdev'}{'SrcDir'};
return ( -d "$srcdir/include/iba" );
}
sub installed_ibdev
{
return( -d "$ROOT/usr/include/iba" );
}
# only called if installed_ibdev is true
sub installed_version_ibdev
{
if ( -e "$ROOT$BASE_DIR/version" ) {
return `cat $ROOT$BASE_DIR/version`;
} else {
return "";
}
}
# only called if available_ibdev is true
sub media_version_ibdev
{
my $srcdir=$ComponentInfo{'ibdev'}{'SrcDir'};
return `cat "$srcdir/version"`;
}
sub build_ibdev
{
my $osver = $_[0];
my $debug = $_[1]; # enable extra debug of build itself
my $build_temp = $_[2]; # temp area for use by build
my $force = $_[3]; # force a rebuild
return 0; # success
}
sub need_reinstall_ibdev($$)
{
my $install_list = shift(); # total that will be installed when done
my $installing_list = shift(); # what items are being installed/reinstalled
return "no";
}
sub preinstall_ibdev
{
my $install_list = $_[0]; # total that will be installed when done
my $installing_list = $_[1]; # what items are being installed/reinstalled
return 0; # success
}
sub install_ibdev
{
my $install_list = $_[0]; # total that will be installed when done
my $installing_list = $_[1]; # what items are being installed/reinstalled
my $srcdir=$ComponentInfo{'ibdev'}{'SrcDir'};
my $version=media_version_ibdev();
chomp $version;
printf("Installing $ComponentInfo{'ibdev'}{'Name'} $version $DBG_FREE...\n");
LogPrint "Installing $ComponentInfo{'ibdev'}{'Name'} $version $DBG_FREE for $CUR_OS_VER\n";
remove_oldarlib("$OLD_LIB_DIR/libcm.a");
copy_arlib_file("$srcdir/bin/$ARCH/$CUR_OS_VER/lib/$DBG_FREE/libcm.a", "$LIB_DIR/libcm.a");
remove_oldarlib("$OLD_LIB_DIR/libib_mgt.a");
copy_arlib_file("$srcdir/bin/$ARCH/$CUR_OS_VER/lib/$DBG_FREE/libib_mgt.a", "$LIB_DIR/libib_mgt.a");
# Copy all iba include files
check_dir("/usr/include/iba");
check_dir("/usr/include/linux/iba");
copy_all_data_files("$srcdir/include/iba", "/usr/include/iba", "");
copy_all_data_files("$srcdir/include/linux/iba", "/usr/include/linux/iba", "");
copy_data_file("$srcdir/include/dsc_export.h", "/usr/include/dsc_export.h");
copy_data_file("$srcdir/include/ipoib_export.h", "/usr/include/ipoib_export.h");
vapi_dev("install");
# remove samples installed in old location
remove_installed_files "/usr/local/src/iba_samples";
# Copy all ib sample applications
check_dir("/usr/lib/opa/src");
check_dir("/usr/lib/opa/src/iba_samples");
copy_all_data_files("$srcdir/iba_samples", "/usr/lib/opa/src/iba_samples");
system "cd $ROOT/usr/lib/opa/src/iba_samples; find . -type d| while read dir; do mv \$dir/Makefile.sample \$dir/Makefile 2>/dev/null; done 2>/dev/null";
system "cd $srcdir/iba_samples; find . | sed -e 's/Makefile.sample/Makefile/' > $ROOT/usr/lib/opa/src/iba_samples/.files 2>/dev/null";
system "cd $srcdir/iba_samples; find * -maxdepth 1 -type d > $ROOT/usr/lib/opa/src/iba_samples/.dirs 2>/dev/null";
$ComponentWasInstalled{'ibdev'}=1;
}
sub postinstall_ibdev
{
my $install_list = $_[0]; # total that will be installed when done
my $installing_list = $_[1]; # what items are being installed/reinstalled
}
sub uninstall_ibdev
{
my $install_list = $_[0]; # total that will be left installed when done
my $uninstalling_list = $_[1]; # what items are being uninstalled
NormalPrint("Uninstalling $ComponentInfo{'ibdev'}{'Name'}...\n");
remove_oldarlib("$OLD_LIB_DIR/libcm.a");
system "rm -rf $ROOT$LIB_DIR/libcm.a";
remove_oldarlib("$OLD_LIB_DIR/libib_mgt.a");
system "rm -rf $ROOT$LIB_DIR/libib_mgt.a";
vapi_dev("uninstall");
system "rm -rf $ROOT/usr/include/iba";
system "rm -rf $ROOT/usr/include/linux/iba";
system "rm -rf $ROOT/usr/include/dsc_export.h";
system "rm -rf $ROOT/usr/include/ipoib_export.h";
# remove iba_samples we installed or user compiled, however do not remove
# any logs or other files the user may have created
remove_installed_files "/usr/lib/opa/src/iba_samples";
system "rmdir $ROOT/usr/lib/opa/src 2>/dev/null";
system "rmdir $ROOT/usr/lib/opa 2>/dev/null";
remove_installed_files "/usr/local/src/iba_samples";
$ComponentWasInstalled{'ibdev'}=0;
}
......@@ -3120,9 +3120,8 @@ sub available_opa_stack_dev()
sub installed_opa_stack_dev()
{
return ((rpm_is_installed("libibverbs-devel", "user")
&& -e "$ROOT$BASE_DIR/version_ofed")
|| installed_ibdev);
return (rpm_is_installed("libibverbs-devel", "user")
&& -e "$ROOT$BASE_DIR/version_ofed");
}
# only called if installed_opa_stack_dev is true
......@@ -3131,7 +3130,7 @@ sub installed_version_opa_stack_dev()
if ( -e "$ROOT$BASE_DIR/version_ofed" ) {
return `cat $ROOT$BASE_DIR/version_ofed`;
} else {
return installed_version_ibdev;
return "";
}
}
......@@ -3192,10 +3191,6 @@ sub uninstall_opa_stack_dev($$)
print_uninstall_banner_ofed_comp('opa_stack_dev');
uninstall_ofed_comp('opa_stack_dev', $install_list, $uninstalling_list, 'verbose');
$ComponentWasInstalled{'opa_stack_dev'}=0;
if (installed_ibdev) {
print_separator;
uninstall_ibdev("", " ibdev ");
}
}
# ==========================================================================
......
......@@ -306,7 +306,7 @@ elif [ "$Oflag" = y ]
then
PREREQ+=('libpsm2')
openmpi_conf_psm='--with-psm=/usr --with-psm2=/usr --disable-oshmem'
openmpi_conf_psm='--with-psm=/usr --with-psm2=/usr --disable-oshmem --with-libfabric'
# PSM indicated by qlc suffix so user can ID PSM vs verbs MPIs
openmpi_path_suffix="-hfi"
openmpi_rpm_suffix="_hfi"
......
# -- All OPA Settings Start here --
# [ICS VERSION STRING: unknown]
# User space Infiniband verbs require memlock permissions
# if desired you can limit these permissions to the users permitted to use OPA
# and/or reduce the limits. Keep in mind this limit is per user
# (not per process)
* hard memlock unlimited
* soft memlock unlimited
# -- All OPA Settings End here --
......@@ -1709,6 +1709,144 @@ START:
@INSTALL_CHOICES = ( $inp );
}
my @prereq_components_rhel72 = (
"libibmad",
"libibumad",
"libibumad-devel",
"libibverbs",
"librdmacm",
"libibcm",
"qperf",
"perftest",
"rdma",
"infinipath-psm",
"expat",
"elfutils-libelf-devel",
"libstdc++-devel",
"gcc-gfortran",
"atlas",
"tcl",
"expect",
"tcsh",
"sysfsutils",
"pciutils",
"bc",
"rpm-build",
"redhat-rpm-config",
"kernel-devel",
);
my @prereq_components_rhel73 = (
"libibmad",
"libibumad",
"libibumad-devel",
"libibverbs",
"librdmacm",
"libibcm",
"qperf",
"perftest",
"rdma",
"infinipath-psm",
"libhfi1",
"expat",
"elfutils-libelf-devel",
"libstdc++-devel",
"gcc-gfortran",
"atlas",
"tcl",
"expect",
"tcsh",
"sysfsutils",
"pciutils",
"bc",
"rpm-build",
"redhat-rpm-config",
"kernel-devel",
);
my @prereq_components_sles12 = (
"libibverbs1",
"librdmacm1",
"libibcm1",
"qperf",
"perftest",
"rdma",
"opensm-libs3",
"libpsm_infinipath1",
"libexpat1",
"libelf-devel",
"gcc-fortran",
"libudev-devel",
"bc",
"rpm-build",
"kernel-devel",
);
my @prereq_components_sles12_sp2 = (
"libibmad5",
"libibumad3",
"libibumad-devel",
"libibverbs1",
"librdmacm1",
"libibcm1",
"ibacm",
"qperf",
"perftest",
"rdma",
"opensm-devel",
"opensm-libs3",
"libpsm_infinipath1",
"libhfi1verbs-rdmav2",
"libexpat1",
"libelf-devel",
"gcc-fortran",
"libudev-devel",
"bc",
"rpm-build",
"kernel-devel",
);
my @prereq_components = ( );
my $prereq_abort = 0;
sub check_installation
{
my $package = shift;
my $checkval;
$checkval = `rpm -q $package | grep 'not installed'`;
if ($checkval eq '') {
} else {
$prereq_abort = 1;
NormalPrint ("$checkval");
}
}
sub verify_install_prereq
{
#Check Prerequisites for supported distributions only
if ("$CUR_DISTRO_VENDOR" eq 'SuSE'
&& ("$CUR_VENDOR_VER" eq 'ES12' || "$CUR_VENDOR_VER" eq 'ES121')) {
@prereq_components = ( @prereq_components_sles12 );
} elsif ("$CUR_DISTRO_VENDOR" eq 'SuSE'
&& "$CUR_VENDOR_VER" eq 'ES122') {
@prereq_components = ( @prereq_components_sles12_sp2 );
} elsif ( "$CUR_VENDOR_VER" eq "ES73" ) {
@prereq_components = ( @prereq_components_rhel73 );
} elsif ( "$CUR_VENDOR_VER" eq "ES72" ) {
@prereq_components = ( @prereq_components_rhel72 );
} else {
return
}
foreach (@prereq_components){
check_installation( $_ );
}
if ($prereq_abort == "1"){
Abort "Please install prerequisite package";
}
}
determine_os_version;
init_components;
......@@ -1731,6 +1869,7 @@ if ( ! $Default_Build ) {
if ($allow_install) {
verify_distrib_files;
}
verify_install_prereq
}
foreach my $comp ( @OmniPathAllComponents )
......
......@@ -240,7 +240,7 @@ sub os_vendor_version($)
# to the left of the decimal point.
$rval = `cat /etc/redhat-release`;
$rval =~ m/(\d+).(\d+)/;
$rval="ES".$1;
$rval="ES".$1.$2;
} elsif (!system("grep -qi Scientific /etc/redhat-release")) {
# Find a number of the form "#.#" and output the portion
# to the left of the decimal point.
......@@ -253,7 +253,8 @@ sub os_vendor_version($)
$rval=`cat /etc/redhat-release | cut -d' ' -f7 | cut -d'.' -f1`;
$mn=`cat /etc/redhat-release | cut -d' ' -f7 | cut -d'.' -f2`;
chop($rval);
if (($rval >= 7) && ($mn > 0)){
if ( (($rval >= 7) && ($mn > 0)) ||
(($rval == 6) && ($mn >= 7)) ) {
chomp($mn);
$rval=join "","ES","$rval","$mn";
} else {
......
......@@ -41,10 +41,12 @@ use strict;
my $MODULE_CONF_FILE = "/etc/modules.conf";
my $MODULE_CONF_DIST_FILE;
my $DRACUT_EXE_FILE = "/usr/bin/dracut";
if (substr($CUR_OS_VER,0,3) eq "2.6")
{
$MODULE_CONF_FILE = "/etc/modprobe.conf";
$MODULE_CONF_DIST_FILE = "/etc/modprobe.conf.dist";
$DRACUT_EXE_FILE = "/sbin/dracut";
}
if (-f "$(MODULE_CONF_FILE).local")
{
......@@ -121,6 +123,16 @@ sub disable_distro_ofed()
}
}
# Start rdma on run level 235 on RHEL67
sub run_rdma_on_startup()
{
if (-e "/etc/redhat-release") {
if (6.7 == `cat \"/etc/redhat-release\" | grep -o [0-9]\.[0-9]`) {
system ("chkconfig --level 235 rdma on");
}
}
}
# =============================================================================
# The functions and constants below assist in editing limits.conf
# to add IB specific entries related to memory locking
......@@ -254,7 +266,7 @@ sub rebuild_ramdisk()
# Call dracut once only at the end of INSTALL
END {
if ($CallDracut && -d '/boot') {
my $cmd = "/usr/bin/dracut";
my $cmd = $DRACUT_EXE_FILE;
my $kver = `uname -r | xargs echo -n`;
my $tmpfile = "/tmp/initramfs-$kver.img";
......@@ -353,7 +365,17 @@ sub set_opairqbalance()
my ($new_args) = $original_args;
$new_args =~ s/--hintpolicy=[a-z]*//;
$new_args =~ s/-h [a-z]*//;
$new_args = "$new_args --hintpolicy=exact";
# In RHEL6.7 systems, irqbalance throws error if IRQBALANCE_ARGS
# starts with a space character.
# Swap the args to avoid leading space character when ${new_args} is empty
if (-e "/etc/redhat-release" &&
6 == `cat \"/etc/redhat-release\" | grep -o [0-9]\.[0-9] | cut -d\. -f1`) {
$new_args = "--hintpolicy=exact ${new_args}";
}
else {
$new_args = "$new_args --hintpolicy=exact";
}
if ($original_line eq "") {
# If there were no arguments in the existing file, just append.
......@@ -385,5 +407,11 @@ sub set_opairqbalance()
}
# Make sure irqbalance is enabled and started.
`systemctl enable irqbalance; systemctl restart irqbalance`
if (substr($CUR_OS_VER,0,3) eq "2.6") {
`/sbin/chkconfig irqbalance on; service irqbalance restart`
}
else {
`systemctl enable irqbalance; systemctl restart irqbalance`
}
}
......@@ -285,13 +285,13 @@ extern uint32_t cs_log_masks[VIEO_LAST_MOD_ID+1];
#define IB_LOG_MOD_FMT0(sev, modid, p1) \
IB_LOG_MOD_FMT_DATA(sev, modid, "%s%s%s%s%s", p1, 0)
#define IB_LOG_FMTU(sev, p1, p2) \
IB_LOG_FMT_DATA(sev, "%s%s%s%s%s %"CS64u, p1, (LogVal64_t)p2)
IB_LOG_FMT_DATA(sev, "%s%s%s%s%s %u", p1, (LogVal_t)p2)
#define IB_LOG_MOD_FMTU(sev, modid, p1, p2) \
IB_LOG_MOD_FMT_DATA(sev, modid, "%s%s%s%s%s %"CS64u, p1, (LogVal64_t)p2)
IB_LOG_MOD_FMT_DATA(sev, modid, "%s%s%s%s%s %u", p1, (LogVal_t)p2)
#define IB_LOG_FMTX(sev, p1, p2) \
IB_LOG_FMT_DATA(sev, "%s%s%s%s%s 0x%"CS64x, p1, (LogVal64_t)p2)
IB_LOG_FMT_DATA(sev, "%s%s%s%s%s 0x%x", p1, (LogVal_t)p2)
#define IB_LOG_MOD_FMTX(sev, modid, p1, p2) \
IB_LOG_MOD_FMT_DATA(sev, modid, "%s%s%s%s%s 0x%"CS64x, p1, (LogVal64_t)p2)
IB_LOG_MOD_FMT_DATA(sev, modid, "%s%s%s%s%s 0x%x", p1, (LogVal_t)p2)