At the moment you have to use sendmsg for vectorized send. While this works it's suboptimal as it also means you need to allocate a struct msghdr that needs to be kept alive until a submission happens. We can remove this limitation by just allowing to use send directly.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -392,12 +392,16 @@ enum io_uring_op { · 391 unmodified lines | |||
| 392 | * the starting buffer ID in cqe->flags as per | 392 | * the starting buffer ID in cqe->flags as per |
| 393 | * usual for provided buffer usage. The buffers | 393 | * usual for provided buffer usage. The buffers |
| 394 | * will be contiguous from the starting buffer ID. | 394 | * will be contiguous from the starting buffer ID. |
| 395 | * | ||
| 396 | * IORING_SEND_VECTORIZED If set, SEND[_ZC] will take a pointer to a io_vec | ||
| 397 | * to allow vectorized send operations. | ||
| 395 | */ | 398 | */ |
| 396 | #define IORING_RECVSEND_POLL_FIRST (1U << 0) | 399 | #define IORING_RECVSEND_POLL_FIRST (1U << 0) |
| 397 | #define IORING_RECV_MULTISHOT (1U << 1) | 400 | #define IORING_RECV_MULTISHOT (1U << 1) |
| 398 | #define IORING_RECVSEND_FIXED_BUF (1U << 2) | 401 | #define IORING_RECVSEND_FIXED_BUF (1U << 2) |
| 399 | #define IORING_SEND_ZC_REPORT_USAGE (1U << 3) | 402 | #define IORING_SEND_ZC_REPORT_USAGE (1U << 3) |
| 400 | #define IORING_RECVSEND_BUNDLE (1U << 4) | 403 | #define IORING_RECVSEND_BUNDLE (1U << 4) |
| 404 | #define IORING_SEND_VECTORIZED (1U << 5) | ||
| 401 | 405 | ||
| 402 | /* | 406 | /* |
| 403 | * cqe.res for IORING_CQE_F_NOTIF if | 407 | * cqe.res for IORING_CQE_F_NOTIF if |