Lines Matching +full:rx +full:- +full:eq

2 # SPDX-License-Identifier: GPL-2.0
29 if [[ -f $relative_path/forwarding.config ]]; then
38 tc -j &> /dev/null
39 if [[ $? -ne 0 ]]; then
48 if [[ $? -ne 0 ]]; then
57 if [[ $? -ne 0 ]]; then
65 tc actions help 2>&1 | grep -q hw_stats
66 if [[ $? -ne 0 ]]; then
72 if [[ "$(id -u)" -ne 0 ]]; then
85 if [[ ! -x "$(command -v "$cmd")" ]]; then
94 if [[ ! -v NUM_NETIFS ]]; then
104 while [[ $# -gt 0 ]]; do
105 if [[ "$count" -eq "0" ]]; then
107 declare -A NETIFS
125 if [[ $? -ne 0 ]]; then
128 if [[ $? -ne 0 ]]; then
154 if [[ $? -ne 0 ]]; then
165 # Per-test return value. Clear at the beginning of each test.
173 if [[ $RET -eq 0 && $err -ne 0 ]]; then
184 if [[ $RET -eq 0 && $err -eq 0 ]]; then
208 if [[ $# -eq 2 ]]; then
212 if [[ $RET -ne 0 ]]; then
214 printf "TEST: %-60s [FAIL]\n" "$test_name $opt_str"
215 if [[ ! -z "$retmsg" ]]; then
226 printf "TEST: %-60s [ OK ]\n" "$test_name $opt_str"
241 local start_time="$(date -u +%s%3N)"
248 echo -n "$out"
252 local current_time="$(date -u +%s%3N)"
253 if ((current_time - start_time > timeout)); then
254 echo -n "$out"
274 if [ "$1" == "-v" ]; then
284 "$@" | grep -q offload
308 local wait_time=${1:-$WAIT_TIME}; shift
322 local max_iterations=${1:-$WAIT_TIMEOUT}; shift
323 local wait_time=${1:-$WAIT_TIME}; shift
329 if [[ $? -ne 0 ]]; then
342 local num_netifs=${1:-$NUM_NETIFS}
364 if [[ $ret -ne 0 ]]; then
367 output=$(echo $output | jq -r $jq_opts "$jq_exp")
369 if [[ $ret -ne 0 ]]; then
373 # return success only in case of non-empty output
374 [ ! -z "$output" ]
381 while lldptool -t -i $dev -V APP -c app | grep -Eq "pending|unknown"; do
393 # weirdness as newly-added APP rules conflict with the old ones,
408 ip -4 rule add pref 32765 table local
409 ip -4 rule del pref 0
410 ip -6 rule add pref 32765 table local
411 ip -6 rule del pref 0
416 ip -6 rule add pref 0 table local
417 ip -6 rule del pref 32765
418 ip -4 rule add pref 0 table local
419 ip -4 rule del pref 32765
423 declare -A __TB_IDS
450 ip -4 route add table $tb_id unreachable default metric 4278198272
451 ip -6 route add table $tb_id unreachable default metric 4278198272
462 ip -6 route del table $tb_id unreachable default metric 4278198272
463 ip -4 route del table $tb_id unreachable default metric 4278198272
584 $TEAMD -t $if_name -d -c '{"runner": {"name": "'$mode'"}}'
597 $TEAMD -t $if_name -k
604 ip -j link show dev $if_name | jq -r '.[]["master"]'
613 ip -j -s link show dev $if_name \
624 link_stats_get $1 rx errors
632 local selector=${1:-.packets}; shift
634 tc -j -s filter show dev $dev ${dir:-ingress} pref $pref \
642 local selector=${1:-.packets}; shift
644 tc -j -s filter show $id \
654 ethtool -S $dev | grep "^ *$stat:" | head -n 1 | cut -d: -f2
663 tc -j -s qdisc show dev "$dev" \
673 tc -j -s qdisc show dev "$dev" invisible \
698 echo $((8 * (t1 - t0) / interval))
705 ip -j link show dev $if_name | jq -r '.[]["address"]'
714 ageing_time=$(ip -j -d link show dev $bridge \
719 declare -A SYSCTL_ORIG
725 SYSCTL_ORIG[$key]=$(sysctl -n $key)
726 sysctl -qw $key=$value
733 sysctl -qw $key=${SYSCTL_ORIG["$key"]}
748 declare -A MTU_ORIG
754 MTU_ORIG["$dev"]=$(ip -j link show dev $dev | jq -e '.[].mtu')
767 local num_netifs=${1:-$NUM_NETIFS}
770 ethtool -k ${NETIFS[p$i]} \
771 | grep "hw-tc-offload: on" &> /dev/null
772 if [[ $? -ne 0 ]]; then
785 # Some devices may not support or need in-hardware trapping of traffic
786 # (e.g. the veth pairs that this library creates for non-existent
806 # For slow-path testing, we need to install a trap to get to
934 for current_test in ${TESTS:-$ALL_TESTS}; do
950 if [[ "$weight_rp12" -gt "$weight_rp13" ]]; then
952 | bc -l)
955 | bc -l)
958 if [[ "$packets_rp12" -eq "0" || "$packets_rp13" -eq "0" ]]; then
965 if [[ "$weight_rp12" -gt "$weight_rp13" ]]; then
967 | bc -l)
970 | bc -l)
973 diff=$(echo $weights_ratio - $packets_ratio | bc -l)
974 diff=${diff#-}
976 test "$(echo "$diff / $weights_ratio > 0.15" | bc -l)" -eq 0
986 ip netns exec $name bash <<-EOF
1005 $PING $args $dip -c 10 -i 0.1 -w $PING_TIMEOUT &> /dev/null
1026 $PING6 $args $dip -c 10 -i 0.1 -w $PING_TIMEOUT &> /dev/null
1049 bridge -j fdb show br $bridge brport $br_port1 \
1050 | jq -e ".[] | select(.mac == \"$mac\")" &> /dev/null
1062 $MZ $host2_if -c 1 -p 64 -b $mac -t ip -q
1065 tc -j -s filter show dev $host1_if ingress \
1066 | jq -e ".[] | select(.options.handle == 101) \
1070 $MZ $host1_if -c 1 -p 64 -a $mac -t ip -q
1073 bridge -j fdb show br $bridge brport $br_port1 \
1074 | jq -e ".[] | select(.mac == \"$mac\")" &> /dev/null
1077 $MZ $host2_if -c 1 -p 64 -b $mac -t ip -q
1080 tc -j -s filter show dev $host1_if ingress \
1081 | jq -e ".[] | select(.options.handle == 101) \
1086 # record was aged-out.
1090 bridge -j fdb show br $bridge brport $br_port1 \
1091 | jq -e ".[] | select(.mac == \"$mac\")" &> /dev/null
1096 $MZ $host1_if -c 1 -p 64 -a $mac -t ip -q
1099 bridge -j fdb show br $bridge brport $br_port1 \
1100 | jq -e ".[] | select(.mac == \"$mac\")" &> /dev/null
1128 $MZ $host1_if -c 1 -p 64 -b $mac -B $ip -t ip -q
1131 tc -j -s filter show dev $host2_if ingress \
1132 | jq -e ".[] | select(.options.handle == 101) \
1134 if [[ $? -ne 0 && $should_flood == "true" || \
1135 $? -eq 0 && $should_flood == "false" ]]; then
1210 $MZ $h_in -p 8000 -A $sip -B $dip -c 0 \
1211 -a own -b $dmac -t "$proto" -q "$@" &
1239 if [ -z $ns ]; then
1245 if [ -z $SUDO_USER ] ; then
1248 capuser="-Z $SUDO_USER"
1251 $ns_cmd tcpdump -e -n -Q in -i $if_name \
1252 -s 65535 -B 32768 $capuser -w $capfile > "$capout" 2>&1 &
1271 tcpdump -e -n -r $capfile 2>&1