Lines Matching +full:hi +full:- +full:fi
2 # SPDX-License-Identifier: GPL-2.0
38 h1_mac=$(ip -j link show dev ${h1} | jq -e '.[].address')
51 h2_mac=$(ip -j link show dev ${h2} | jq -e '.[].address')
116 echo $(echo "$stats_json" | jq -r "$field_name")
137 $MZ ${h2} -a ${h2_mac} -b ${h1_mac} -p 64 -t icmp echores -c 1
155 if [ ${have_vlan} -eq 1 ]; then
161 fi
167 fi
169 # Most/all? of the KSZ switches do not provide per-TC counters. There
182 if [ ${rx_ipv} -ge 1 ]; then
186 fi
188 if [ ${tx_ipv} -ge 2 ]; then
192 fi
196 local swp1_stats=$(ip -s -j link show dev ${swp1})
197 local swp2_stats=$(ip -s -j link show dev ${swp2})
213 if [ ${ip_v6} -eq 0 ]; then
214 local ip="-a ${h1_mac} -b ${h2_mac} -A ${H1_IPV4} \
215 -B ${H2_IPV4} -t icmp unreach,code=1,dscp=${dscp}"
217 local ip="-6 -a ${h1_mac} -b ${h2_mac} -A ${H1_IPV6} \
218 -B ${H2_IPV6} -t icmp6 type=1,code=0,dscp=${dscp}"
219 fi
221 if [ ${have_vlan} -eq 1 ]; then
222 local vlan_pcp_opt="-Q ${vlan_pcp}:0"
225 fi
226 $MZ ${h1} ${ip} -c ${PING_COUNT} -d 10msec ${vlan_pcp_opt}
231 local swp1_stats=$(ip -s -j link show dev ${swp1})
232 local swp2_stats=$(ip -s -j link show dev ${swp2})
243 local swp1_rx_packets_diff=$((${swp1_rx_packets_after} - \
245 local swp2_tx_packets_diff=$((${swp2_tx_packets_after} - \
252 if [ ${swp1_rx_packets_diff} -lt ${PING_COUNT} ]; then
256 fi
259 if [ ${swp2_tx_packets_diff} -lt ${PING_COUNT} ]; then
263 fi
266 local swp1_rx_bytes_diff=$(($swp1_rx_bytes_after - $swp1_rx_bytes_before))
267 local swp2_tx_bytes_diff=$(($swp2_tx_bytes_after - $swp2_tx_bytes_before))
268 local swp1_rx_hi_diff=$(($swp1_rx_hi_after - $swp1_rx_hi_before))
269 local swp2_tx_hi_diff=$(($swp2_tx_hi_after - $swp2_tx_hi_before))
271 if [ ${expect_rx_high_prio} -eq 1 ]; then
272 swp1_rx_hi_diff=$((${swp1_rx_hi_diff} - \
274 if [ ${swp1_rx_hi_diff} -ne ${swp1_rx_bytes_diff} ]; then
276 echo "RX hi diff: ${swp1_rx_hi_diff}, expected RX bytes diff: ${swp1_rx_bytes_diff}"
278 fi
280 if [ ${swp1_rx_hi_diff} -ne 0 ]; then
282 echo "RX hi diff: ${swp1_rx_hi_diff}, expected 0"
284 fi
285 fi
287 if [ ${expect_tx_high_prio} -eq 1 ]; then
288 swp2_tx_hi_diff=$((${swp2_tx_hi_diff} - \
290 if [ ${swp2_tx_hi_diff} -ne ${swp2_tx_bytes_diff} ]; then
292 echo "TX hi diff: ${swp2_tx_hi_diff}, expected TX bytes diff: ${swp2_tx_bytes_diff}"
294 fi
296 if [ ${swp2_tx_hi_diff} -ne 0 ]; then
298 echo "TX hi diff: ${swp2_tx_hi_diff}, expected 0"
300 fi
301 fi
327 prio="$(dcb -j app show dev ${if_name} default-prio | \
329 if [ -z "${prio}" ]; then
331 fi
348 dcb app replace dev ${swp1} default-prio ${val}
349 if [ $val -ne $(port_default_prio_get ${swp1}) ]; then
352 fi
354 run_test_dscp "Port-default QoS classification, prio: ${val}" \
361 fi
363 dcb app replace dev ${swp1} default-prio ${orig_prio}
364 if [ $orig_prio -ne $(port_default_prio_get ${swp1}) ]; then
366 fi
368 log_test "Port-default QoS classification"
375 dcb -j apptrust show dev ${if_name} | jq -r '.order[]' | \
400 fi
416 dcb app replace dev ${swp1} default-prio ${port_prio}
417 dcb app replace dev ${swp1} dscp-prio ${dscp}:${dscp_prio}
423 run_test_dscp "Apptrust, all disabled. DSCP-prio ${dscp}:${dscp_prio}" \
431 run_test_dscp "Apptrust, PCP enabled. DSCP-prio ${dscp}:${dscp_prio}" \
438 run_test_dscp "Apptrust, DSCP enabled. DSCP-prio ${dscp}:${dscp_prio}" \
447 run_test_dscp "Apptrust, PCP and DSCP are enabled. DSCP-prio ${dscp}:${dscp_prio}" \
457 …run_test_dscp_pcp "Apptrust, PCP and DSCP are enabled. PCP ${pcp_prio}, DSCP-prio ${dscp}:${dscp_p…
466 …run_test_dscp_pcp "Apptrust, PCP and DSCP are enabled. PCP ${pcp_prio}, DSCP-prio ${dscp}:${dscp_p…
472 dcb app replace dev ${swp1} dscp-prio ${dscp}:${dscp_prio}
473 …run_test_dscp_pcp "Apptrust, PCP and DSCP are enabled. PCP ${pcp_prio}, DSCP-prio ${dscp}:${dscp_p…
479 …run_test_dscp_pcp "Apptrust, PCP and DSCP are enabled. PCP ${pcp_prio}, DSCP-prio ${dscp}:${dscp_p…
485 fi
490 fi
492 dcb app replace dev ${swp1} default-prio ${orig_port_prio}
493 if [ $orig_port_prio -ne $(port_default_prio_get ${swp1}) ]; then
495 fi
503 dcb -j app show dev ${if_name} | jq -c '.dscp_prio'
511 dcb app replace dev ${if_name} dscp-prio ${dscp}:${prio}
523 jq --argjson dscp $dscp --argjson prio $prio \
525 tr -d " \n")
532 fi
550 fi
562 jq -r 'map("\(.[0]):\(.[1])") | join(" ")')
563 dcb app del dev $port dscp-prio $prio_str
567 jq -r 'map("\(.[0]):\(.[1])") | join(" ")')
568 dcb app add dev $port dscp-prio $restore_str
574 fi
585 jq -r 'map("\(.[0]):\(.[1])") | join(" ")')
586 dcb app del dev $port dscp-prio $prio_str
595 dcb app add dev $port dscp-prio ${dscp_prios[@]}
612 dcb app replace dev ${swp1} default-prio ${port_prio}
626 fi
632 if [ ${RET} -eq 1 ]; then
634 fi
641 fi
646 fi
648 dcb app replace dev ${swp1} default-prio ${orig_port_prio}
649 if [ $orig_port_prio -ne $(port_default_prio_get ${swp1}) ]; then
651 fi