diff --git a/repos/dde_linux/recipes/raw/drivers_nic-imx53_qsb/drivers.config b/repos/dde_linux/recipes/raw/drivers_nic-imx53_qsb/drivers.config
index bbc4698e15..6674216403 100644
--- a/repos/dde_linux/recipes/raw/drivers_nic-imx53_qsb/drivers.config
+++ b/repos/dde_linux/recipes/raw/drivers_nic-imx53_qsb/drivers.config
@@ -8,6 +8,7 @@
+
@@ -33,8 +34,9 @@
-
+
+
diff --git a/repos/dde_linux/recipes/raw/drivers_nic-imx6q_sabrelite/drivers.config b/repos/dde_linux/recipes/raw/drivers_nic-imx6q_sabrelite/drivers.config
index 215047ca0d..3cc66e957b 100644
--- a/repos/dde_linux/recipes/raw/drivers_nic-imx6q_sabrelite/drivers.config
+++ b/repos/dde_linux/recipes/raw/drivers_nic-imx6q_sabrelite/drivers.config
@@ -8,6 +8,7 @@
+
@@ -34,8 +35,9 @@
-
+
+
diff --git a/repos/dde_linux/recipes/raw/drivers_nic-imx7d_sabre/drivers.config b/repos/dde_linux/recipes/raw/drivers_nic-imx7d_sabre/drivers.config
index 637bba5f1c..e32bfef50a 100644
--- a/repos/dde_linux/recipes/raw/drivers_nic-imx7d_sabre/drivers.config
+++ b/repos/dde_linux/recipes/raw/drivers_nic-imx7d_sabre/drivers.config
@@ -1,4 +1,5 @@
+
@@ -8,13 +9,11 @@
+
-
-
-
@@ -44,15 +43,17 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/repos/dde_linux/recipes/raw/drivers_nic-imx8q_evk/drivers.config b/repos/dde_linux/recipes/raw/drivers_nic-imx8q_evk/drivers.config
index 279032b785..f6579a06b9 100644
--- a/repos/dde_linux/recipes/raw/drivers_nic-imx8q_evk/drivers.config
+++ b/repos/dde_linux/recipes/raw/drivers_nic-imx8q_evk/drivers.config
@@ -8,13 +8,11 @@
+
-
-
-
@@ -36,14 +34,15 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/repos/dde_linux/run/nic_router_uplinks.run b/repos/dde_linux/run/nic_router_uplinks.run
index 71679ea424..1bf02ce547 100644
--- a/repos/dde_linux/run/nic_router_uplinks.run
+++ b/repos/dde_linux/run/nic_router_uplinks.run
@@ -74,16 +74,19 @@ append config {
-
+
-
-
+
+
+
+
+
+
-
-
+
@@ -94,6 +97,7 @@ append config {
+
@@ -142,15 +146,18 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
-
+
+
+
+
+
@@ -163,15 +170,18 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
-
+
+
+
+
+
@@ -184,11 +194,13 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
+
+
+
@@ -201,15 +213,18 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
-
+
+
+
+
+
@@ -222,15 +237,18 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
-
+
+
+
+
+
@@ -243,11 +261,13 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
+
+
+
@@ -260,15 +280,18 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
-
+
+
+
+
+
@@ -281,15 +304,18 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
-
+
+
+
+
+
@@ -302,10 +328,12 @@ append config {
verbose_domain_state="} [router_verbose_domain_state] {"
verbose_packets="} [router_verbose_packets] {">
-
+
+
+
@@ -322,12 +350,6 @@ append config {
-
-
-
-
-
-
diff --git a/repos/dde_linux/run/usb_net.run b/repos/dde_linux/run/usb_net.run
index e3e25a4887..9a290f84fc 100644
--- a/repos/dde_linux/run/usb_net.run
+++ b/repos/dde_linux/run/usb_net.run
@@ -17,6 +17,7 @@ set build_components {
drivers/usb_net
test/lwip/http_srv
lib/vfs/lwip
+ server/nic_router
}
source ${genode_dir}/repos/base/run/platform_drv.inc
@@ -76,9 +77,40 @@ append config {
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -90,6 +122,10 @@ append config {
+
+
+
+
}
@@ -104,6 +140,7 @@ install_config $config
set boot_modules {
core init timer usb_net_drv
ld.lib.so libc.lib.so vfs.lib.so vfs_lwip.lib.so test-lwip_httpsrv
+ nic_router
}
append boot_modules [usb_host_drv_binary]
diff --git a/repos/dde_linux/run/usb_rndis.run b/repos/dde_linux/run/usb_rndis.run
index 5ce4c26a1c..8bdf1d3ae5 100644
--- a/repos/dde_linux/run/usb_rndis.run
+++ b/repos/dde_linux/run/usb_rndis.run
@@ -16,6 +16,7 @@ set build_components {
server/tcp_terminal
test/terminal_echo
lib/vfs/lwip
+ server/nic_router
}
source ${genode_dir}/repos/base/run/platform_drv.inc
@@ -45,19 +46,46 @@ set config {
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -71,6 +99,7 @@ set config {
+
@@ -98,6 +127,7 @@ set boot_modules {
tcp_terminal
test-terminal_echo
vfs_lwip.lib.so
+ nic_router
}
append_platform_drv_boot_modules
diff --git a/repos/dde_linux/run/vfs_cfg.run b/repos/dde_linux/run/vfs_cfg.run
index 40452a184b..778e0c6fe5 100644
--- a/repos/dde_linux/run/vfs_cfg.run
+++ b/repos/dde_linux/run/vfs_cfg.run
@@ -1,11 +1,10 @@
-assert_spec linux
-
set build_components {
core init timer
- drivers/nic
lib/vfs/lxip
server/vfs
server/dynamic_rom
+ server/nic_router
+ app/ping
}
build $build_components
@@ -31,10 +30,53 @@ append config {
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -67,26 +109,29 @@ append config {
+
+
}
install_config $config
append boot_modules {
- core init timer linux_nic_drv vfs dynamic_rom
+ core init timer vfs dynamic_rom
ld.lib.so vfs.lib.so vfs_lxip.lib.so lxip.lib.so
+ nic_router ping
}
build_boot_image $boot_modules
-puts "#################################################################"
-puts "## run simultaneous ping to 10.0.2.55 and ##"
-puts "#################################################################"
-sleep 1
+append done_string ".*\"ping_.\" exited with exit value 0.*\n"
+append done_string ".*\"ping_.\" exited with exit value 0.*\n"
-run_genode_until forever
+append qemu_args " -nographic "
+
+run_genode_until $done_string 60
# vi: set ft=tcl :
diff --git a/repos/dde_linux/run/vfs_lxip.run b/repos/dde_linux/run/vfs_lxip.run
deleted file mode 100644
index c933a92bd1..0000000000
--- a/repos/dde_linux/run/vfs_lxip.run
+++ /dev/null
@@ -1,95 +0,0 @@
-assert_spec linux
-
-set build_components {
- core init timer
- drivers/nic
- server/tcp_terminal
- test/terminal_echo
- lib/vfs/lxip
- test/vfs_lxip
-}
-build $build_components
-
-create_boot_directory
-
-append config {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
-
-install_config $config
-
-append boot_modules {
- core init timer linux_nic_drv
- ld.lib.so libc.lib.so vfs.lib.so posix.lib.so
- libm.lib.so
- vfs_lxip.lib.so lxip.lib.so
- tcp_terminal
- test-terminal_echo
- test-vfs_lxip
-}
-
-build_boot_image $boot_modules
-
-run_genode_until forever
-
-# vi: set ft=tcl :
diff --git a/repos/dde_linux/run/wifi.run b/repos/dde_linux/run/wifi.run
index b7bef73531..52ff847f30 100644
--- a/repos/dde_linux/run/wifi.run
+++ b/repos/dde_linux/run/wifi.run
@@ -69,6 +69,7 @@ set build_components {
drivers/wifi
server/report_rom
server/dynamic_rom
+ server/nic_router
test/lwip/http_srv
lib/vfs/jitterentropy
lib/vfs/lwip
@@ -120,6 +121,10 @@ append config {
+
+
+
+
@@ -162,10 +167,37 @@ append config {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
@@ -175,6 +207,7 @@ append config {
+
@@ -215,6 +248,7 @@ set boot_modules {
wpa_driver_nl80211.lib.so wpa_supplicant.lib.so
wifi.lib.so
wifi_drv
+ nic_router
test-lwip_httpsrv
vfs_lwip.lib.so
diff --git a/repos/gems/recipes/raw/drivers_nic-muen/drivers.config b/repos/gems/recipes/raw/drivers_nic-muen/drivers.config
index b7efdef6c0..b34c3a68c3 100644
--- a/repos/gems/recipes/raw/drivers_nic-muen/drivers.config
+++ b/repos/gems/recipes/raw/drivers_nic-muen/drivers.config
@@ -10,13 +10,11 @@
+
-
-
-
@@ -40,9 +38,8 @@
-
-
-
+
+
@@ -51,6 +48,7 @@
+
diff --git a/repos/gems/recipes/raw/drivers_nic-pc/drivers.config b/repos/gems/recipes/raw/drivers_nic-pc/drivers.config
index 95e407c6b8..ff8a6da96b 100644
--- a/repos/gems/recipes/raw/drivers_nic-pc/drivers.config
+++ b/repos/gems/recipes/raw/drivers_nic-pc/drivers.config
@@ -10,6 +10,7 @@
+
@@ -72,9 +73,8 @@
-
-
-
+
+
@@ -83,6 +83,7 @@
+
diff --git a/repos/gems/recipes/raw/drivers_nic-rpi/drivers.config b/repos/gems/recipes/raw/drivers_nic-rpi/drivers.config
index 6c3aa0d2b9..d573a6f720 100644
--- a/repos/gems/recipes/raw/drivers_nic-rpi/drivers.config
+++ b/repos/gems/recipes/raw/drivers_nic-rpi/drivers.config
@@ -10,11 +10,9 @@
+
-
-
-
@@ -32,18 +30,18 @@
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/repos/gems/run/depot_download.run b/repos/gems/run/depot_download.run
index a6fc32519b..bf0a292301 100644
--- a/repos/gems/run/depot_download.run
+++ b/repos/gems/run/depot_download.run
@@ -21,6 +21,7 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/init \
[depot_user]/src/chroot \
[depot_user]/src/extract \
+ [depot_user]/src/nic_router \
[depot_user]/src/libarchive \
[depot_user]/src/liblzma \
[depot_user]/src/verify
@@ -62,9 +63,42 @@ append config {
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -105,10 +139,12 @@ append config {
+
+
}
diff --git a/repos/gems/run/ssh_exec_channel.run b/repos/gems/run/ssh_exec_channel.run
index 9ee2bd66ae..ca0b3f91ad 100644
--- a/repos/gems/run/ssh_exec_channel.run
+++ b/repos/gems/run/ssh_exec_channel.run
@@ -34,6 +34,7 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/platform_drv \
[depot_user]/src/posix \
[depot_user]/src/fs_rom \
+ [depot_user]/src/nic_router \
[depot_user]/src/rtc_drv \
[depot_user]/src/ssh_terminal \
[depot_user]/src/vfs \
@@ -73,13 +74,57 @@ set config {
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -129,7 +174,7 @@ set config {
-
+
diff --git a/repos/gems/run/ssh_terminal.run b/repos/gems/run/ssh_terminal.run
index d110ea4778..2679461077 100644
--- a/repos/gems/run/ssh_terminal.run
+++ b/repos/gems/run/ssh_terminal.run
@@ -25,6 +25,7 @@ set build_components {
test/libports/ncurses
test/terminal_echo
noux-pkg/bash
+ server/nic_router
}
source ${genode_dir}/repos/base/run/platform_drv.inc
@@ -55,24 +56,68 @@ set config {
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -100,13 +145,16 @@ set config {
+
+
+
@@ -115,6 +163,7 @@ set config {
+
@@ -125,6 +174,7 @@ set config {
+
@@ -171,7 +221,7 @@ if {![file exists bin/ed25519_key]} {
# generic modules
set boot_modules {
core ld.lib.so init timer ipxe_nic_drv rtc_drv report_rom vfs fs_rom
- test-terminal_echo
+ test-terminal_echo nic_router
libc.lib.so libm.lib.so vfs.lib.so
vfs_lxip.lib.so lxip.lib.so
diff --git a/repos/gems/run/tcp_terminal.run b/repos/gems/run/tcp_terminal.run
index 651f02e7d6..f87209e396 100644
--- a/repos/gems/run/tcp_terminal.run
+++ b/repos/gems/run/tcp_terminal.run
@@ -17,6 +17,7 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_nic_pkg] \
[depot_user]/src/init \
[depot_user]/src/libc \
+ [depot_user]/src/nic_router \
[depot_user]/src/vfs \
[depot_user]/src/vfs_lwip \
[depot_user]/src/vfs_pipe
@@ -49,9 +50,46 @@ install_config {
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -65,6 +103,10 @@ install_config {
+
+
+
+
diff --git a/repos/gems/src/app/sculpt_manager/graph.cc b/repos/gems/src/app/sculpt_manager/graph.cc
index 1c4034edaa..8d4d1a4423 100644
--- a/repos/gems/src/app/sculpt_manager/graph.cc
+++ b/repos/gems/src/app/sculpt_manager/graph.cc
@@ -20,9 +20,8 @@ using namespace Sculpt;
void Graph::_gen_selected_node_content(Xml_generator &xml, Start_name const &name,
Runtime_state::Info const &info) const
{
- bool const removable = _deploy_children.exists(name);
+ if (_deploy_children.exists(name)) {
- if (removable) {
gen_named_node(xml, "frame", "operations", [&] () {
xml.node("hbox", [&] () {
gen_named_node(xml, "button", "remove", [&] () {
@@ -36,6 +35,19 @@ void Graph::_gen_selected_node_content(Xml_generator &xml, Start_name const &nam
xml.attribute("text", "Restart"); }); });
});
});
+
+ } else if (name == "nic_drv" ||
+ name == "wifi_drv") {
+
+ gen_named_node(xml, "frame", "operations", [&] () {
+ xml.node("hbox", [&] () {
+
+ gen_named_node(xml, "button", "restart", [&] () {
+ _action_item.gen_button_attr(xml, "restart");
+ xml.node("label", [&] () {
+ xml.attribute("text", "Restart"); }); });
+ });
+ });
}
if (name == "ram_fs")
diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc
index d20576f227..1fdeb40b73 100644
--- a/repos/gems/src/app/sculpt_manager/main.cc
+++ b/repos/gems/src/app/sculpt_manager/main.cc
@@ -650,10 +650,23 @@ struct Sculpt::Main : Input_event_handler,
*/
void restart_deployed_component(Start_name const &name) override
{
- _runtime_state.restart(name);
+ if (name == "nic_drv") {
- /* update config/managed/deploy with the component 'name' removed */
- _deploy.update_managed_deploy_config(_manual_deploy_rom.xml());
+ _network.restart_nic_drv_on_next_runtime_cfg();
+ generate_runtime_config();
+
+ } else if (name == "wifi_drv") {
+
+ _network.restart_wifi_drv_on_next_runtime_cfg();
+ generate_runtime_config();
+
+ } else {
+
+ _runtime_state.restart(name);
+
+ /* update config/managed/deploy with the component 'name' removed */
+ _deploy.update_managed_deploy_config(_manual_deploy_rom.xml());
+ }
}
/*
diff --git a/repos/gems/src/app/sculpt_manager/network.cc b/repos/gems/src/app/sculpt_manager/network.cc
index f3ba783dc6..46550b720a 100644
--- a/repos/gems/src/app/sculpt_manager/network.cc
+++ b/repos/gems/src/app/sculpt_manager/network.cc
@@ -18,7 +18,7 @@
void Sculpt::Network::_generate_nic_router_uplink(Xml_generator &xml,
char const *label)
{
- xml.node("uplink", [&] () {
+ xml.node("policy", [&] () {
xml.attribute("label", label);
xml.attribute("domain", "uplink");
});
@@ -90,8 +90,8 @@ void Sculpt::Network::_generate_nic_router_config()
bool uplink_exists = true;
switch (_nic_target.type()) {
- case Nic_target::WIRED: _generate_nic_router_uplink(xml, "wired"); break;
- case Nic_target::WIFI: _generate_nic_router_uplink(xml, "wifi"); break;
+ case Nic_target::WIRED: _generate_nic_router_uplink(xml, "nic_drv -> "); break;
+ case Nic_target::WIFI: _generate_nic_router_uplink(xml, "wifi_drv -> "); break;
default: uplink_exists = false;
}
gen_named_node(xml, "domain", "default", [&] () {
@@ -187,17 +187,17 @@ void Sculpt::Network::_handle_nic_router_config(Xml_node config)
if (domain.attribute_value("name", String<16>()) != "uplink")
return;
- config.for_each_sub_node("uplink", [&] (Xml_node uplink) {
+ config.for_each_sub_node("policy", [&] (Xml_node uplink) {
/* skip uplinks not assigned to a domain called "uplink" */
if (uplink.attribute_value("domain", String<16>()) != "uplink")
return;
- if (uplink.attribute_value("label", String<16>()) == "wired") {
+ if (uplink.attribute_value("label", String<16>()) == "nic_drv -> ") {
target = Nic_target::WIRED;
throw Break();
}
- if (uplink.attribute_value("label", String<16>()) == "wifi") {
+ if (uplink.attribute_value("label", String<16>()) == "wifi_drv -> ") {
target = Nic_target::WIFI;
throw Break();
}
@@ -216,14 +216,36 @@ void Sculpt::Network::_handle_nic_router_config(Xml_node config)
void Sculpt::Network::gen_runtime_start_nodes(Xml_generator &xml) const
{
- if (_use_nic_drv)
- xml.node("start", [&] () { gen_nic_drv_start_content(xml); });
+ switch (_nic_target.type()) {
+ case Nic_target::WIRED:
- if (_use_wifi_drv)
- xml.node("start", [&] () { gen_wifi_drv_start_content(xml); });
-
- if (_nic_target.type() != Nic_target::OFF)
xml.node("start", [&] () {
- gen_nic_router_start_content(xml, _nic_target,
- _use_nic_drv, _use_wifi_drv); });
+ xml.attribute("version", _nic_drv_version);
+ gen_nic_drv_start_content(xml);
+ });
+ xml.node("start", [&] () { gen_nic_router_start_content(xml); });
+ break;
+
+ case Nic_target::WIFI:
+
+ xml.node("start", [&] () {
+ xml.attribute("version", _wifi_drv_version);
+ gen_wifi_drv_start_content(xml);
+ });
+ xml.node("start", [&] () { gen_nic_router_start_content(xml); });
+ break;
+
+ case Nic_target::LOCAL:
+
+ xml.node("start", [&] () { gen_nic_router_start_content(xml); });
+ break;
+
+ case Nic_target::OFF:
+
+ break;
+
+ case Nic_target::UNDEFINED:
+
+ break;
+ }
}
diff --git a/repos/gems/src/app/sculpt_manager/network.h b/repos/gems/src/app/sculpt_manager/network.h
index a3b569f339..0f2585a4a8 100644
--- a/repos/gems/src/app/sculpt_manager/network.h
+++ b/repos/gems/src/app/sculpt_manager/network.h
@@ -49,8 +49,8 @@ struct Sculpt::Network : Network_dialog::Action
Wpa_passphrase wpa_passphrase { };
- bool _use_nic_drv = false;
- bool _use_wifi_drv = false;
+ unsigned _nic_drv_version = 0;
+ unsigned _wifi_drv_version = 0;
Attached_rom_dataspace _wlan_accesspoints_rom {
_env, "report -> runtime/wifi_drv/accesspoints" };
@@ -143,13 +143,6 @@ struct Sculpt::Network : Network_dialog::Action
*/
void nic_target(Nic_target::Type const type) override
{
- /*
- * Start drivers on first use but never remove them to avoid
- * driver-restarting issues.
- */
- if (type == Nic_target::WIFI) _use_wifi_drv = true;
- if (type == Nic_target::WIRED) _use_nic_drv = true;
-
if (type != _nic_target.managed_type) {
_nic_target.managed_type = type;
_generate_nic_router_config();
@@ -191,6 +184,16 @@ struct Sculpt::Network : Network_dialog::Action
});
}
+ void restart_nic_drv_on_next_runtime_cfg()
+ {
+ _nic_drv_version++;
+ }
+
+ void restart_wifi_drv_on_next_runtime_cfg()
+ {
+ _wifi_drv_version++;
+ }
+
void wifi_disconnect() override
{
/*
diff --git a/repos/gems/src/app/sculpt_manager/runtime.h b/repos/gems/src/app/sculpt_manager/runtime.h
index 25dcc8a7e7..3b3efc5932 100644
--- a/repos/gems/src/app/sculpt_manager/runtime.h
+++ b/repos/gems/src/app/sculpt_manager/runtime.h
@@ -72,7 +72,7 @@ namespace Sculpt {
void gen_nic_drv_start_content(Xml_generator &);
void gen_wifi_drv_start_content(Xml_generator &);
- void gen_nic_router_start_content(Xml_generator &, Nic_target const &, bool, bool);
+ void gen_nic_router_start_content(Xml_generator &);
void gen_nic_router_uplink(Xml_generator &, char const *);
struct Prepare_version { unsigned value; };
diff --git a/repos/gems/src/app/sculpt_manager/runtime/nic_drv.cc b/repos/gems/src/app/sculpt_manager/runtime/nic_drv.cc
index f83e95d7a4..b1748ac67a 100644
--- a/repos/gems/src/app/sculpt_manager/runtime/nic_drv.cc
+++ b/repos/gems/src/app/sculpt_manager/runtime/nic_drv.cc
@@ -12,17 +12,21 @@
*/
#include
+#include
void Sculpt::gen_nic_drv_start_content(Xml_generator &xml)
{
gen_common_start_content(xml, "nic_drv", Cap_quota{300}, Ram_quota{16*1024*1024});
gen_named_node(xml, "resource", "CPU", [&] () { xml.attribute("quantum", "50"); });
- gen_provides(xml);
-
- xml.node("config", [&] () { });
+ xml.node("config", [&] () { xml.attribute("mode", "uplink_client"); });
xml.node("route", [&] () {
+
+ gen_service_node(xml, [&] () {
+ xml.node("child", [&] () {
+ xml.attribute("name", "nic_router"); }); });
+
gen_service_node(xml, [&] () {
xml.node("parent", [&] () {
xml.attribute("label", "nic"); }); });
diff --git a/repos/gems/src/app/sculpt_manager/runtime/nic_router.cc b/repos/gems/src/app/sculpt_manager/runtime/nic_router.cc
index cec8f54fed..56ef5ce652 100644
--- a/repos/gems/src/app/sculpt_manager/runtime/nic_router.cc
+++ b/repos/gems/src/app/sculpt_manager/runtime/nic_router.cc
@@ -18,10 +18,7 @@
#include
-void Sculpt::gen_nic_router_start_content(Xml_generator &xml,
- Nic_target const &nic_target,
- bool nic_drv_present,
- bool wifi_drv_present)
+void Sculpt::gen_nic_router_start_content(Xml_generator &xml)
{
gen_common_start_content(xml, "nic_router",
Cap_quota{300}, Ram_quota{10*1024*1024});
@@ -36,28 +33,6 @@ void Sculpt::gen_nic_router_start_content(Xml_generator &xml,
});
xml.node("route", [&] () {
-
- auto gen_nic_route = [&] (char const *label, char const *server) {
- gen_service_node(xml, [&] () {
- xml.attribute("label", label);
- gen_named_node(xml, "child", server); }); };
-
- /*
- * Define primary dependency first (for the graph layout), according to
- * the selected NIC target. We still keep routes to both NIC driver to
- * accommodate the NIC router in the intermediate phase when switching
- * the NIC target.
- */
- if (nic_target.wifi()) {
- if (wifi_drv_present) gen_nic_route("wifi", "wifi_drv");
- if (nic_drv_present) gen_nic_route("wired", "nic_drv");
- }
-
- if (nic_target.wired()) {
- if (nic_drv_present) gen_nic_route("wired", "nic_drv");
- if (wifi_drv_present) gen_nic_route("wifi", "wifi_drv");
- }
-
gen_parent_rom_route(xml, "nic_router");
gen_parent_rom_route(xml, "ld.lib.so");
gen_parent_rom_route(xml, "config", "config -> managed/nic_router");
@@ -67,15 +42,5 @@ void Sculpt::gen_nic_router_start_content(Xml_generator &xml,
gen_parent_route (xml);
gen_parent_route (xml);
gen_parent_route (xml);
-
- /*
- * If the NIC target is set to local, we define the route to the
- * drivers down here be avoid presenting it as primary route in the
- * deploy graph.
- */
- if (nic_target.local()) {
- if (nic_drv_present) gen_nic_route("wired", "nic_drv");
- if (wifi_drv_present) gen_nic_route("wifi", "wifi_drv");
- }
});
}
diff --git a/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc b/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc
index f32d7986c2..1bd9c2e414 100644
--- a/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc
+++ b/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc
@@ -17,10 +17,10 @@ void Sculpt::gen_wifi_drv_start_content(Xml_generator &xml)
{
gen_common_start_content(xml, "wifi_drv", Cap_quota{200}, Ram_quota{32*1024*1024});
- gen_provides(xml);
-
xml.node("config", [&] () {
+ xml.attribute("mode", "uplink_client");
+
xml.node("vfs", [&] () {
gen_named_node(xml, "dir", "dev", [&] () {
xml.node("null", [&] () {});
@@ -40,6 +40,14 @@ void Sculpt::gen_wifi_drv_start_content(Xml_generator &xml)
});
xml.node("route", [&] () {
+
+ xml.node("service", [&] () {
+ xml.attribute("name", "Uplink");
+ xml.node("child", [&] () {
+ xml.attribute("name", "nic_router");
+ });
+ });
+
gen_service_node(xml, [&] () {
xml.node("parent", [&] () {
xml.attribute("label", "wifi"); }); });
diff --git a/repos/libports/run/fetchurl.inc b/repos/libports/run/fetchurl.inc
index 81382b5418..2fc15977e4 100644
--- a/repos/libports/run/fetchurl.inc
+++ b/repos/libports/run/fetchurl.inc
@@ -46,6 +46,7 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/fetchurl \
[depot_user]/src/init \
[depot_user]/src/libc \
+ [depot_user]/src/nic_router \
[depot_user]/src/libcrypto \
[depot_user]/src/libssh \
[depot_user]/src/libssl \
@@ -82,11 +83,44 @@ install_config {
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/libports/run/libc_getaddrinfo.run b/repos/libports/run/libc_getaddrinfo.run
index a3c526ad86..01d67beeaa 100644
--- a/repos/libports/run/libc_getaddrinfo.run
+++ b/repos/libports/run/libc_getaddrinfo.run
@@ -10,6 +10,7 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/init \
[depot_user]/src/libc \
[depot_user]/src/posix \
+ [depot_user]/src/nic_router \
[depot_user]/src/vfs \
[depot_user]/src/vfs_lwip \
[depot_user]/src/zlib
@@ -44,9 +45,45 @@ install_config {
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -62,6 +99,10 @@ install_config {
+
+
+
+
}
diff --git a/repos/libports/run/lwip.run b/repos/libports/run/lwip.run
index 9a05446ccb..e158dac50b 100644
--- a/repos/libports/run/lwip.run
+++ b/repos/libports/run/lwip.run
@@ -33,6 +33,7 @@ create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_nic_pkg] \
[depot_user]/src/init \
+ [depot_user]/src/nic_router \
[depot_user]/src/libc \
[depot_user]/src/vfs_lwip \
[depot_user]/src/vfs
@@ -65,9 +66,48 @@ install_config {
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -79,6 +119,10 @@ install_config {
+
+
+
+
}
@@ -98,9 +142,9 @@ run_genode_until {.*Start the server loop.*\n} 30
if {[have_include "power_on/qemu"]} {
set uri "http://localhost:5555/"
} else {
- set match_string "lwIP Nic interface up address=.* netmask.*\n"
+ set match_string "nic_router. .uplink. dynamic IP config: interface .*\n"
regexp $match_string $output ip_addr
- regexp {[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+} $ip_addr ip_addr
+ regexp {[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+} $ip_addr ip_addr
set uri "http://$ip_addr:80/"
}
diff --git a/repos/libports/run/lwip_lx.run b/repos/libports/run/lwip_lx.run
index aa930856ce..8887f1a57d 100644
--- a/repos/libports/run/lwip_lx.run
+++ b/repos/libports/run/lwip_lx.run
@@ -1,3 +1,25 @@
+#
+# To execute this run script on your Linux host you have to do some
+# preparation:
+#
+# !) Setup a TAP device:
+# ! export USER=[YOUR_USER_NAME]
+# ! export TAP_DEV=tap0
+# ! sudo ip tuntap add dev $TAP_DEV mode tap USER $USER
+# ! sudo ip address flush dev $TAP_DEV
+# ! sudo ip address add 10.0.2.1/24 brd 10.0.2.255 dev $TAP_DEV
+# ! sudo ip link set dev $TAP_DEV addr 02:00:00:ca:fe:01
+# ! sudo ip link set dev $TAP_DEV up
+#
+# 2) Now, start the test and connect using your favorite HTTP client, e.g.:
+# ! cd /build/x86_64
+# ! make run/lwip_lx KERNEL=linux BOARD=linux
+# ! lynx -dump http://10.0.2.55
+#
+# 3) Clean up your Linux when done testing:
+# ! sudo ip tuntap delete $TAP_DEV mode tap
+#
+
assert_spec linux
#
@@ -9,6 +31,7 @@ build {
drivers/nic
test/lwip/http_srv
lib/vfs/lwip
+ server/nic_router
}
create_boot_directory
@@ -19,6 +42,7 @@ create_boot_directory
set config {
+
@@ -29,28 +53,66 @@ set config {
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
}
@@ -63,6 +125,7 @@ install_config $config
set boot_modules {
core init timer linux_nic_drv
ld.lib.so libc.lib.so vfs.lib.so vfs_lwip.lib.so test-lwip_httpsrv
+ nic_router
}
build_boot_image $boot_modules
diff --git a/repos/libports/run/netty.inc b/repos/libports/run/netty.inc
index 0ff57fdfc9..08aa3cbbb0 100644
--- a/repos/libports/run/netty.inc
+++ b/repos/libports/run/netty.inc
@@ -6,6 +6,7 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/dynamic_rom \
[depot_user]/src/init \
[depot_user]/src/libc \
+ [depot_user]/src/nic_router \
[depot_user]/src/vfs_audit \
[depot_user]/src/vfs_lxip \
[depot_user]/src/vfs
@@ -38,10 +39,53 @@ append config {
+
-
- }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
append_if [use_dynamic_rom] config {
@@ -74,18 +118,25 @@ append_if [use_dynamic_rom] config {
}
append config {
+
- }
+
+
+ }
if {[use_dynamic_rom]} { append config {
-
+
- }
+ }
+
} else { append config {
+
+
+
@@ -94,12 +145,12 @@ if {[use_dynamic_rom]} { append config {
- }
+ }
}
append config {
-
-}
+
+ }
append qemu_args " -nographic "
append_qemu_nic_args
diff --git a/repos/libports/run/netty_lwip.inc b/repos/libports/run/netty_lwip.inc
index c1c496b92f..bedd22d431 100644
--- a/repos/libports/run/netty_lwip.inc
+++ b/repos/libports/run/netty_lwip.inc
@@ -3,12 +3,14 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_nic_pkg] \
[depot_user]/src/init \
[depot_user]/src/libc \
+ [depot_user]/src/nic_router \
[depot_user]/src/vfs_audit \
[depot_user]/src/vfs_lwip \
[depot_user]/src/vfs
append config {
+
@@ -20,36 +22,84 @@ append config {
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/repos/libports/run/netty_lwip_tcp.run b/repos/libports/run/netty_lwip_tcp.run
index b223fde751..c11bdf526d 100644
--- a/repos/libports/run/netty_lwip_tcp.run
+++ b/repos/libports/run/netty_lwip_tcp.run
@@ -32,7 +32,7 @@ append config {
-
+
@@ -44,7 +44,7 @@ append config {
-
+
diff --git a/repos/libports/run/netty_lxip_tcp.run b/repos/libports/run/netty_lxip_tcp.run
index 018db1dea1..89401504aa 100644
--- a/repos/libports/run/netty_lxip_tcp.run
+++ b/repos/libports/run/netty_lxip_tcp.run
@@ -32,7 +32,7 @@ append config {
-
+
@@ -44,7 +44,7 @@ append config {
-
+
diff --git a/repos/libports/run/nic_bridge.run b/repos/libports/run/nic_bridge.run
index 0cb6c6dce1..e7058378a0 100644
--- a/repos/libports/run/nic_bridge.run
+++ b/repos/libports/run/nic_bridge.run
@@ -11,7 +11,7 @@ if {[have_board rpi3]} {
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
- [depot_user]/pkg/[drivers_nic_pkg] \
+ [depot_user]/src/nic_router \
[depot_user]/src/init \
[depot_user]/src/libc \
[depot_user]/src/nic_bridge \
@@ -42,15 +42,23 @@ install_config {
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -63,7 +71,7 @@ install_config {
-
+
diff --git a/repos/libports/run/sntp_client.run b/repos/libports/run/sntp_client.run
index c369586c94..e6fd21a806 100644
--- a/repos/libports/run/sntp_client.run
+++ b/repos/libports/run/sntp_client.run
@@ -14,6 +14,7 @@ create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_nic_pkg] \
+ [depot_user]/src/nic_router \
[depot_user]/src/init
build { app/sntp_client server/report_rom }
@@ -54,14 +55,53 @@ append config {
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}
diff --git a/repos/os/recipes/raw/drivers_nic-linux/drivers.config b/repos/os/recipes/raw/drivers_nic-linux/drivers.config
index 667435e4a7..f6f3275425 100644
--- a/repos/os/recipes/raw/drivers_nic-linux/drivers.config
+++ b/repos/os/recipes/raw/drivers_nic-linux/drivers.config
@@ -8,18 +8,15 @@
+
-
-
-
-
-
+
diff --git a/repos/os/recipes/raw/drivers_nic-pbxa9/drivers.config b/repos/os/recipes/raw/drivers_nic-pbxa9/drivers.config
index 3cad1eb049..32256e822d 100644
--- a/repos/os/recipes/raw/drivers_nic-pbxa9/drivers.config
+++ b/repos/os/recipes/raw/drivers_nic-pbxa9/drivers.config
@@ -8,13 +8,11 @@
+
-
-
-
@@ -40,17 +38,17 @@
-
-
+
-
-
-
-
-
+
+
+
+
+
+
diff --git a/repos/os/recipes/raw/drivers_nic-virt_qemu/drivers.config b/repos/os/recipes/raw/drivers_nic-virt_qemu/drivers.config
index 6ee156fa50..49fd168e37 100644
--- a/repos/os/recipes/raw/drivers_nic-virt_qemu/drivers.config
+++ b/repos/os/recipes/raw/drivers_nic-virt_qemu/drivers.config
@@ -8,13 +8,11 @@
+
-
-
-
@@ -38,8 +36,8 @@
-
-
+
+
@@ -48,6 +46,7 @@
+
diff --git a/repos/os/recipes/raw/drivers_nic-zynq/drivers.config b/repos/os/recipes/raw/drivers_nic-zynq/drivers.config
index aec45be0a7..41cc70aace 100644
--- a/repos/os/recipes/raw/drivers_nic-zynq/drivers.config
+++ b/repos/os/recipes/raw/drivers_nic-zynq/drivers.config
@@ -1,4 +1,5 @@
+
@@ -8,18 +9,16 @@
+
-
-
-
-
-
+
+
diff --git a/repos/os/run/nic_dump.run b/repos/os/run/nic_dump.run
index 5378f0b0d7..7228ef2ab2 100644
--- a/repos/os/run/nic_dump.run
+++ b/repos/os/run/nic_dump.run
@@ -27,7 +27,9 @@ proc bad_dst_port { } { return "12345" }
proc bad_dst_ip { } { return "10.0.1.2" }
append config {
+
+
@@ -38,9 +40,11 @@ append config {
+
+
@@ -54,16 +58,48 @@ append config {
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
+
+
-
+
@@ -124,9 +158,7 @@ append config {
-
+
@@ -148,7 +180,7 @@ append config {
-
+
@@ -162,7 +194,7 @@ append config {
period_sec="1"
verbose="no"/>
-
+
@@ -176,7 +208,7 @@ append config {
period_sec="1"
verbose="no"/>
-
+
@@ -219,9 +251,10 @@ append config {
- }
+ }
append_if $on_hardware config {
+
@@ -235,10 +268,11 @@ append_if $on_hardware config {
- }
+ }
append config {
-}
+
+ }
install_config $config
build_boot_image { ping nic_dump }
diff --git a/repos/os/run/nic_router_disable_arp.run b/repos/os/run/nic_router_disable_arp.run
index 41d2b8b6a9..773022d07a 100644
--- a/repos/os/run/nic_router_disable_arp.run
+++ b/repos/os/run/nic_router_disable_arp.run
@@ -44,9 +44,9 @@ append config {
+
-
@@ -57,8 +57,8 @@ append config {
-
-
+
+
@@ -69,10 +69,6 @@ append config {
-
-
-
-
@@ -99,7 +95,7 @@ append_qemu_nic_args
set done_string ".*child \"ping\" exited with exit value 0.*\n"
-run_genode_until $done_string 10
+run_genode_until $done_string 30
grep_output { ARP }
compare_output_to {}
diff --git a/repos/os/run/nic_router_flood.run b/repos/os/run/nic_router_flood.run
index f2045b0e63..14b77c6b96 100644
--- a/repos/os/run/nic_router_flood.run
+++ b/repos/os/run/nic_router_flood.run
@@ -57,9 +57,9 @@ install_config {
+
-
@@ -80,7 +80,7 @@ install_config {
-
+
-
+
-
diff --git a/repos/os/run/ping.run b/repos/os/run/ping.run
index 1e7d53b521..8f64730298 100644
--- a/repos/os/run/ping.run
+++ b/repos/os/run/ping.run
@@ -66,7 +66,7 @@ create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_nic_pkg] \
[depot_user]/src/init \
- [depot_user]/src/nic_bridge
+ [depot_user]/src/nic_router
build { app/ping }
@@ -87,7 +87,9 @@ proc dst_ip { } {
}
append config {
+
+
@@ -98,9 +100,11 @@ append config {
+
+
@@ -113,26 +117,43 @@ append config {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
append_if $second_ping_via_udp config {
+
@@ -143,12 +164,13 @@ append_if $second_ping_via_udp config {
dst_ip="} [dst_ip] {"
dst_port="12345"/>
-
+
- }
+ }
append config {
+
@@ -157,11 +179,12 @@ append config {
verbose="no"
count="3"/>
-
+
-}
+
+ }
install_config $config
build_boot_image { ping }
diff --git a/repos/os/run/ping_nic_router.run b/repos/os/run/ping_nic_router.run
index 7a041f1035..14e323ed99 100644
--- a/repos/os/run/ping_nic_router.run
+++ b/repos/os/run/ping_nic_router.run
@@ -54,9 +54,9 @@ append config {
+
-
@@ -70,9 +70,9 @@ append config {
dhcp_discover_timeout_sec="1"
icmp_idle_timeout_sec="6">
-
-
-
+
+
+
@@ -94,10 +94,6 @@ append config {
-
-
-
-
diff --git a/repos/os/run/vmm_arm.run b/repos/os/run/vmm_arm.run
index cf06fec85d..83a810c5a5 100644
--- a/repos/os/run/vmm_arm.run
+++ b/repos/os/run/vmm_arm.run
@@ -46,7 +46,10 @@ install_config {
-
+
+
+
+
diff --git a/repos/ports/run/genode_org.run b/repos/ports/run/genode_org.run
index 38e6bb1c1e..d72c6dc2c5 100644
--- a/repos/ports/run/genode_org.run
+++ b/repos/ports/run/genode_org.run
@@ -13,6 +13,7 @@ create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_nic_pkg] \
[depot_user]/src/init \
+ [depot_user]/src/nic_router \
[depot_user]/src/libc \
[depot_user]/src/libcrypto \
[depot_user]/src/libssh \
@@ -51,9 +52,47 @@ install_config {
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -75,7 +114,12 @@ install_config {
+
+
+
+
+
}
#
diff --git a/repos/ports/run/lighttpd.run b/repos/ports/run/lighttpd.run
index cf6a099e83..6037d7cc49 100644
--- a/repos/ports/run/lighttpd.run
+++ b/repos/ports/run/lighttpd.run
@@ -24,6 +24,7 @@ create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_nic_pkg] \
[depot_user]/src/init \
+ [depot_user]/src/nic_router \
[depot_user]/src/libc \
[depot_user]/src/libcrypto \
[depot_user]/src/libssh \
@@ -62,9 +63,47 @@ install_config {
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -173,6 +212,12 @@ EpA5DBBklj8UE2CdONvN
+
+
+
+
+
+
}
diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc
index 8653bcbb4d..cb3f50c6d8 100644
--- a/repos/ports/run/netperf.inc
+++ b/repos/ports/run/netperf.inc
@@ -5,19 +5,8 @@
# \date 2013-04-18
#
-if {[expr $use_nic_bridge && $use_nic_router]} {
- puts "Cannot test with both NIC bridge and NIC router.";
- exit 0
-}
-
-if {[get_cmd_switch --autopilot] && [have_include "power_on/qemu"]} {
- puts "\nRunning netperf in autopilot on Qemu is not recommended.\n"
- exit
-}
-
-if {[have_include "power_on/qemu"] &&
- [expr $use_nic_bridge || $use_nic_router || $use_usb_driver || $use_wifi_driver]} {
- puts "Cannot test this configuration on qemu.";
+if {[have_include "power_on/qemu"]} {
+ puts "\nRun script does not support Qemu.\n"
exit 0
}
@@ -26,7 +15,7 @@ if {[have_board imx53_qsb_tz]} {
exit 0
}
-set bridge_mac "02:02:02:02:02:00"
+set bridge_mac "02:02:02:02:16:00"
# autopilot: configure disjoint mac-address ranges for x86_32, x86_64, and others
if {[get_cmd_switch --autopilot]} {
@@ -74,14 +63,13 @@ set packages "
[depot_user]/src/libc
[depot_user]/src/posix
[depot_user]/src/vfs
+ [depot_user]/src/nic_router
"
append_if [expr !$use_lxip] packages " [depot_user]/src/vfs_lwip "
append_if $use_lxip packages " [depot_user]/src/vfs_lxip "
append_if $use_nic_bridge packages " [depot_user]/src/nic_bridge "
-append_if $use_nic_router packages " [depot_user]/src/nic_router "
append_if $use_usb_driver packages " [depot_user]/src/platform_drv "
-append_if $use_usb_driver packages " [depot_user]/src/usb_drv "
append_if $use_wifi_driver packages " [depot_user]/src/fs_rom "
append_if $use_wifi_driver packages " [depot_user]/src/vfs_import "
append_if $use_wifi_driver packages " [depot_user]/src/report_rom "
@@ -93,7 +81,12 @@ append_if $use_wifi_driver packages " [depot_user]/raw/wifi_firmware "
import_from_depot $packages
-build { app/netperf }
+set build_components { app/netperf }
+
+append_if $use_usb_driver build_components " drivers/usb_host "
+append_if $use_usb_driver build_components " drivers/usb_net "
+
+build $build_components
#
# Generate config
@@ -106,7 +99,7 @@ proc platform_drv_policy {} {
global use_wifi_driver
if { $use_wifi_driver } {
return { }}
- return { }
+ return { }
}
set config {
@@ -171,9 +164,8 @@ append config {
-
-
-
+
+
@@ -189,88 +181,133 @@ append config {
+
}
} elseif { $use_usb_driver } {
+
append_platform_drv_config
append config {
-
-
-
-
-
-
-
- }
-} else {
+
+ }
+
+ append config ""
append config {
+
+
+
+ }
+
+ append_if [have_board arndale] config {
+
+ }
+
+ append_if [have_board rpi] config {
+
+ }
+
+ append_if [have_spec x86] config {
+
+ }
+
+ append config {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+} else {
+
+ append config {
+
+
-
}
}
-append_if $use_nic_router config {
+append config {
+
-
+ }
-
-
+if {$use_nic_bridge} { append config {
+
+ }
+
+} else { append config {
+
+ }
+}
+append config {
+
+
+
+
-
+
-
-
-
-
-
-}
+ }
append_if $use_nic_bridge config {
+
- }
-append_if [expr $use_nic_bridge && [have_spec linux]] config "
- "
-append_if $use_nic_bridge config {
+
-
+
}
append config {
+
@@ -285,34 +322,40 @@ append config {
2018-01-01 00:01
- <} [socket_fs_plugin] { }
-if {[expr [have_spec linux] && !$use_nic_router]} {
- append config " ip_addr=\"$lx_ip_addr\" netmask=\"255.255.255.0\" gateway=\"10.0.2.1\""
-} else {
- append config " dhcp=\"yes\""
-}
-append config {/>
+ <} [socket_fs_plugin] { dhcp="yes"/>
- }
-append_if $use_nic_bridge config {
+
-
-
- }
-append_if $use_nic_router config {
-
-
-
- }
-append config {
-
-
}
+if { $use_nic_bridge } {
+
+ append config {
+
+ }
+
+} else {
+
+ append config {
+
+ }
+}
+append config {
+
+
+
+
+
+ }
install_config $config
-build_boot_image { netserver }
+set boot_modules { netserver }
+
+append_if $use_usb_driver boot_modules " [usb_host_drv_binary] "
+append_if $use_usb_driver boot_modules " usb_net_drv "
+
+build_boot_image $boot_modules
#
# Execute test case
@@ -322,17 +365,8 @@ build_boot_image { netserver }
append qemu_args " -nographic "
append_qemu_nic_args "hostfwd=tcp::12865-:12865,hostfwd=tcp::49153-:49153"
-set ip_match_string ""
-set force_ports ""
-if $use_lxip {
- set ip_match_string "ipaddr=(\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+).*\n"
-} else {
- set ip_match_string "address=(\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+).*\n"
-}
-if $use_nic_router {
- set ip_match_string "nic_router\\\] \\\[uplink\\\] dynamic IP config: interface (\[0-9]{1,3}.\[0-9]{1,3}.\[0-9]{1,3}.\[0-9]{1,3}).*\n"
- set force_ports "-P 12864,12864"
-}
+set ip_match_string "nic_router\\\] \\\[uplink\\\] dynamic IP config: interface (\[0-9]{1,3}.\[0-9]{1,3}.\[0-9]{1,3}.\[0-9]{1,3}).*\n"
+set force_ports "-P 12864,12864"
if {[have_spec linux]} {
run_genode_until {.*family AF_INET.*\n} 60
@@ -387,7 +421,6 @@ foreach netperf_test $netperf_tests {
# format output parseable for post proccessing scripts
puts -nonewline "! PERF: $netperf_test"
if {$use_nic_bridge} { puts -nonewline "_bridge" }
- if {$use_nic_router} { puts -nonewline "_router" }
if {$use_usb_driver} { puts -nonewline "_xhci" }
puts " [lindex $throughput 1] MBit/s ok"
}
diff --git a/repos/ports/run/netperf_lwip.run b/repos/ports/run/netperf_lwip.run
index df8e8e8f1a..5cdc316550 100644
--- a/repos/ports/run/netperf_lwip.run
+++ b/repos/ports/run/netperf_lwip.run
@@ -7,7 +7,6 @@
# network configuration
set use_nic_bridge 0
-set use_nic_router 0
set use_wifi_driver 0
set use_usb_driver 0
set use_lxip 0
diff --git a/repos/ports/run/netperf_lwip_bridge.run b/repos/ports/run/netperf_lwip_bridge.run
index 252e7b9a57..eaded65248 100644
--- a/repos/ports/run/netperf_lwip_bridge.run
+++ b/repos/ports/run/netperf_lwip_bridge.run
@@ -7,7 +7,6 @@
# network configuration
set use_nic_bridge 1
-set use_nic_router 0
set use_wifi_driver 0
set use_usb_driver 0
set use_lxip 0
diff --git a/repos/ports/run/netperf_lwip_router.run b/repos/ports/run/netperf_lwip_router.run
deleted file mode 100644
index 13d5b4ea95..0000000000
--- a/repos/ports/run/netperf_lwip_router.run
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# \brief Test using netperf with a NIC router and with a native driver or
-# if not available for the platform using usb 3.0 by default
-# \author Martin Stein
-# \date 2017-12-19
-#
-
-# network configuration
-set use_nic_bridge 0
-set use_nic_router 1
-set use_wifi_driver 0
-set use_usb_driver 0
-set use_lxip 0
-
-source ${genode_dir}/repos/ports/run/netperf.inc
diff --git a/repos/ports/run/netperf_lwip_usb30.run b/repos/ports/run/netperf_lwip_usb30.run
index 9cf5aad44e..0f8ddb6024 100644
--- a/repos/ports/run/netperf_lwip_usb30.run
+++ b/repos/ports/run/netperf_lwip_usb30.run
@@ -15,7 +15,6 @@ if {[have_include "power_on/qemu"] || [have_include "power_on/linux"]} {
# network configuration
set use_nic_bridge 0
-set use_nic_router 0
set use_wifi_driver 0
set use_usb_driver 1
set use_lxip 0
diff --git a/repos/ports/run/netperf_lwip_wifi.run b/repos/ports/run/netperf_lwip_wifi.run
index 87b768beec..d33003d19b 100644
--- a/repos/ports/run/netperf_lwip_wifi.run
+++ b/repos/ports/run/netperf_lwip_wifi.run
@@ -24,7 +24,6 @@ if {[get_cmd_switch --autopilot] && [have_spec x86_32] &&
# network configuration
set use_nic_bridge 0
-set use_nic_router 0
set use_wifi_driver 1
set use_usb_driver 0
set use_lxip 0
diff --git a/repos/ports/run/netperf_lxip.run b/repos/ports/run/netperf_lxip.run
index bdec1eaf57..ed92eb2605 100644
--- a/repos/ports/run/netperf_lxip.run
+++ b/repos/ports/run/netperf_lxip.run
@@ -7,7 +7,6 @@
# network configuration
set use_nic_bridge 0
-set use_nic_router 0
set use_wifi_driver 0
set use_usb_driver 0
set use_lxip 1
diff --git a/repos/ports/run/netperf_lxip_bridge.run b/repos/ports/run/netperf_lxip_bridge.run
index 7b56275bf9..725daac18e 100644
--- a/repos/ports/run/netperf_lxip_bridge.run
+++ b/repos/ports/run/netperf_lxip_bridge.run
@@ -7,7 +7,6 @@
# network configuration
set use_nic_bridge 1
-set use_nic_router 0
set use_wifi_driver 0
set use_usb_driver 0
set use_lxip 1
diff --git a/repos/ports/run/netperf_lxip_router.run b/repos/ports/run/netperf_lxip_router.run
deleted file mode 100644
index 7cf39fea58..0000000000
--- a/repos/ports/run/netperf_lxip_router.run
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# \brief Test using netperf with a NIC router and with a native driver or
-# if not available for the platform using usb 3.0 by default
-# \author Martin Stein
-# \date 2017-12-19
-#
-
-# network configuration
-set use_nic_bridge 0
-set use_nic_router 1
-set use_wifi_driver 0
-set use_usb_driver 0
-set use_lxip 1
-
-source ${genode_dir}/repos/ports/run/netperf.inc
diff --git a/repos/ports/run/netperf_lxip_usb30.run b/repos/ports/run/netperf_lxip_usb30.run
index bb499fbde7..e289caf1bf 100644
--- a/repos/ports/run/netperf_lxip_usb30.run
+++ b/repos/ports/run/netperf_lxip_usb30.run
@@ -15,7 +15,6 @@ if {[have_include "power_on/qemu"] || [have_include "power_on/linux"]} {
# network configuration
set use_nic_bridge 0
-set use_nic_router 0
set use_wifi_driver 0
set use_usb_driver 1
set use_lxip 1
diff --git a/repos/ports/run/netperf_lxip_wifi.run b/repos/ports/run/netperf_lxip_wifi.run
index 18c240bc93..e127e641f6 100644
--- a/repos/ports/run/netperf_lxip_wifi.run
+++ b/repos/ports/run/netperf_lxip_wifi.run
@@ -24,7 +24,6 @@ if {[get_cmd_switch --autopilot] && [have_spec x86_32] &&
# network configuration
set use_nic_bridge 0
-set use_nic_router 0
set use_wifi_driver 1
set use_usb_driver 0
set use_lxip 1
diff --git a/repos/ports/run/seoul-auto.run b/repos/ports/run/seoul-auto.run
index d34a4bad81..687cd3c2a1 100644
--- a/repos/ports/run/seoul-auto.run
+++ b/repos/ports/run/seoul-auto.run
@@ -32,7 +32,6 @@ set use_block_sata 0
set use_part_block 0
set use_nic_session 1
-set use_nic_bridge 0
set use_usb 0
diff --git a/repos/ports/run/seoul-disc.run b/repos/ports/run/seoul-disc.run
index 9b38aec3be..c6e8c428a9 100644
--- a/repos/ports/run/seoul-disc.run
+++ b/repos/ports/run/seoul-disc.run
@@ -19,7 +19,6 @@ set use_block_sata 0
set use_part_block 0
set use_nic_session 1
-set use_nic_bridge 0
set use_usb 0
diff --git a/repos/ports/run/seoul-fancy.run b/repos/ports/run/seoul-fancy.run
index f1a2b4f5fa..f78a4468c3 100644
--- a/repos/ports/run/seoul-fancy.run
+++ b/repos/ports/run/seoul-fancy.run
@@ -22,7 +22,6 @@ set use_block_sata 0
set use_part_block 0
set use_nic_session 1
-set use_nic_bridge 1
set use_usb 0
diff --git a/repos/ports/run/seoul-genode.run b/repos/ports/run/seoul-genode.run
index e66abd22e6..ec18a875bf 100644
--- a/repos/ports/run/seoul-genode.run
+++ b/repos/ports/run/seoul-genode.run
@@ -20,7 +20,6 @@ set use_block_sata 0
set use_part_block 0
set use_nic_session 1
-set use_nic_bridge 0
set use_usb 0
diff --git a/repos/ports/run/seoul-kernelbuild.run b/repos/ports/run/seoul-kernelbuild.run
index e91f5a4c80..a874fa22ca 100644
--- a/repos/ports/run/seoul-kernelbuild.run
+++ b/repos/ports/run/seoul-kernelbuild.run
@@ -26,7 +26,6 @@ set use_block_sata 0
set use_part_block 0
set use_nic_session 0
-set use_nic_bridge 0
set use_usb 0
diff --git a/repos/ports/run/seoul-net.run b/repos/ports/run/seoul-net.run
index bfe4c32a54..6f3061f045 100644
--- a/repos/ports/run/seoul-net.run
+++ b/repos/ports/run/seoul-net.run
@@ -19,7 +19,6 @@ set use_block_sata 0
set use_part_block 0
set use_nic_session 1
-set use_nic_bridge 0
set use_usb 0
diff --git a/repos/ports/run/seoul.inc b/repos/ports/run/seoul.inc
index 90032c1d8d..8e11a18cd8 100644
--- a/repos/ports/run/seoul.inc
+++ b/repos/ports/run/seoul.inc
@@ -73,7 +73,7 @@ lappend_if $use_usb build_components drivers/usb
lappend_if $use_vfs_block build_components server/vfs_block
lappend_if $use_drv_ahci build_components drivers/ahci
lappend_if $use_nic_session build_components drivers/nic
-lappend_if $use_nic_bridge build_components server/nic_bridge
+lappend_if $use_nic_session build_components server/nic_router
lappend_if $use_framebuffer build_components drivers/framebuffer
lappend_if $use_fancy_stuff build_components app/status_bar
lappend_if $use_fancy_stuff build_components app/launchpad
@@ -329,23 +329,50 @@ append_if $use_genode_iso config {
append_platform_drv_config
append_if $use_nic_session config {
+
-
-
-}
-
-append_if [expr $use_nic_session && $use_nic_bridge] config {
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}
append_if $use_framebuffer config {
@@ -376,10 +403,8 @@ append config {
}
-append_if [expr $use_nic_session && $use_nic_bridge] config {
- }
-append_if [expr $use_nic_session && !$use_nic_bridge] config {
- }
+append_if [expr $use_nic_session] config {
+ }
append_if $use_genode_iso config {
@@ -469,7 +494,7 @@ append_if $use_fancy_stuff config {
-
+
@@ -544,7 +569,7 @@ lappend_if $use_vfs_block boot_modules vfs_block
lappend_if $use_vfs_block boot_modules vfs.lib.so
lappend_if $use_drv_ahci boot_modules ahci_drv
lappend_if $use_nic_session boot_modules ipxe_nic_drv
-lappend_if $use_nic_bridge boot_modules nic_bridge
+lappend_if $use_nic_session boot_modules nic_router
lappend_if $use_framebuffer boot_modules vesa_fb_drv
lappend_if $use_fancy_stuff boot_modules status_bar
diff --git a/repos/ports/run/vbox_share.inc b/repos/ports/run/vbox_share.inc
index 9b1dd2733c..357a4dc05e 100644
--- a/repos/ports/run/vbox_share.inc
+++ b/repos/ports/run/vbox_share.inc
@@ -106,6 +106,7 @@ set build_components {
server/report_rom server/fs_rom server/vfs
server/tcp_terminal drivers/nic
lib/vfs/lwip lib/vfs/pipe lib/vfs/import
+ server/nic_router
}
#
@@ -115,7 +116,7 @@ foreach pkg {bash coreutils} {
lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg }
set boot_modules {
- vfs fs_rom
+ vfs fs_rom nic_router
posix.lib.so bash.tar coreutils.tar
tcp_terminal vfs_lwip.lib.so vfs_pipe.lib.so vfs_import.lib.so
ipxe_nic_drv report_rom event_filter
@@ -125,10 +126,50 @@ set boot_modules {
append boot_modules $vbox_file
set config_of_app {
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -143,6 +184,10 @@ set config_of_app {
+
+
+
+
@@ -358,7 +403,7 @@ exec cp ${genode_dir}/repos/ports/run/$vbox_file bin/.
build_boot_image $boot_modules
-set ip_match_string "address=(\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+).*\n"
+set ip_match_string "nic_router\\\] \\\[uplink\\\] dynamic IP config: interface (\[0-9]{1,3}.\[0-9]{1,3}.\[0-9]{1,3}.\[0-9]{1,3}).*\n"
#
# Step 2: Read out TCP/IP address of tcp_terminal running on Genode target
diff --git a/repos/ports/run/vbox_win.inc b/repos/ports/run/vbox_win.inc
index 40a904595a..b905884e0c 100644
--- a/repos/ports/run/vbox_win.inc
+++ b/repos/ports/run/vbox_win.inc
@@ -25,6 +25,7 @@ if {[info exists flavor_extension]} {
}
set build_components {
+ server/nic_router
server/event_filter
drivers/nic
drivers/audio
@@ -33,6 +34,7 @@ set build_components {
}
set boot_modules {
+ nic_router
event_filter
ipxe_nic_drv
pci_audio_drv
@@ -73,9 +75,44 @@ set config_of_app {
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+