Commit 59be45c3 authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

selftests: forwarding: Allow creation of interfaces without a config file

Some users want to be able to run the tests without a configuration file
which is useful when one needs to test both virtual and physical
interfaces on the same machine.

Move the defines that set the type of interface to create and whether to
create it away from the optional configuration file to the library like
the rest of the defines.
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 231b85ab
...@@ -14,11 +14,6 @@ NETIFS[p6]=veth5 ...@@ -14,11 +14,6 @@ NETIFS[p6]=veth5
NETIFS[p7]=veth6 NETIFS[p7]=veth6
NETIFS[p8]=veth7 NETIFS[p8]=veth7
NETIF_TYPE=veth
# only virtual interfaces (veth) can be created by test infra
#NETIF_CREATE=yes
############################################################################## ##############################################################################
# Defines # Defines
...@@ -34,3 +29,7 @@ WAIT_TIME=5 ...@@ -34,3 +29,7 @@ WAIT_TIME=5
PAUSE_ON_FAIL=no PAUSE_ON_FAIL=no
# Whether to pause on cleanup or not. # Whether to pause on cleanup or not.
PAUSE_ON_CLEANUP=no PAUSE_ON_CLEANUP=no
# Type of network interface to create
NETIF_TYPE=veth
# Whether to create virtual interfaces (veth) or not
NETIF_CREATE=yes
...@@ -11,6 +11,8 @@ MZ=${MZ:=mausezahn} ...@@ -11,6 +11,8 @@ MZ=${MZ:=mausezahn}
WAIT_TIME=${WAIT_TIME:=5} WAIT_TIME=${WAIT_TIME:=5}
PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no} PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no}
PAUSE_ON_CLEANUP=${PAUSE_ON_CLEANUP:=no} PAUSE_ON_CLEANUP=${PAUSE_ON_CLEANUP:=no}
NETIF_TYPE=${NETIF_TYPE:=veth}
NETIF_CREATE=${NETIF_CREATE:=yes}
if [[ -f forwarding.config ]]; then if [[ -f forwarding.config ]]; then
source forwarding.config source forwarding.config
......
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