#!/bin/bash

# need the PATH for BF ARM lspci to work
PATH=/bin:/sbin:/usr/bin:/usr/sbin

is_bf=`lspci -s 00:00.0 2> /dev/null | grep -wq "PCI bridge: Mellanox Technologies" && echo 1 || echo 0`
if [ $is_bf -ne 1 ]; then
	exit 0
fi

case "$1" in
	p0|p1)
	ethtool -L $1 combined 4
	;;
	*)
	ethtool -L $1 combined 2
	ethtool -G $1 rx 256
	;;
esac
