The new Ethernet TAP driver uses streaming process slices. I have a minimal implementation here. However, I was unable to use the standard libtock-rs system calls (TockSyscalls), so raw system calls are used instead. My use case is libtock-rs + smoltcp.
Handle<AllowRw<...>> forces the code to allow than disallow the buffer when the handle goes out of scope. Furthermore, depending on the configuration, it even checks whether the pointer and the length returned by the disallow are null, which is not true in the case of the streaming process slice, which constantly swaps between two buffers. I have tried a theoretical implementation of the streaming process slice with two Handle<Allow<...>>, but the code became quickly too contrived. I decided to give up, since that implementation is anyway inefficient.
Is my understanding of the libtock-rs too poor? Can streaming process slices be implemented efficiently using TockSyscalls, and thus avoid unsafe code?
The new Ethernet TAP driver uses streaming process slices. I have a minimal implementation here. However, I was unable to use the standard
libtock-rssystem calls (TockSyscalls), so raw system calls are used instead. My use case islibtock-rs+smoltcp.Handle<AllowRw<...>>forces the code to allow than disallow the buffer when the handle goes out of scope. Furthermore, depending on the configuration, it even checks whether the pointer and the length returned by the disallow are null, which is not true in the case of the streaming process slice, which constantly swaps between two buffers. I have tried a theoretical implementation of the streaming process slice with twoHandle<Allow<...>>, but the code became quickly too contrived. I decided to give up, since that implementation is anyway inefficient.Is my understanding of the
libtock-rstoo poor? Can streaming process slices be implemented efficiently using TockSyscalls, and thus avoid unsafe code?