Discussion:
Mosquitto library ported to Genode
Alexander Weidinger
2017-05-30 07:26:57 UTC
Permalink
Hello,

we successfully ported the mosquitto *library* to Genode (we used
version 15.05 and 16.08 for testing), which may be interesting for some
on the mailing list - it is a library, implementing the MQTT protocol.

https://github.com/argos-research/genode/pull/12

Every option is enabled apart from 'WITH_SRV' which would enable SRV
lookup support.
We didn't test the SSL support, but it is linked and compiled into the
library.

Additionally a simple publisher application is implemented (mpct), which
publishes to a given server a hello world message with an increasing
iterator and makes use of the callback functionality.

One point which took a huge amount of time to find, was that
'lwip_tcpip_init()' function leads to freezes for us
(https://github.com/argos-research/genode/pull/12/files#diff-48dce339109d626747f79ba982b2f8ebR70).
On real hardware (pandaboard / raspberry pi) it freezes before even
receiving an ip address and on the pbxa9 qemu instance it froze after
publishing a few messages, leading to the error message 'Assertion
"tcp_write: pbufs on queue => at least one queue non-empty"'.
To work around this, by simply removing it, everything seems to work and
we are not exactly sure why, maybe someone can explain it to us?

Regards,
Alexander
Emery Hemingway
2017-05-30 18:01:58 UTC
Permalink
Hello Alexander,

I'm glad to hear that our networking options are expanding!

The 'lwip_tcpip_init()' should be called implicitly by the 'libc_lwip'
library, so I believe your problems come from double initialization:

https://github.com/genodelabs/genode/blob/16.08/repos/libports/src/lib/libc_lwip/plugin.cc#L226

The 'lwip_libc' library will disappear in the near future, so to build
against the current and upcoming release you would remove this
dependency and let the the built-in socket support in libc take over.
The TCP/IP stack would then be selected and configured at runtime via
the VFS. For now you would be restricted to the Lxip stack but there is
a LwIP plugin for the VFS that is nearly ready.

For an example of runtime network configuration see
https://github.com/genodelabs/genode/blob/17.02/repos/libports/run/netty.run
Note that you can use the VFS plugins internally or shared between
components using the vfs server.

Cheers,
Emery
Alexander Weidinger
2017-05-31 08:45:43 UTC
Permalink
Hello Emery,

thanks for the explanation and the additional information.

Regards,
Alexander
Post by Emery Hemingway
Hello Alexander,
I'm glad to hear that our networking options are expanding!
The 'lwip_tcpip_init()' should be called implicitly by the 'libc_lwip'
https://github.com/genodelabs/genode/blob/16.08/repos/libports/src/lib/libc_lwip/plugin.cc#L226
The 'lwip_libc' library will disappear in the near future, so to build
against the current and upcoming release you would remove this
dependency and let the the built-in socket support in libc take over.
The TCP/IP stack would then be selected and configured at runtime via
the VFS. For now you would be restricted to the Lxip stack but there is
a LwIP plugin for the VFS that is nearly ready.
For an example of runtime network configuration see
https://github.com/genodelabs/genode/blob/17.02/repos/libports/run/netty.run
Note that you can use the VFS plugins internally or shared between
components using the vfs server.
Cheers,
Emery
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
Norman Feske
2017-06-01 14:04:04 UTC
Permalink
Hi Alexander,

thank you for announcing your work on the mailing list. This is greatly
appreciated!

Have you considered to submit your port to the genode-world repository
[1]? This would make it easy to find by other community members and the
future maintenance (e.g., the adaptation to new Genode versions) could
become a joint effort.

[1] https://github.com/genodelabs/genode-world

Cheers
Norman
Post by Alexander Weidinger
Hello Emery,
thanks for the explanation and the additional information.
Regards,
Alexander
Post by Emery Hemingway
Hello Alexander,
I'm glad to hear that our networking options are expanding!
The 'lwip_tcpip_init()' should be called implicitly by the 'libc_lwip'
https://github.com/genodelabs/genode/blob/16.08/repos/libports/src/lib/libc_lwip/plugin.cc#L226
The 'lwip_libc' library will disappear in the near future, so to build
against the current and upcoming release you would remove this
dependency and let the the built-in socket support in libc take over.
The TCP/IP stack would then be selected and configured at runtime via
the VFS. For now you would be restricted to the Lxip stack but there is
a LwIP plugin for the VFS that is nearly ready.
For an example of runtime network configuration see
https://github.com/genodelabs/genode/blob/17.02/repos/libports/run/netty.run
Note that you can use the VFS plugins internally or shared between
components using the vfs server.
Cheers,
Emery
--
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
Alexander Weidinger
2017-06-16 20:33:31 UTC
Permalink
Hi Norman,

we are currently "playing" with integrating the provided example(s) as
test(s).
When everything is set on our side, I'll make sure it is compatible with
Genode 17.05 and supply a pull request for the genode/genode-world
repository.

Regards,
Alexander
Post by Norman Feske
Hi Alexander,
thank you for announcing your work on the mailing list. This is greatly
appreciated!
Have you considered to submit your port to the genode-world repository
[1]? This would make it easy to find by other community members and the
future maintenance (e.g., the adaptation to new Genode versions) could
become a joint effort.
[1] https://github.com/genodelabs/genode-world
Cheers
Norman
Post by Alexander Weidinger
Hello Emery,
thanks for the explanation and the additional information.
Regards,
Alexander
Post by Emery Hemingway
Hello Alexander,
I'm glad to hear that our networking options are expanding!
The 'lwip_tcpip_init()' should be called implicitly by the 'libc_lwip'
https://github.com/genodelabs/genode/blob/16.08/repos/libports/src/lib/libc_lwip/plugin.cc#L226
The 'lwip_libc' library will disappear in the near future, so to build
against the current and upcoming release you would remove this
dependency and let the the built-in socket support in libc take over.
The TCP/IP stack would then be selected and configured at runtime via
the VFS. For now you would be restricted to the Lxip stack but there is
a LwIP plugin for the VFS that is nearly ready.
For an example of runtime network configuration see
https://github.com/genodelabs/genode/blob/17.02/repos/libports/run/netty.run
Note that you can use the VFS plugins internally or shared between
components using the vfs server.
Cheers,
Emery
Loading...