#! /bin/bash # exit code is Important should be # -1 : don't continue # 0 : no errors - no need to load mlx share object # 32 : no errors - mlx share object should be loaded (returned by dpdk_setup_ports.py) SYS=`uname -r` if [ -f /etc/debian_version ]; then OS=debian elif [ -f /etc/redhat-release ]; then OS=redhat systemctl stop firewalld.service &> /dev/null else OS=unknown fi MACHINE_TYPE=`uname -m` if [ ${MACHINE_TYPE} != 'x86_64' ]; then echo "ERROR, only 64bit operating systems are supported, please reinstall x86 64 bit OS" exit -1 fi if [ -d /mnt/huge ]; then echo >> /dev/null else echo "Creating huge node" mkdir -p /mnt/huge fi if ! mount | grep hugetlbfs >> /dev/null ; then mount -t hugetlbfs nodev /mnt/huge fi for file in /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages ; do if [ -e $file ] ; then if [ "$(cat $file)" != "2048" ] ; then echo 2048 > $file fi fi done # try to bind the ports from the configuration file (new DPDK) PARENT_ARGS="$0 $@" source find_python.sh $PYTHON ./dpdk_setup_ports.py --parent "$PARENT_ARGS"