# @name SMP CPU Affinity with Ethernet
# @desc Check that ethernet processes assigned to multiple CPUs complete without errors
# @requires smp && net
# @setup_requires 

SMP_S_FUNC_ETH_PING_CPUAFFINITY_NO-LB_CORE1 source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING" -l "-n 10 -a 0x1 -d 0" 

SMP_S_FUNC_ETH_PING_CPUAFFINITY_NO-LB_CORE2 source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING" -l "-n 10 -a 0x2 -d 0"

SMP_S_FUNC_ETH_PING_CPUAFFINITY_NO-LB_CORE1_CORE2 source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING" -l "-n 10 -a 0x1 -d 0" -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING" -l "-n 10 -a 0x2 -d 0"

SMP_L_STRESS_ETH_PING_CPUAFFINITY_NO-LB_CORE1_CORE2 source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING" -l "-n 100 -a 0x1 -d 0" -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING" -l "-n 100 -a 0x2 -d 0"

SMP_M_STRESS_ETH_PING_300S_CPUAFFINITY_NO-LB_CORE1_CORE2 source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_S_FUNC_PING_300S" -l "-n 10 -a 0x1 -d 0" -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_S_FUNC_PING_300S" -l "-n 10 -a 0x2 -d 0"

SMP_S_FUNC_ETH_PING_CPUAFFINITY_LB source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING" -l "-n 20 -a 0xFFFFFFFF -d 0"
