27 int32_t operator()(io_uring_cqe *cqe)
noexcept {
return cqe->res; }
39 requires(
requires(Br *br, io_uring_cqe *cqe) { br->handle_finish(cqe); })
40class SelectBufferCQEHandler {
42 SelectBufferCQEHandler(Br *buffers) : buffers_(buffers) {}
44 auto operator()(io_uring_cqe *cqe)
noexcept {
45 return std::make_pair(cqe->res, buffers_->handle_finish(cqe));
59 std::pair<int32_t, uint64_t> operator()(io_uring_cqe *cqe)
noexcept {
61 detail::Context::current().runtime()->ring_internal().check_cqe32(
63 "Expected big CQE for NVMe passthrough");
64 return {cqe->res, cqe->big_cqe[0]};
100 std::pair<int32_t, SCSIBsgResult> operator()(io_uring_cqe *cqe)
noexcept {
102 detail::Context::current().runtime()->ring_internal().check_cqe32(
104 "Expected big CQE for SCSI BSG passthrough");
109#if CONDY_URING_VERSION_GE(2, 12)
114struct TxTimestampResult {
138struct TxTimestampCQEHandler {
139 std::pair<int32_t, TxTimestampResult>
140 operator()(io_uring_cqe *cqe)
noexcept {
142 detail::Context::current().runtime()->ring_internal().check_cqe32(
144 "Expected big CQE for TX timestamp operations");
145 TxTimestampResult result;
147 static_cast<int>(cqe->flags >> IORING_TIMESTAMP_TYPE_SHIFT);
148 result.hwts = cqe->flags & IORING_CQE_F_TSTAMP_HW;
149 result.ts =
reinterpret_cast<io_timespec &
>(cqe->big_cqe);
150 return {cqe->res, result};
The main namespace for the Condy library.
Runtime type for running the io_uring event loop.
A CQE handler for NVMe passthrough commands that extracts the status and result from the CQE.
A CQE handler for SCSI BSG passthrough commands that extracts the SCSI status and result from the CQE...
Result for SCSI BSG passthrough commands.
uint8_t host_status() noexcept
Extract host status.
uint8_t driver_status() noexcept
Extract driver status.
uint8_t device_status() noexcept
Extract SCSI device status byte.
uint8_t sense_len() noexcept
Extract sense data length.
uint64_t res2
Raw res2 from the CQE.
uint32_t resid_len() noexcept
Extract residual transfer length.
A simple CQE handler that extracts the result from the CQE without any additional processing.