RPC with LWIP
Norman Feske
norman.feske at ...1...
Wed Jul 2 14:37:04 CEST 2014
Hi Mohammad,
> from the client side i connect to the both server by telent each of
> them and type message to them and it work smoothly.
> so , I think without using the RPC we dont have the blocking problem or
> may be my test was wrong .
> i will attach the .run ,server.c and .mk files .
your test is exactly what I had in mind for simplifying the scenario.
Since the test works when two threads are using lwIP directly, we know
that your issue is not related to the way lwIP works. Your test
pinpoints the problem to the RPC interface. It seems that you have
missed a step when turning the RPC interface multi-threaded. Please make
sure that
* Your 'Lwip::Session_component' has an 'Rpc_entrypoint' as a member
variable. So each time, a session is created, a dedicated entrypoint
get created, too.
* Your 'Lwip::Session_component' is managed by the session's own
entrypoint, not the entrpoint that serves the root interface. Note
that the default 'Root_component' provided by Genode's
'root/component.h' does not what you want. You cannot use the default
implementation but implement the 'Root_component' yourself. Please
take a close look at the timer variant [1] I referenced in my
email from May 28.
[1]
https://github.com/genodelabs/genode/tree/b54bdea2aae245b2d8f53794c1c1b9b2da371592/os/src/drivers/timer/nova
To see that each lwIP session is executed by a different thread, you may
add the following debug output to one of the lwIP RPC functions (e.g.,
at the beginning of 'accept').
PDBG("thread_base at %p", Genode::Thread_base::myself());
The 'myself' function returns a different pointer for each thread that
calls the function. You will see two messages, one for each session. If
you see two different pointer values, you know that both sessions are
dispatched by different threads - this is what we want. I guess that you
will see the same value twice.
If the problem persists, would you consider to make branch publicly
available (e.g., on GitHub) so that I could have a look?
On another note, have you had success with inspecting the scenario using
GDB on Linux?
Good luck!
Norman
--
Dr.-Ing. Norman Feske
Genode Labs
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list