Lines Matching +full:speed +full:- +full:bin

1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
58 local -a speeds_arr=($(common_speeds_get $h1 $h2 0 0))
60 for speed in "${speeds_arr[@]}"; do
62 ethtool_set $h1 speed $speed autoneg off
63 ethtool_set $h2 speed $speed autoneg off
68 check_err $? "ping with speed $speed autoneg off"
69 log_test "force speed $speed on both ends"
72 ethtool -s $h2 autoneg on
73 ethtool -s $h1 autoneg on
82 local -a speeds_arr=($(different_speeds_get $h1 $h2 0 0))
86 ethtool_set $h1 speed $speed1 autoneg off
87 ethtool_set $h2 speed $speed2 autoneg off
96 ethtool -s $h2 autoneg on
97 ethtool -s $h1 autoneg on
102 # Test that when one device is forced to a speed supported by both
105 local -a speeds_arr=($(common_speeds_get $h1 $h2 0 1))
107 for speed in "${speeds_arr[@]}"; do
109 ethtool_set $h1 speed $speed autoneg off
114 check_err $? "ping with h1-speed=$speed autoneg off, h2 autoneg on"
115 log_test "force speed $speed vs. autoneg"
118 ethtool -s $h1 autoneg on
123 local speed=$1; shift
125 local shift_size=${speed_values[$speed]}
126 speed=$((0x1 << $"shift_size"))
127 printf "%#x" "$speed"
136 local -a speeds_arr=($(common_speeds_get $dev1 $dev2 0 $adver))
141 local -a speeds_mode_arr=($(common_speeds_get $dev1 $dev2 1 $adver))
143 for speed in ${speeds_mode_arr[@]}; do
144 if [[ $speed != $speed_to_remove* ]]; then
145 speed=$(hex_speed_value_get $speed)
147 $speed))
158 # The function returns the hex number that is composed by OR-ing all
159 # the modes corresponding to the provided speed.
166 for speed in ${supported_speeds[@]}; do
167 if [[ $speed == $speed_without_mode* ]]; then
168 speed=$(hex_speed_value_get $speed)
170 $speed))
182 # advertises a specific speed (but all modes of this speed), the links
194 local -a speeds_arr_without_mode=($(common_speeds_get $h1 $h2 0 1))
195 # Check only speeds that h1 advertised. Remove the first speed.
197 local -a speeds_arr_with_mode=($(common_speeds_get $h1 $h2 1 1))
213 ethtool -s $h2 autoneg on
214 ethtool -s $h1 autoneg on
220 # chooses the highest speed. This test checks configuration without
231 log_test "check highest speed"
235 local -a speeds_arr=($(common_speeds_get $h1 $h2 0 1))
239 if [[ $current -gt $max_speed ]]; then
246 chosen_speed=$(ethtool $h1 | grep 'Speed:')
248 chosen_speed=${chosen_speed#*"Speed: "}
250 check_err $? "h1 advertise $speed_to_advertise, h2 sync to speed $chosen_speed"
252 log_test "check highest speed"
254 ethtool -s $h2 autoneg on
255 ethtool -s $h1 autoneg on
264 local -a speeds=($(different_speeds_get $h1 $h2 1 1))
283 ethtool -s $h2 autoneg on
284 ethtool -s $h1 autoneg on
292 declare -gA speed_values