genodelabs / goa

Tool for streamlining the development of Genode applications
GNU Affero General Public License v3.0
19 stars 18 forks source link

run-stage: start a `nic_router` and a `nic_drv` for each required `<nic label=""/>` #57

Closed trimpim closed 1 year ago

trimpim commented 1 year ago

To simplify testing of projects that use multiple NIC interfaces we should start a nic_router and anic_drv for each required <nic label=""/>.

This comes from the discussion on the mailing list see: https://lists.genode.org/pipermail/users/2023-June/008754.html

jschlatow commented 1 year ago

@trimpim I just pushed two commits: one that adds support for multiple nic requirements and another one for changing the naming scheme for the used tap devices.

trimpim commented 1 year ago

@jschlatow I have tested your commits.

f0ebcae fixes the following issues:

I have reduced the number of arguments in the call to _instantiate_network by replacing tap_name and router_name with only label and calculating them in the procedure.

jschlatow commented 1 year ago

@trimpim I guess I was a bit hasty yesterday. Thanks for the fixup. I split it into 2f1d606 and b0daa7a because I'd like to keep the change of the tap device names as a separate commit. I also added some modifications:

jschlatow commented 1 year ago

@trimpim I actually like the suggestion from @nfeske on the mailing list about using a separate XML attribute to explicitly specify the tap-device name. This not only avoids introducing a convention but also allows a larger variety of scenarios, e.g. different nic requirements could be assigned to the same virtual network by using the same tap name. Internally, Goa will only instantiate a single pair of nic driver and nic router for each distinct tap device. Do you have anything to add?

trimpim commented 1 year ago

@jschlatow I'm fine with that. I will gladly test the changes with our scenario.

jschlatow commented 1 year ago

@trimpim I've force pushed a new commit 00061cb.