Skip to content

Implementation of streaming process slice #578

@Ioan-Cristian

Description

@Ioan-Cristian

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions