Commit e35ba581 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

selftests: netdevsim: stop using ifconfig

Paolo points out that ifconfig is legacy and we should not use it.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7d7bf30f
...@@ -270,7 +270,7 @@ for port in 0 1; do ...@@ -270,7 +270,7 @@ for port in 0 1; do
echo 1 > $NSIM_DEV_SYS/new_port echo 1 > $NSIM_DEV_SYS/new_port
fi fi
NSIM_NETDEV=`get_netdev_name old_netdevs` NSIM_NETDEV=`get_netdev_name old_netdevs`
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
msg="new NIC device created" msg="new NIC device created"
exp0=( 0 0 0 0 ) exp0=( 0 0 0 0 )
...@@ -284,8 +284,8 @@ for port in 0 1; do ...@@ -284,8 +284,8 @@ for port in 0 1; do
msg="VxLAN v4 devices go down" msg="VxLAN v4 devices go down"
exp0=( 0 0 0 0 ) exp0=( 0 0 0 0 )
ifconfig vxlan1 down ip link set dev vxlan1 down
ifconfig vxlan0 down ip link set dev vxlan0 down
check_tables check_tables
msg="VxLAN v6 devices" msg="VxLAN v6 devices"
...@@ -293,7 +293,7 @@ for port in 0 1; do ...@@ -293,7 +293,7 @@ for port in 0 1; do
new_vxlan vxlanA 4789 $NSIM_NETDEV 6 new_vxlan vxlanA 4789 $NSIM_NETDEV 6
for ifc in vxlan0 vxlan1; do for ifc in vxlan0 vxlan1; do
ifconfig $ifc up ip link set dev $ifc up
done done
new_vxlan vxlanB 4789 $NSIM_NETDEV 6 new_vxlan vxlanB 4789 $NSIM_NETDEV 6
...@@ -307,14 +307,14 @@ for port in 0 1; do ...@@ -307,14 +307,14 @@ for port in 0 1; do
new_geneve gnv0 6081 new_geneve gnv0 6081
msg="NIC device goes down" msg="NIC device goes down"
ifconfig $NSIM_NETDEV down ip link set dev $NSIM_NETDEV down
if [ $port -eq 1 ]; then if [ $port -eq 1 ]; then
exp0=( 0 0 0 0 ) exp0=( 0 0 0 0 )
exp1=( 0 0 0 0 ) exp1=( 0 0 0 0 )
fi fi
check_tables check_tables
msg="NIC device goes up again" msg="NIC device goes up again"
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
exp0=( `mke 4789 1` `mke 4790 1` 0 0 ) exp0=( `mke 4789 1` `mke 4790 1` 0 0 )
exp1=( `mke 6081 2` 0 0 0 ) exp1=( `mke 6081 2` 0 0 0 )
check_tables check_tables
...@@ -433,7 +433,7 @@ for port in 0 1; do ...@@ -433,7 +433,7 @@ for port in 0 1; do
echo $port > $NSIM_DEV_SYS/new_port echo $port > $NSIM_DEV_SYS/new_port
NSIM_NETDEV=`get_netdev_name old_netdevs` NSIM_NETDEV=`get_netdev_name old_netdevs`
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
overflow_table0 "overflow NIC table" overflow_table0 "overflow NIC table"
overflow_table1 "overflow NIC table" overflow_table1 "overflow NIC table"
...@@ -491,7 +491,7 @@ for port in 0 1; do ...@@ -491,7 +491,7 @@ for port in 0 1; do
echo $port > $NSIM_DEV_SYS/new_port echo $port > $NSIM_DEV_SYS/new_port
NSIM_NETDEV=`get_netdev_name old_netdevs` NSIM_NETDEV=`get_netdev_name old_netdevs`
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
overflow_table0 "overflow NIC table" overflow_table0 "overflow NIC table"
overflow_table1 "overflow NIC table" overflow_table1 "overflow NIC table"
...@@ -548,7 +548,7 @@ for port in 0 1; do ...@@ -548,7 +548,7 @@ for port in 0 1; do
echo $port > $NSIM_DEV_SYS/new_port echo $port > $NSIM_DEV_SYS/new_port
NSIM_NETDEV=`get_netdev_name old_netdevs` NSIM_NETDEV=`get_netdev_name old_netdevs`
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
overflow_table0 "destroy NIC" overflow_table0 "destroy NIC"
overflow_table1 "destroy NIC" overflow_table1 "destroy NIC"
...@@ -578,7 +578,7 @@ for port in 0 1; do ...@@ -578,7 +578,7 @@ for port in 0 1; do
echo $port > $NSIM_DEV_SYS/new_port echo $port > $NSIM_DEV_SYS/new_port
NSIM_NETDEV=`get_netdev_name old_netdevs` NSIM_NETDEV=`get_netdev_name old_netdevs`
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
msg="create VxLANs v6" msg="create VxLANs v6"
new_vxlan vxlanA0 10000 $NSIM_NETDEV 6 new_vxlan vxlanA0 10000 $NSIM_NETDEV 6
...@@ -639,7 +639,7 @@ for port in 0 1; do ...@@ -639,7 +639,7 @@ for port in 0 1; do
echo $port > $NSIM_DEV_SYS/new_port echo $port > $NSIM_DEV_SYS/new_port
NSIM_NETDEV=`get_netdev_name old_netdevs` NSIM_NETDEV=`get_netdev_name old_netdevs`
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
echo 110 > $NSIM_DEV_DFS/ports/$port/udp_ports_inject_error echo 110 > $NSIM_DEV_DFS/ports/$port/udp_ports_inject_error
...@@ -695,7 +695,7 @@ for port in 0 1; do ...@@ -695,7 +695,7 @@ for port in 0 1; do
echo $port > $NSIM_DEV_SYS/new_port echo $port > $NSIM_DEV_SYS/new_port
NSIM_NETDEV=`get_netdev_name old_netdevs` NSIM_NETDEV=`get_netdev_name old_netdevs`
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
msg="create VxLANs v6" msg="create VxLANs v6"
exp0=( `mke 10000 1` 0 0 0 ) exp0=( `mke 10000 1` 0 0 0 )
...@@ -755,7 +755,7 @@ for port in 0 1; do ...@@ -755,7 +755,7 @@ for port in 0 1; do
echo $port > $NSIM_DEV_SYS/new_port echo $port > $NSIM_DEV_SYS/new_port
NSIM_NETDEV=`get_netdev_name old_netdevs` NSIM_NETDEV=`get_netdev_name old_netdevs`
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
msg="create VxLANs v6" msg="create VxLANs v6"
exp0=( `mke 10000 1` 0 0 0 ) exp0=( `mke 10000 1` 0 0 0 )
...@@ -768,7 +768,7 @@ for port in 0 1; do ...@@ -768,7 +768,7 @@ for port in 0 1; do
check_tables check_tables
msg="NIC device goes down" msg="NIC device goes down"
ifconfig $NSIM_NETDEV down ip link set dev $NSIM_NETDEV down
if [ $port -eq 1 ]; then if [ $port -eq 1 ]; then
exp0=( 0 0 0 0 ) exp0=( 0 0 0 0 )
exp1=( 0 0 0 0 ) exp1=( 0 0 0 0 )
...@@ -779,7 +779,7 @@ for port in 0 1; do ...@@ -779,7 +779,7 @@ for port in 0 1; do
check_tables check_tables
msg="NIC device goes up again" msg="NIC device goes up again"
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
exp0=( `mke 10000 1` 0 0 0 ) exp0=( `mke 10000 1` 0 0 0 )
check_tables check_tables
...@@ -827,12 +827,12 @@ new_vxlan vxlan1 4789 $NSIM_NETDEV2 ...@@ -827,12 +827,12 @@ new_vxlan vxlan1 4789 $NSIM_NETDEV2
msg="VxLAN v4 devices go down" msg="VxLAN v4 devices go down"
exp0=( 0 0 0 0 ) exp0=( 0 0 0 0 )
ifconfig vxlan1 down ip link set dev vxlan1 down
ifconfig vxlan0 down ip link set dev vxlan0 down
check_tables check_tables
for ifc in vxlan0 vxlan1; do for ifc in vxlan0 vxlan1; do
ifconfig $ifc up ip link set dev $ifc up
done done
msg="VxLAN v6 device" msg="VxLAN v6 device"
...@@ -844,11 +844,11 @@ exp1=( `mke 6081 2` 0 0 0 ) ...@@ -844,11 +844,11 @@ exp1=( `mke 6081 2` 0 0 0 )
new_geneve gnv0 6081 new_geneve gnv0 6081
msg="NIC device goes down" msg="NIC device goes down"
ifconfig $NSIM_NETDEV down ip link set dev $NSIM_NETDEV down
check_tables check_tables
msg="NIC device goes up again" msg="NIC device goes up again"
ifconfig $NSIM_NETDEV up ip link set dev $NSIM_NETDEV up
check_tables check_tables
for i in `seq 2`; do for i in `seq 2`; do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment