diff --git a/ports/run/netperf.inc b/ports/run/netperf.inc index a07667de7f..b6b7925a02 100644 --- a/ports/run/netperf.inc +++ b/ports/run/netperf.inc @@ -47,9 +47,9 @@ if {$use_nic_driver} { set network_driver "nic_drv" } set build_components { core init 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_platform_driver build_components drivers/platform 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 "" +append config { + @@ -194,10 +197,11 @@ install_config $config set boot_modules { core init timer ld.lib.so libc.lib.so libm.lib.so - lwip.lib.so libc_log.lib.so - netserver_genode + libc_log.lib.so } +append boot_modules " $netperf_app " +append boot_modules " $netperf_stack " lappend_if $use_nic_bridge boot_modules nic_bridge # platform-specific modules @@ -233,8 +237,7 @@ if [is_qemu_available] { } elseif [have_spec linux] { set ip_addr $lx_ip_addr } else { - set match_string "got IP address (\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+)" - regexp $match_string $output all ip_addr + regexp $ip_match_string $output all ip_addr puts "" } diff --git a/ports/run/netperf_lwip.inc b/ports/run/netperf_lwip.inc new file mode 100644 index 0000000000..f897870872 --- /dev/null +++ b/ports/run/netperf_lwip.inc @@ -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\]+)" diff --git a/ports/run/netperf.run b/ports/run/netperf_lwip.run similarity index 90% rename from ports/run/netperf.run rename to ports/run/netperf_lwip.run index c7163c2cf8..921f925611 100644 --- a/ports/run/netperf.run +++ b/ports/run/netperf_lwip.run @@ -16,4 +16,5 @@ set use_usb_11 "no" set use_usb_20 "yes" set use_usb_30 "no" +source ${genode_dir}/ports/run/netperf_lwip.inc source ${genode_dir}/ports/run/netperf.inc diff --git a/ports/run/netperf_bridge.run b/ports/run/netperf_lwip_bridge.run similarity index 92% rename from ports/run/netperf_bridge.run rename to ports/run/netperf_lwip_bridge.run index 841cf88c84..f9d08f3b4c 100644 --- a/ports/run/netperf_bridge.run +++ b/ports/run/netperf_lwip_bridge.run @@ -21,4 +21,5 @@ set use_usb_11 "no" set use_usb_20 "no" set use_usb_30 "yes" +source ${genode_dir}/ports/run/netperf_lwip.inc source ${genode_dir}/ports/run/netperf.inc diff --git a/ports/run/netperf_usb30.run b/ports/run/netperf_lwip_usb30.run similarity index 92% rename from ports/run/netperf_usb30.run rename to ports/run/netperf_lwip_usb30.run index eda4345860..6a8b90086f 100644 --- a/ports/run/netperf_usb30.run +++ b/ports/run/netperf_lwip_usb30.run @@ -21,4 +21,5 @@ set use_usb_11 "no" set use_usb_20 "no" set use_usb_30 "yes" +source ${genode_dir}/ports/run/netperf_lwip.inc source ${genode_dir}/ports/run/netperf.inc diff --git a/ports/run/netperf_lxip.inc b/ports/run/netperf_lxip.inc new file mode 100644 index 0000000000..b301642926 --- /dev/null +++ b/ports/run/netperf_lxip.inc @@ -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\]+)" diff --git a/ports/run/netperf_lxip.run b/ports/run/netperf_lxip.run new file mode 100644 index 0000000000..98cc4dc567 --- /dev/null +++ b/ports/run/netperf_lxip.run @@ -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 diff --git a/ports/run/netperf_lxip_bridge.run b/ports/run/netperf_lxip_bridge.run new file mode 100644 index 0000000000..da50db048e --- /dev/null +++ b/ports/run/netperf_lxip_bridge.run @@ -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 diff --git a/ports/run/netperf_lxip_usb30.run b/ports/run/netperf_lxip_usb30.run new file mode 100644 index 0000000000..255f57734e --- /dev/null +++ b/ports/run/netperf_lxip_usb30.run @@ -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 diff --git a/ports/src/app/netperf/lwip/target.mk b/ports/src/app/netperf/lwip/target.mk new file mode 100644 index 0000000000..95f158bec6 --- /dev/null +++ b/ports/src/app/netperf/lwip/target.mk @@ -0,0 +1,5 @@ +TARGET = netserver_lwip + +LIBS += libc_lwip_nic_dhcp + +include $(PRG_DIR)/../target.inc diff --git a/ports/src/app/netperf/lxip/target.mk b/ports/src/app/netperf/lxip/target.mk new file mode 100644 index 0000000000..98c3ebcc27 --- /dev/null +++ b/ports/src/app/netperf/lxip/target.mk @@ -0,0 +1,5 @@ +TARGET = netserver_lxip + +LIBS += libc_lxip + +include $(PRG_DIR)/../target.inc diff --git a/ports/src/app/netperf/target.mk b/ports/src/app/netperf/target.inc similarity index 81% rename from ports/src/app/netperf/target.mk rename to ports/src/app/netperf/target.inc index efdf1c38bb..d4e4344224 100644 --- a/ports/src/app/netperf/target.mk +++ b/ports/src/app/netperf/target.inc @@ -1,19 +1,20 @@ -TARGET = netserver_genode CONTRIB_DIR = $(REP_DIR)/contrib/netperf LIBS += base libc libm libc-resolv libc-net libc-nameser libc-isc # 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 # omni test 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 -INC_DIR += $(PRG_DIR) +INC_DIR += $(PRG_DIR)/.. CC_OPT += -DHAVE_CONFIG_H -DGENODE_BUILD CC_WARN = -Wall -Wno-unused vpath %.c $(CONTRIB_DIR)/src + +# vi: set ft=make : diff --git a/tool/autopilot.list b/tool/autopilot.list index d538be02dd..628050be66 100644 --- a/tool/autopilot.list +++ b/tool/autopilot.list @@ -19,9 +19,12 @@ lx_hybrid_pthread_ipc moon thread_join failsafe -netperf -netperf_usb30 -netperf_bridge +netperf_lwip +netperf_lwip_usb30 +netperf_lwip_bridge +netperf_lxip +netperf_lxip_usb30 +netperf_lxip_bridge l4linux_netperf l4linux_netperf_usb30 l4linux_netperf_bridge