netperf: Add separate run scripts for lwip/lxip

Also removed target 'app/netperf' and added 'app/netperf/lwip' and
'app/netperf/lxip'.
This commit is contained in:
Sebastian Sumpf 2013-11-22 12:39:44 +01:00 committed by Norman Feske
parent 80838831d8
commit 634f4c0d8c
13 changed files with 110 additions and 12 deletions

View File

@ -47,9 +47,9 @@ if {$use_nic_driver} { set network_driver "nic_drv" }
set build_components { set build_components {
core init core init
drivers/pci drivers/timer drivers/nic drivers/pci drivers/timer drivers/nic
app/netperf
} }
append build_components " $netperf_target "
lappend_if $use_usb_driver build_components drivers/usb lappend_if $use_usb_driver build_components drivers/usb
lappend_if $use_platform_driver build_components drivers/platform lappend_if $use_platform_driver build_components drivers/platform
lappend_if $use_nic_bridge build_components server/nic_bridge lappend_if $use_nic_bridge build_components server/nic_bridge
@ -164,7 +164,10 @@ append_if [expr ![have_spec acpi] && [have_spec pci]] config {
append config { append config {
<start name="netserver_genode"> <start name="netserver_genode">
<resource name="RAM" quantum="16M"/> }
append config "<binary name=\"$netperf_app\"/>"
append config {
<resource name="RAM" quantum="32M"/>
<config> <config>
<arg value="netserver"/> <arg value="netserver"/>
<arg value="-D"/> <arg value="-D"/>
@ -194,10 +197,11 @@ install_config $config
set boot_modules { set boot_modules {
core init timer core init timer
ld.lib.so libc.lib.so libm.lib.so ld.lib.so libc.lib.so libm.lib.so
lwip.lib.so libc_log.lib.so libc_log.lib.so
netserver_genode
} }
append boot_modules " $netperf_app "
append boot_modules " $netperf_stack "
lappend_if $use_nic_bridge boot_modules nic_bridge lappend_if $use_nic_bridge boot_modules nic_bridge
# platform-specific modules # platform-specific modules
@ -233,8 +237,7 @@ if [is_qemu_available] {
} elseif [have_spec linux] { } elseif [have_spec linux] {
set ip_addr $lx_ip_addr set ip_addr $lx_ip_addr
} else { } else {
set match_string "got IP address (\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+)" regexp $ip_match_string $output all ip_addr
regexp $match_string $output all ip_addr
puts "" puts ""
} }

View File

@ -0,0 +1,4 @@
set netperf_target app/netperf/lwip
set netperf_app netserver_lwip
set netperf_stack lwip.lib.so
set ip_match_string "got IP address (\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+)"

View File

@ -16,4 +16,5 @@ set use_usb_11 "no"
set use_usb_20 "yes" set use_usb_20 "yes"
set use_usb_30 "no" set use_usb_30 "no"
source ${genode_dir}/ports/run/netperf_lwip.inc
source ${genode_dir}/ports/run/netperf.inc source ${genode_dir}/ports/run/netperf.inc

View File

@ -21,4 +21,5 @@ set use_usb_11 "no"
set use_usb_20 "no" set use_usb_20 "no"
set use_usb_30 "yes" set use_usb_30 "yes"
source ${genode_dir}/ports/run/netperf_lwip.inc
source ${genode_dir}/ports/run/netperf.inc source ${genode_dir}/ports/run/netperf.inc

View File

@ -21,4 +21,5 @@ set use_usb_11 "no"
set use_usb_20 "no" set use_usb_20 "no"
set use_usb_30 "yes" set use_usb_30 "yes"
source ${genode_dir}/ports/run/netperf_lwip.inc
source ${genode_dir}/ports/run/netperf.inc source ${genode_dir}/ports/run/netperf.inc

View File

@ -0,0 +1,4 @@
set netperf_target app/netperf/lxip
set netperf_app netserver_lxip
set netperf_stack { lxip.lib.so libc_resolv.lib.so }
set ip_match_string "ipaddr=(\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+)"

View File

@ -0,0 +1,20 @@
#
# \brief Test using netperf with a native driver or if not available for
# the platform using usb 2.0 by default
# \author Alexander Boettcher
# \date 2013-07-08
#
if {[is_qemu_available]} {
puts "\nNetperf running on Qemu is not recommented.\n"
exit
}
# network configuration
set use_nic_bridge 0
set use_usb_11 "no"
set use_usb_20 "yes"
set use_usb_30 "no"
source ${genode_dir}/ports/run/netperf_lxip.inc
source ${genode_dir}/ports/run/netperf.inc

View File

@ -0,0 +1,25 @@
#
# \brief Test using netperf with a network bridge and with a native driver or
# if not available for the platform using usb 3.0 by default
# \author Alexander Boettcher
# \date 2013-07-08
#
if {[is_qemu_available]} {
puts "\nNetperf running on Qemu with a bridge is not supported.\n"
exit
}
if {[have_spec omap4]} {
puts stderr "\nTest requires 1 Gbit network interface - not supported for omap4\n"
exit 0
}
# network configuration
set use_nic_bridge 1
set use_usb_11 "no"
set use_usb_20 "no"
set use_usb_30 "yes"
source ${genode_dir}/ports/run/netperf_lxip.inc
source ${genode_dir}/ports/run/netperf.inc

View File

@ -0,0 +1,25 @@
#
# \brief Test using netperf with a native driver or if not available for
# the platform using usb 3.0 by default
# \author Alexander Boettcher
# \date 2013-07-08
#
if {[is_qemu_available]} {
puts "\nNetperf running on Qemu is not recommented.\n"
exit
}
if {[have_spec omap4]} {
puts stderr "\nTest requires 1 Gbit network interface - not supported for omap4\n"
exit 0
}
# network configuration
set use_nic_bridge 0
set use_usb_11 "no"
set use_usb_20 "no"
set use_usb_30 "yes"
source ${genode_dir}/ports/run/netperf_lxip.inc
source ${genode_dir}/ports/run/netperf.inc

View File

@ -0,0 +1,5 @@
TARGET = netserver_lwip
LIBS += libc_lwip_nic_dhcp
include $(PRG_DIR)/../target.inc

View File

@ -0,0 +1,5 @@
TARGET = netserver_lxip
LIBS += libc_lxip
include $(PRG_DIR)/../target.inc

View File

@ -1,19 +1,20 @@
TARGET = netserver_genode
CONTRIB_DIR = $(REP_DIR)/contrib/netperf CONTRIB_DIR = $(REP_DIR)/contrib/netperf
LIBS += base libc libm libc-resolv libc-net libc-nameser libc-isc LIBS += base libc libm libc-resolv libc-net libc-nameser libc-isc
# plug-in to libc # plug-in to libc
LIBS += libc_log libc_lwip_nic_dhcp config_args LIBS += libc_log config_args
SRC_C = netserver.c netlib.c netsh.c nettest_bsd.c dscp.c SRC_C = netserver.c netlib.c netsh.c nettest_bsd.c dscp.c
# omni test # omni test
SRC_C += nettest_omni.c net_uuid.c SRC_C += nettest_omni.c net_uuid.c
SRC_C += netsys_none.c netsec_none.c netdrv_none.c netrt_none.c netslot_none.c netcpu_none.c SRC_C += netsys_none.c netsec_none.c netdrv_none.c netrt_none.c netslot_none.c netcpu_none.c
INC_DIR += $(PRG_DIR) INC_DIR += $(PRG_DIR)/..
CC_OPT += -DHAVE_CONFIG_H -DGENODE_BUILD CC_OPT += -DHAVE_CONFIG_H -DGENODE_BUILD
CC_WARN = -Wall -Wno-unused CC_WARN = -Wall -Wno-unused
vpath %.c $(CONTRIB_DIR)/src vpath %.c $(CONTRIB_DIR)/src
# vi: set ft=make :

View File

@ -19,9 +19,12 @@ lx_hybrid_pthread_ipc
moon moon
thread_join thread_join
failsafe failsafe
netperf netperf_lwip
netperf_usb30 netperf_lwip_usb30
netperf_bridge netperf_lwip_bridge
netperf_lxip
netperf_lxip_usb30
netperf_lxip_bridge
l4linux_netperf l4linux_netperf
l4linux_netperf_usb30 l4linux_netperf_usb30
l4linux_netperf_bridge l4linux_netperf_bridge