[DGD] Network package and udp

bart at wotf.org bart at wotf.org
Sun Feb 8 17:19:51 CET 2009


I didn't bother with UDP since I moved away from 1.2p4.. till this weekend.

As it turns out, the UDP part of the network package for the development
version of DGD is broken.

There were a few obvious bugs (setting the OUTPUT flag on the object instead
of user struct, not clearing it after flushing the datagram buffer) and
something that had to do with an attempt to let the driver buffer datagrams
using a nested LPC array (improper initialisation of the array elements,
resulting in a segv, fixed size buffer and no way to notify the LPC layer of
it being full)

I fixed the OUTPUT flag issue, and changed the implementation so it only
buffers one datagram/udp port object.

The consequence is that buffering of datagrams will have to be done in LPC. An
equivalent to the message_done() calls in user objects has to be provided for
udp ports (which I intend to call datagram_done())

Obviously, I could also try to fix the multiple datagram buffering in the
driver, but that involves managing multi dimensional LPC arrays from C code in
the driver, something I don't really feel comfortable with (esp. not when the
equivalent in LPC is so much easier and safer), and it is still easily
possible to run out of space and having to notify the LPC layer about this
somehow.

Am I missing anything in my proposed solution? Is there a strong argument to
implement the buffering in the driver that I am not seeing?

Feedback please :)

(as an aside, I have the proposed solution working, still testing and
debugging it, but expect a commit in the comming days unless this 'request for
feedback' turns up an argument as to why this solution isn't going to work well)

Bart.
--
Created with Open WebMail at http://www.bartsplace.net/
Read my weblog at http://soapbox.bartsplace.net/




More information about the DGD mailing list