[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.147.57.239: ~ $
#!/bin/bash
#
# Bring up the kernel RDMA stack
#
# This is usually run automatically by systemd after a hardware activation
# event in udev has triggered a start of the rdma.service unit
#

shopt -s nullglob

CONFIG=/etc/rdma/rdma.conf

LOAD_ULP_MODULES=""
LOAD_CORE_USER_MODULES="ib_umad ib_uverbs ib_ucm rdma_ucm"
LOAD_CORE_CM_MODULES="iw_cm ib_cm rdma_cm"
LOAD_CORE_MODULES="ib_core"
LOAD_TECH_PREVIEW_DRIVERS="no"

if [ -f $CONFIG ]; then
    . $CONFIG

    if [ "${RDS_LOAD}" == "yes" ]; then
        IPOIB_LOAD=yes
    fi

    if [ "${IPOIB_LOAD}" == "yes" ]; then
	LOAD_ULP_MODULES="ib_ipoib"
    fi

    if [ "${RDS_LOAD}" == "yes" -a -f /lib/modules/`uname -r`/kernel/net/rds/rds.ko ]; then
	LOAD_ULP_MODULES="$LOAD_ULP_MODULES rds"
	if [ -f /lib/modules/`uname -r`/kernel/net/rds/rds_tcp.ko ]; then
	    LOAD_ULP_MODULES="$LOAD_ULP_MODULES rds_tcp"
	fi
	if [ -f /lib/modules/`uname -r`/kernel/net/rds/rds_rdma.ko ]; then
	    LOAD_ULP_MODULES="$LOAD_ULP_MODULES rds_rdma"
	fi
    fi

    if [ "${SRP_LOAD}" == "yes" ]; then
	LOAD_ULP_MODULES="$LOAD_ULP_MODULES ib_srp"
    fi

    if [ "${SRPT_LOAD}" == "yes" ]; then
	LOAD_ULP_MODULES="$LOAD_ULP_MODULES ib_srpt"
    fi

    if [ "${ISER_LOAD}" == "yes" ]; then
	LOAD_ULP_MODULES="$LOAD_ULP_MODULES ib_iser"
    fi

    if [ "${ISERT_LOAD}" == "yes" ]; then
	LOAD_ULP_MODULES="$LOAD_ULP_MODULES ib_isert"
    fi

    if [ "${XPRTRDMA_LOAD}" == "yes" ]; then
	LOAD_ULP_MODULES="$LOAD_ULP_MODULES xprtrdma"
    fi

    if [ "${SVCRDMA_LOAD}" == "yes" ]; then
	LOAD_ULP_MODULES="$LOAD_ULP_MODULES svcrdma"
    fi
    if [ "${TECH_PREVIEW_LOAD}" == "yes" ]; then
        LOAD_TECH_PREVIEW_DRIVERS="$TECH_PREVIEW_LOAD"
    fi
else
    LOAD_ULP_MODULES="ib_ipoib"
fi

# If module $1 is loaded return - 0 else - 1
is_loaded()
{
    /sbin/lsmod | grep -w "$1" > /dev/null 2>&1
    return $?
}

load_modules()
{
    local RC=0

    for module in $*; do
	if ! /sbin/modinfo $module > /dev/null 2>&1; then
	    # do not attempt to load modules which do not exist
	    continue
	fi
	if ! is_loaded $module; then
	    /sbin/modprobe $module
	    res=$?
	    RC=$[ $RC + $res ]
	    if [ $res -ne 0 ]; then
		echo
		echo "Failed to load module $module"
	    fi
	fi
    done
    return $RC
}

load_hardware_modules()
{
    local -i RC=0

    # We match both class NETWORK and class INFINIBAND devices since our
    # iWARP hardware is listed under class NETWORK.  The side effect of
    # this is that we might cause a non-iWARP network driver to be loaded.
    udevadm trigger --subsystem-match=pci --attr-nomatch=driver --attr-match=class=0x020000 --attr-match=class=0x0c0600
    udevadm settle
    if [ -r /proc/device-tree ]; then
	if [ -n "`ls /proc/device-tree | grep lhca`" ]; then
	    if ! is_loaded ib_ehca; then
		load_modules ib_ehca
		RC+=$?
	    fi
	fi
    fi
    if is_loaded mlx4_core -a ! is_loaded mlx4_ib; then
        load_modules mlx4_ib
	RC+=$?
    fi
    if is_loaded mlx4_core -a ! is_loaded mlx4_en; then
        load_modules mlx4_en
	RC+=$?
    fi
    if is_loaded mlx5_core -a ! is_loaded mlx5_ib; then
	load_modules mlx5_ib
	RC+=$?
    fi
    if is_loaded cxgb3 -a ! is_loaded iw_cxgb3; then
	load_modules iw_cxgb3
	RC+=$?
    fi
    if is_loaded cxgb4 -a ! is_loaded iw_cxgb4; then
	load_modules iw_cxgb4
	RC+=$?
    fi
    if is_loaded enic -a ! is_loaded usnic_verbs; then
	load_modules usnic_verbs
	RC+=$?
    fi
    if is_loaded i40e -a ! is_loaded i40iw; then
	load_modules i40iw
	RC+=$?
    fi
    if [ "${LOAD_TECH_PREVIEW_DRIVERS}" == "yes" ]; then
        if is_loaded be2net -a ! is_loaded ocrdma; then
	    load_modules ocrdma
	    RC+=$?
        fi
    fi
    return $RC
}

errata_58()
{
    # Check AMD chipset issue Errata #58
    if test -x /sbin/lspci && test -x /sbin/setpci; then
	if ( /sbin/lspci -nd 1022:1100 | grep "1100" > /dev/null ) &&
	   ( /sbin/lspci -nd 1022:7450 | grep "7450" > /dev/null ) &&
	   ( /sbin/lspci -nd 15b3:5a46 | grep "5a46" > /dev/null ); then
	    CURVAL=`/sbin/setpci -d 1022:1100 69`
	    for val in $CURVAL
	    do
		if [ "${val}" != "c0" ]; then
		    /sbin/setpci -d 1022:1100 69=c0
		    if [ $? -eq 0 ]; then
			break
		    else
			echo "Failed to apply AMD-8131 Errata #58 workaround"
		    fi
		fi
	    done
	fi
    fi
}

errata_56()
{
    # Check AMD chipset issue Errata #56
    if test -x /sbin/lspci && test -x /sbin/setpci; then
	if ( /sbin/lspci -nd 1022:1100 | grep "1100" > /dev/null ) &&
	   ( /sbin/lspci -nd 1022:7450 | grep "7450" > /dev/null ) &&
	   ( /sbin/lspci -nd 15b3:5a46 | grep "5a46" > /dev/null ); then
	    bus=""
	    # Look for devices AMD-8131
	    for dev in `/sbin/setpci -v -f -d 1022:7450 19 | cut -d':' -f1,2`
	    do
		bus=`/sbin/setpci -s $dev 19`
		rev=`/sbin/setpci -s $dev 8`
		# Look for Tavor attach to secondary bus of this devices
		for device in `/sbin/setpci -f -s $bus: -d 15b3:5a46 19`
		do
		    if [ $rev -lt 13 ]; then
			/sbin/setpci -d 15b3:5a44 72=14
			if [ $? -eq 0 ]; then
			    break
			else
			    echo
			    echo "Failed to apply AMD-8131 Errata #56 workaround"
			fi
		    else
			continue
		    fi
		    # If more than one device is on the bus the issue a
		    # warning
		    num=`/sbin/setpci -f -s $bus: 0 | wc -l |  sed 's/\ *//g'`
		    if [ $num -gt 1 ]; then
			echo "Warning: your current PCI-X configuration might be incorrect."
			echo "see AMD-8131 Errata 56 for more details."
		    fi
		done
	    done
	fi
    fi
}


load_hardware_modules
RC=$[ $RC + $? ]
load_modules $LOAD_CORE_MODULES
RC=$[ $RC + $? ]
load_modules $LOAD_CORE_CM_MODULES
RC=$[ $RC + $? ]
load_modules $LOAD_CORE_USER_MODULES
RC=$[ $RC + $? ]
load_modules $LOAD_ULP_MODULES
RC=$[ $RC + $? ]

errata_58
errata_56

/usr/libexec/rdma-set-sriov-vf

exit $RC

Filemanager

Name Type Size Permission Actions
awk Folder 0755
coreutils Folder 0755
dbus-1 Folder 0755
dovecot Folder 0755
gcc Folder 0755
getconf Folder 0755
git-core Folder 0755
grubby Folder 0755
imunify-notifier Folder 0755
initscripts Folder 0755
kcare Folder 0755
linux-boot-probes Folder 0755
man-db Folder 0755
microcode_ctl Folder 0755
openldap Folder 0755
openssh Folder 0755
os-probes Folder 0755
p11-kit Folder 0755
plymouth Folder 0755
selinux Folder 0755
smartmontools Folder 0755
sudo Folder 0755
tuned Folder 0755
utempter Folder 0755
chrony-helper File 6.37 KB 0755
ebtables File 1.66 KB 0755
exim.daemon File 758 B 0755
gam_server File 90.73 KB 0755
generate-rndc-key.sh File 546 B 0755
glib-pacrunner File 15.73 KB 0755
gnupg-pcsc-wrapper File 19.3 KB 0755
gpg-check-pattern File 102.95 KB 0755
gpg-preset-passphrase File 86.39 KB 0755
gpg-protect-tool File 185.57 KB 0755
gpg2keys_curl File 44.81 KB 0755
gpg2keys_finger File 61.34 KB 0755
gpg2keys_hkp File 53 KB 0755
gpg2keys_ldap File 61.02 KB 0755
grepconf.sh File 253 B 0755
mlx4-setup.sh File 2.48 KB 0755
newns File 7.03 KB 0755
nm-dhcp-helper File 15.12 KB 0755
nm-dispatcher File 47.7 KB 0755
nm-iface-helper File 839.36 KB 0755
nm-ifdown File 155 B 0755
nm-ifup File 153 B 0755
platform-python File 6.98 KB 0755
rdma-init-kernel File 5.59 KB 0755
rdma-set-sriov-vf File 3.05 KB 0755
report-command-error File 7.29 MB 0755
run-with-intensity File 9.14 MB 0755
tcawmgr.cgi File 19.56 KB 0755
truescale-serdes.cmds File 8.5 KB 0755
urlgrabber-ext-down File 2.54 KB 0755
virt-what-cpuid-helper File 7.02 KB 0755