Explicit routing

Guido Witmond guido at witmond.nl
Sun Sep 2 17:38:28 CEST 2018


Hi Genodians,

I'm stuck with service routing. When I use the default routes the 
hello-application works. When I remove the default and create explicit 
routes for the ROM-service these fail. Here's my writeup:

I added this line to repos/os/src/init/child.cc:
   Init::Child::resolve_session_request(
   +  log("child \"", name(), "\" resolves \"",
	service_name, "\" label [", label, "]");

It logs which child is resolving what service and label. With default 
routing, I get this output (for ROMs) in make run/hello:

Genode 18.05-203-gf4ea50c6f <local changes>
[init] child "hello_client" resolves "ROM" label [hello_client]
[init] child "hello_client" resolves "ROM" label [ld.lib.so]
[init] child "hello_server" resolves "ROM" label [hello_server]
[init] child "hello_server" resolves "ROM" label [ld.lib.so]
[init] child "hello_server" resolves "ROM" label [hello_server -> config]
[init] child "hello_client" resolves "ROM" label [hello_client -> config]
[init] child "hello_server" resolves "ROM" label [hello_server -> 
session_requests]
...
[init -> hello_client] hello test completed

So far so good.

However, when I take out the <default-route> entry and add explicit 
routes to hello.run for the hello-client serivce:

   <route>
     <service name="PD"> <parent/> </service>
     <service name="CPU"> <parent/> </service>
     <service name="LOG"> <parent/> </service>
     <service name="Hello"> <child name="hello_server"/> </service>
     <service name="ROM" label="hello_client"> <parent/> </service>
     <service name="ROM" label="ld.lib.so"> <parent/> </service>
     <service name="ROM" label="hello_client -> config"> <parent/>
         </service>
     <service name="ROM" label="hello_client -> session_requests">
         <parent/> </service>
   </route>

I get these errors: (skipping things that go well)

[init] child "hello_client" resolves "ROM" label [hello_client]
[init] Warning: hello_client: no route to service "ROM"
[init] Error: hello_client: ROM environment session denied
...
[init] child "hello_client" resolves "ROM" label [ld.lib.so]
[init] Warning: hello_client: no route to service "ROM"
[init] Error: hello_client: ROM environment session denied
...
Makefile:312: recipe for target 'run/hello' failed

What's happening here?
Why are my explicit routes to the labels I find in the first log not 
working?
How can I make explicit routes work for these services?


Cheers, Guido.



More information about the users mailing list