#!/bin/sh
dev=$1

desc_dev=`/sbin/ethtool -i $dev 2>&1 | grep -c cxgb3`
if [ $desc_dev == 0 ]; then
	exit
fi

in_mod=`grep -c $dev /etc/modprobe.conf`
if [ $in_mod == 0 ]; then
	echo "alias $dev cxgb3" >> /etc/modprobe.conf
fi

# Load TOM
/sbin/modprobe t3_tom

# Run perftune
/sbin/perftune.sh -Ixqq >/dev/null 2>&1
