phoenix-dataplane / phoenix

Phoenix dataplane system service
https://phoenix-dataplane.github.io
Apache License 2.0
51 stars 9 forks source link

post_send should be unsafe #83

Closed crazyboycjr closed 2 years ago

crazyboycjr commented 2 years ago

Consider the following code

id.post_send(&mr, ...)?;
drop(mr);
// ----> NIC issues DMA to this dropped mr in the future

The user must ensure that the mr remains valid until the corresponding completion is generated.

We can mark this function as unsafe, or make it returns a Future, which requires an asynchronous runtime for ibverbs. That's a lot of work.

crazyboycjr commented 2 years ago

Demikernel may have already included a runtime for that. Need some investigations later.