Am 2015-05-10 23:07, schrieb Adam Lackorzynski:
I need to transmit a 4kB buffer and 4kB as response. What is L4's most elegant way to do so?
Elegant depends probably :) One way without much bells and whistles is creating a dataspace in the config script and attaching it on each side: local ds = L4.Env.mem_alloc:create(L4.Proto.Dataspace, 4096);
L4.default_loader:start({ caps = { shmds = ds:m("rw"); }}, "rom/one"); L4.default_loader:start({ caps = { shmds = ds:m("rw"); }}, "rom/two");
Then attach it via L4Re::Rm::attach(). I guess you also want some kind of notification. You could use standard IPC for that, or, better, use Irqs, i.e. two, one for each side. libshmc wraps this, esp. settings this up incl. the notification via Irqs.
Allright, thanks.
But, i still have a question about Flexpages. So my problem with the shared DS is that i have one server but multiple clients.
I could use one DS for each client, but this might waste too much MEM for an embedded system. (I admit, this is a bit of a theoretical problem, since todays embedded systems are so "big" and strong.) I also could use only one DS on the server side, which any client uses, separately. But this solution is not an option if there are sensitive data transmitted between client and server.
So is Flexpage the way to go? Is this even the reason why flexpage exists, beside shared mem.
Is Flexpage suitable for 4kB? Do u have an example design? Maybe this one: pkg/examples/libs/l4re/streammap/.
Thanks, ba_f