8#include "ublk/ublk_cmd.h"
22 return ublk_shmem_zc_index(addr);
33 return ublk_shmem_zc_offset(addr);
46 uint32_t offset)
noexcept {
47 assert(!(offset & ~UBLK_IO_BUF_BITS_MASK));
48 return UBLKSRV_IO_BUF_OFFSET +
49 ((
static_cast<uint64_t
>(q_id) << UBLK_QID_OFF) |
50 (
static_cast<uint64_t
>(tag) << UBLK_TAG_OFF) | offset);
The main namespace of the ublk-cpp library.
uint16_t shmem_zc_index(uint64_t addr) noexcept
Extract the buffer index from a shared memory zero-copy encoded address (UBLK_IO_F_SHMEM_ZC).
uint64_t user_copy_pos(uint16_t q_id, uint16_t tag, uint32_t offset) noexcept
Compute the byte position in /dev/ublkcN for user-space data copy (UBLK_F_USER_COPY).
uint32_t shmem_zc_offset(uint64_t addr) noexcept
Extract the byte offset within the buffer from a shared memory zero-copy encoded address (UBLK_IO_F_S...