demikernel icon indicating copy to clipboard operation
demikernel copied to clipboard

[catcollar] Source Address in `OperationResult` for `pop()` Is Set to `None`

Open ppenna opened this issue 2 years ago • 0 comments

Description

In Catcollar, after successfully completing a pop() operation, the source address in the OperationResult structure is always set to None.

As a consequence, a UDP Catnap application must always know the address of the remote peer, which is wrong.

https://github.com/demikernel/demikernel/blob/cbf1243786b79d6e65e1642f3f267cbf41c1657e/src/rust/catcollar/futures/mod.rs#L132-L136

Expected Behavior

When possible, the source address of the received message should be stored in the OperationResult structure.

Additional Information

  • To fix this, we should rely on the io_uring_prep_recvmsg() operation and change the following code: https://github.com/demikernel/demikernel/blob/cbf1243786b79d6e65e1642f3f267cbf41c1657e/src/rust/catcollar/iouring.rs#L168
  • When completing operations subitted to the underlying IOUring we should change the return of the follow, to enable source addresses to be returned: https://github.com/demikernel/demikernel/blob/cbf1243786b79d6e65e1642f3f267cbf41c1657e/src/rust/catcollar/iouring.rs#L178

Related Issues

  • https://github.com/demikernel/demikernel/issues/147
  • https://github.com/demikernel/liburing-rs/issues/7

ppenna avatar Jul 28 '22 14:07 ppenna