selftests: forwarding: Allow to get netdev interfaces names from commandline
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
4e4272d2a6
Коммит
781fe631fa
|
@ -45,6 +45,21 @@ if [[ ! -v NUM_NETIFS ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Command line options handling
|
||||||
|
|
||||||
|
count=0
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
if [[ "$count" -eq "0" ]]; then
|
||||||
|
unset NETIFS
|
||||||
|
declare -A NETIFS
|
||||||
|
fi
|
||||||
|
count=$((count + 1))
|
||||||
|
NETIFS[p$count]="$1"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Network interfaces configuration
|
# Network interfaces configuration
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче