demikernel icon indicating copy to clipboard operation
demikernel copied to clipboard

[runtime] Enhancement: DemiBuffer Abstraction

Open BrianZill opened this issue 2 years ago • 1 comments

This PR introduces the DemiBuffer abstraction. The intent is to replace the Buffer enumeration (along with its DataBuffer and DpdkBuffer subtypes) with this new abstraction.

The motivation behind this is that the existing DataBuffer differed greatly from DpdkBuffer in its capabilities, making it difficult to present a uniform Buffer interface. In particular, the DataBuffer implementation precluded adding some desired functionality to Buffer that is either already present in DPDK or is easy to add to DpdkBuffer. Things like splitting buffers without copying any of the data, chaining buffers together to represent a packet, and queueing buffers using internal linkage fields (to avoid allocations).

More explanation of the DemiBuffer type is provided in the demibuffer.rs file comments.

Note that this PR just defines the new DemiBuffer type, it doesn't replace the current use of Buffer/DataBuffer/DpdkBuffer in the rest of the codebase. That will be coming in a future PR.

BrianZill avatar Oct 13 '22 09:10 BrianZill

@BrianZill please rename you commits to match the style:

[module-name] <Enhancement | Feature | Bug Fix | Workaround>: <Small Comment Title>

This helps navigating the source tree history,

ppenna avatar Oct 13 '22 16:10 ppenna