# @name SMP IRQ Affinity
# @desc Check that interrupts assigned to different CPUs complete without errors
# @requires smp
# @setup_requires 
SMP_S_FUNC_IRQAFF_ETH_NOLB_C1 source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && (IRQ=`get_irq_for_iface.sh -i 'eth'` && PRE=`get_num_interrupts_for_irq.sh -i $IRQ -c 0` && echo "1" > /proc/irq/$IRQ/smp_affinity  && run_processes.sh -c "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_S_FUNC_PING" && POST=`get_num_interrupts_for_irq.sh -i $IRQ -c 0` && [[ $POST -gt $PRE ]] )

SMP_S_FUNC_IRQAFF_ETH_NOLB_C2 source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && (IRQ=`get_irq_for_iface.sh -i 'eth'` && PRE=`get_num_interrupts_for_irq.sh -i $IRQ -c 1` && echo "2" > /proc/irq/$IRQ/smp_affinity  && run_processes.sh -c "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_S_FUNC_PING" && POST=`get_num_interrupts_for_irq.sh -i $IRQ -c 1` && [[ $POST -gt $PRE ]] )

SMP_M_FUNC_IRQAFF_ETH_LB source 'common.sh';  num_cores=`cat /sys/devices/system/cpu/online`; echo $num_cores | grep -E '[[:digit:]]+\-' > /dev/null && (IRQ=`get_irq_for_iface.sh -i 'eth'` && echo "3" > /proc/irq/$IRQ/smp_affinity  && run_processes.sh -c "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_S_FUNC_PING" ) 
