Lines Matching +full:txrx +full:-

3 #  - Depending on bash 3 (or higher) syntax
8 set -o errexit
10 ## -- General shell logging cmds --
23 if [[ -n "$VERBOSE" ]]; then
28 ## -- Pktgen proc config commands -- ##
67 if [[ ! -e "$proc_ctrl" ]]; then
70 if [[ ! -w "$proc_ctrl" ]]; then
114 if [[ -z "$APPEND" ]] && [[ $EUID -eq 0 ]]; then
119 ## -- General shell tricks --
124 if [ "$EUID" -ne 0 ]; then
125 if [ -x $0 ]; then # Directly executable use sudo
127 sudo -E "$0" "$@"
138 if [[ $node == -1 ]]; then
149 local queues="${IFACE}-.*TxRx"
151 irqs=$(grep "$queues" /proc/interrupts | cut -f1 -d:)
152 [ -z "$irqs" ] && irqs=$(grep $IFACE /proc/interrupts | cut -f1 -d:)
153 [ -z "$irqs" ] && irqs=$(for i in `ls -Ux /sys/class/net/$IFACE/device/msi_irqs` ;\
154 do grep "$i:.*TxRx" /proc/interrupts | grep -v fdir | cut -f 1 -d : ;\
156 [ -z "$irqs" ] && err 3 "Could not find interrupts for $IFACE"
166 local node_cpu_range_list=`cut -f1- -d, --output-delimiter=" " \
171 node_cpu_list="$node_cpu_list "`seq -s " " ${cpu_range//-/ }`
178 function in_between() { [[ ($1 -ge $2) && ($1 -le $3) ]] ; }
186 local sep_cnt=$(tr -cd $sep <<< $1 | wc -c)
195 shrink=( $(grep -E -o "$sep{2,}" <<< $addr) )
196 if [[ ${#shrink[@]} -ne 0 ]]; then
197 if [[ ${#shrink[@]} -gt 1 || ( ${shrink[0]} != $sep2 ) ]]; then
204 [[ ${addr: -1} == $sep ]] && addr=${addr}0
205 echo "${addr/$sep2/$(printf ':0%.s' $(seq $[8-sep_cnt])):}"
212 [[ ${FUNCNAME[1]: -1} == 6 ]] && local IP6=6
215 local max=$[ 2**(len*2)-1 ]
223 if [[ -n $prefix ]]; then
231 IFS=$sep read -a addr <<< $net
255 [[ ${FUNCNAME[1]: -1} == 6 ]] && local IP6=6
262 if [[ -z $prefix ]]; then
273 local remain=$[ bitlen-prefix ]
282 IFS=$sep read -ra ip <<< $net
316 IFS="-" read -ra port_list <<< $port_str
319 max_port=${port_list[1]:-$min_port}
333 if [[ $min_port -le $max_port ]]; then
339 err 5 "Invalid port(s): $min_port-$max_port"