Hi Pirmin,
On 23/06/2023 11:00, Duss Pirmin wrote:
Hello Johannes,
Thank you for sharing your thoughts.
On 21.06.23 14:47, Johannes Schlatow wrote:
In principle, such extensions are reasonable. In the case of jitter_sponge, however, this would mean that we needed to make the Goa release dependent on the genode-world repo. I would rather avoid this.
I see your point. As we see no reasonable alternative, we will keep and maintain our own patch for this.
From my perspective: I'd appreciate your contribution ;-)
I'm working on bringing the patch to staging. I created issue #55 for this. I'm almost finished with the updated patch.
Providing multiple Nic/Uplink interfaces and a nic_router will require some more engineering to do right. Our workaround instantiates a fixed configuration which matches what we need. This is obviously not usable in general. I see the following points that need to be considered:
- number and names of interfaces? Probably each listed in <requires> by label.
Currently (i.e. with #44), Goa uses the label as the name of the tap device. Do we agree that, if multiple <nic/> requirements exists, Goa should instantiate several nic_drv components and provide separated networks?
In our case, we deploy the resulting pkg archive to real hardware, which provides a nic_router outside of the runtime. Depending on the platform the runtime is executed on, I prefer more general name mapping accordingly. Therefore I suggest on `eth0` to `ethX`, which is mapped to `tap0` to `tapX` for the Linux case.
Currently, the label of the required nic service determines the name of the tap device in Goa. I understand that, to make archives deployable, one would not want to have a "tapX" label in the runtime. What about we'd be prefixing the specified label by a "tap_" e.g. instead? This way you could have a "eth0" label, which will get mapped to a "tap_eth0" device by Goa.
- when to start nic_router? Probably not as easy as start it when multiple interfaces are configured.
For a <nic/> requirement, the nic_router is always instantiated because only the latter provides this service whereas the nic_drv acts as an Uplink client. When multiple nic drivers will be instantiated (i.e. separate networks are required), we could also have multiple instances of the nic_router.
I like the idea of starting a separate nic_router per <nic label=""/>! I would also start a nic_drv for each to make things easy and straightforward.
This should be pretty straightforward to implement. Would you mind opening an issue for this so we can continue the discussion on github?
- how should the nic_router config be provided? Here I don not see yet a satisfying and practical solution.
For customising the nic_router config, I would go for integrating the nic_router into the pkg's runtime and, instead of using <nic/> requirements, let the pkg provide a couple of <uplink/> services. This would instruct Goa to instantiate multiple nic drivers (currently restricted to one driver) as Uplink clients.
Our use case is that we want to utilize Goa to build Gateway applications that may require multiple network interfaces. We want to test the pkg runtime on Linux via tap devices and then build and deploy the pkg to the Gateway hardware. The device that the pkg archive is deployed to also runs other sub-systems that require networking. By integrating a nic_router in the pkg runtime that provides the Uplink sessions, the nic drivers would be limited to networking for that particular pkg runtime, right?
The major difference between Goa and hardware deployments is that the latter usually have one or multiple managed Nic router(s) while Goa has no way to customize the Nic router config (yet). The current workaround has been to create an pkg archive in Goa that is deployable on hardware and add another Goa project that wraps a Nic router with a custom config around the other pkg. You can find an example of this in my goa-pkgs repo [1] where I have a vnc_server and a test-vnc_server project.
I see that, an some point, we probably need to integrate a means to provide Goa with a custom Nic router config. Maybe this could be done by adding a 'nic_router.config' file into the project directory. If this file is present, Goa would take its content as config for the Nic router instead of the default config. However, what shall happen if there are multiple Nic router instances?
[1] https://github.com/jschlatow/goa-pkgs
Cheers Johannes