Documentation ¶
Index ¶
- Constants
- func IOURingEnter(fd int, toSubmit uint32, minComplete uint32, flags uint32, ...) (int, error)
- func IOURingRegister(fd int, opcode uint8, args unsafe.Pointer, nrArgs uint32) error
- func IOURingSetup(entries uint, params *IOURingParams) (int, error)
- type CompletionQueueEvent
- type CompletionQueueEvent16
- func (cqe *CompletionQueueEvent16) Clone() CompletionQueueEvent
- func (cqe *CompletionQueueEvent16) Extra1() uint64
- func (cqe *CompletionQueueEvent16) Extra2() uint64
- func (cqe *CompletionQueueEvent16) Flags() uint32
- func (cqe *CompletionQueueEvent16) Result() int32
- func (cqe *CompletionQueueEvent16) UserData() uint64
- type CompletionQueueEvent32
- func (cqe *CompletionQueueEvent32) Clone() CompletionQueueEvent
- func (cqe *CompletionQueueEvent32) Extra1() uint64
- func (cqe *CompletionQueueEvent32) Extra2() uint64
- func (cqe *CompletionQueueEvent32) Flags() uint32
- func (cqe *CompletionQueueEvent32) Result() int32
- func (cqe *CompletionQueueEvent32) UserData() uint64
- type CompletionQueueRingOffset
- type IOURingFilesUpdate
- type IOURingParams
- type SubmissionQueueEntry
- type SubmissionQueueEntry128
- func (sqe *SubmissionQueueEntry128) CMD(castType interface{}) interface{}
- func (sqe *SubmissionQueueEntry128) CleanFlags(flags uint8)
- func (sqe *SubmissionQueueEntry128) Fd() int32
- func (sqe *SubmissionQueueEntry128) Opcode() uint8
- func (sqe *SubmissionQueueEntry128) PrepOperation(op uint8, fd int32, addrOrSpliceOffIn uint64, len uint32, offsetOrCmdOp uint64)
- func (sqe *SubmissionQueueEntry128) Reset()
- func (sqe *SubmissionQueueEntry128) SetBufGroup(bufGroup uint16)
- func (sqe *SubmissionQueueEntry128) SetBufIndex(bufIndex uint16)
- func (sqe *SubmissionQueueEntry128) SetFdIndex(index int32)
- func (sqe *SubmissionQueueEntry128) SetFlags(flags uint8)
- func (sqe *SubmissionQueueEntry128) SetIoprio(ioprio uint16)
- func (sqe *SubmissionQueueEntry128) SetOpFlags(opflags uint32)
- func (sqe *SubmissionQueueEntry128) SetPersonality(personality uint16)
- func (sqe *SubmissionQueueEntry128) SetSpliceFdIn(fdIn int32)
- func (sqe *SubmissionQueueEntry128) SetUserData(userData uint64)
- type SubmissionQueueEntry64
- func (sqe *SubmissionQueueEntry64) CMD(_ interface{}) interface{}
- func (sqe *SubmissionQueueEntry64) CleanFlags(flags uint8)
- func (sqe *SubmissionQueueEntry64) Fd() int32
- func (sqe *SubmissionQueueEntry64) Opcode() uint8
- func (sqe *SubmissionQueueEntry64) PrepOperation(op uint8, fd int32, addrOrSpliceOffIn uint64, len uint32, offsetOrCmdOp uint64)
- func (sqe *SubmissionQueueEntry64) Reset()
- func (sqe *SubmissionQueueEntry64) SetBufGroup(bufGroup uint16)
- func (sqe *SubmissionQueueEntry64) SetBufIndex(bufIndex uint16)
- func (sqe *SubmissionQueueEntry64) SetFdIndex(index int32)
- func (sqe *SubmissionQueueEntry64) SetFlags(flags uint8)
- func (sqe *SubmissionQueueEntry64) SetIoprio(ioprio uint16)
- func (sqe *SubmissionQueueEntry64) SetOpFlags(opflags uint32)
- func (sqe *SubmissionQueueEntry64) SetPersonality(personality uint16)
- func (sqe *SubmissionQueueEntry64) SetSpliceFdIn(fdIn int32)
- func (sqe *SubmissionQueueEntry64) SetUserData(userData uint64)
- type SubmissionQueueRingOffset
Constants ¶
View Source
const ( IORING_ENTER_FLAGS_GETEVENTS uint32 = 1 << iota IORING_ENTER_FLAGS_SQ_WAKEUP IORING_ENTER_FLAGS_SQ_WAIT )
IOUringEnter flags
View Source
const ( IORING_REGISTER_BUFFERS uint8 = iota IORING_UNREGISTER_BUFFERS IORING_REGISTER_FILES IORING_UNREGISTER_FILES IORING_REGISTER_EVENTFD IORING_UNREGISTER_EVENTFD IORING_REGISTER_FILES_UPDATE IORING_REGISTER_EVENTFD_ASYNC IORING_REGISTER_PROBE IORING_REGISTER_PERSONALITY IORING_UNREGISTER_PERSONALITY IORING_REGISTER_RESTRICTIONS IORING_REGISTER_ENABLE_RINGS )
View Source
const ( IORING_SETUP_IOPOLL uint32 = 1 << iota IORING_SETUP_SQPOLL IORING_SETUP_SQ_AFF IORING_SETUP_CQSIZE IORING_SETUP_CLAMP IORING_SETUP_ATTACH_WQ IORING_SETUP_R_DISABLED IORING_SETUP_SUBMIT_ALL IORING_SETUP_COOP_TASKRUN IORING_SETUP_TASKRUN_FLAG IORING_SETUP_SQE128 IORING_SETUP_CQE32 )
View Source
const ( IORING_FEAT_SINGLE_MMAP uint32 = 1 << iota IORING_FEAT_NODROP IORING_FEAT_SUBMIT_STABLE IORING_FEAT_RW_CUR_POS IORING_FEAT_CUR_PERSONALITY IORING_FEAT_FAST_POLL IORING_FEAT_POLL_32BITS IORING_FEAT_SQPOLL_NONFIXED )
io_uring features supported by current kernel version
View Source
const ( SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 )
View Source
const ( IORING_OFF_SQ_RING uint64 = 0 IORING_OFF_CQ_RING uint64 = 0x8000000 IORING_OFF_SQES uint64 = 0x10000000 )
IORING Offset
View Source
const ( IORING_OP_NOP uint8 = iota IORING_OP_READV IORING_OP_WRITEV IORING_OP_FSYNC IORING_OP_READ_FIXED IORING_OP_WRITE_FIXED IORING_OP_POLL_ADD IORING_OP_POLL_REMOVE IORING_OP_SYNC_FILE_RANGE IORING_OP_SENDMSG IORING_OP_RECVMSG IORING_OP_TIMEOUT IORING_OP_TIMEOUT_REMOVE IORING_OP_ACCEPT IORING_OP_ASYNC_CANCEL IORING_OP_LINK_TIMEOUT IORING_OP_CONNECT IORING_OP_FALLOCATE IORING_OP_OPENAT IORING_OP_CLOSE IORING_OP_FILES_UPDATE IORING_OP_STATX IORING_OP_READ IORING_OP_WRITE IORING_OP_FADVISE IORING_OP_MADVISE IORING_OP_SEND IORING_OP_RECV IORING_OP_OPENAT2 IORING_OP_EPOLL_CTL IORING_OP_SPLICE IORING_OP_PROVIDE_BUFFERS IORING_OP_REMOVE_BUFFERS IORING_OP_TEE IORING_OP_SHUTDOWN IORING_OP_RENAMEAT IORING_OP_UNLINKAT IORING_OP_MKDIRAT IORING_OP_SYMLINKAT IORING_OP_LINKAT IORING_OP_MSG_RING IORING_OP_FSETXATTR IORING_OP_SETXATTR IORING_OP_FGETXATTR IORING_OP_GETXATTR IORING_OP_SOCKET IORING_OP_URING_CMD IORING_OP_SEND_ZC IORING_OP_SENDMSG_ZC /* this goes last, obviously */ IORING_OP_LAST )
View Source
const ( IORING_SQ_NEED_WAKEUP uint32 = 1 << iota IORING_SQ_CQ_OVERFLOW )
View Source
const ( IOSQE_FLAGS_FIXED_FILE uint8 = 1 << iota IOSQE_FLAGS_IO_DRAIN IOSQE_FLAGS_IO_LINK IOSQE_FLAGS_IO_HARDLINK IOSQE_FLAGS_ASYNC IOSQE_FLAGS_BUFFER_SELECT )
View Source
const IORING_FSYNC_DATASYNC uint32 = 1
View Source
const IORING_TIMEOUT_ABS uint32 = 1
View Source
const IOSQE_SPLICE_F_FD_IN_FIXED = 1 << 31
View Source
const IOSQE_SYNC_DATASYNC uint = 1
View Source
const IOSQE_TIMEOUT_ABS uint = 1
Variables ¶
This section is empty.
Functions ¶
func IOURingEnter ¶
func IOURingRegister ¶
func IOURingSetup ¶
func IOURingSetup(entries uint, params *IOURingParams) (int, error)
Types ¶
type CompletionQueueEvent ¶
type CompletionQueueEvent16 ¶
type CompletionQueueEvent16 struct {
// contains filtered or unexported fields
}
func (*CompletionQueueEvent16) Clone ¶
func (cqe *CompletionQueueEvent16) Clone() CompletionQueueEvent
func (*CompletionQueueEvent16) Extra1 ¶
func (cqe *CompletionQueueEvent16) Extra1() uint64
func (*CompletionQueueEvent16) Extra2 ¶
func (cqe *CompletionQueueEvent16) Extra2() uint64
type CompletionQueueEvent32 ¶
type CompletionQueueEvent32 struct {
// contains filtered or unexported fields
}
func (*CompletionQueueEvent32) Clone ¶
func (cqe *CompletionQueueEvent32) Clone() CompletionQueueEvent
func (*CompletionQueueEvent32) Extra1 ¶
func (cqe *CompletionQueueEvent32) Extra1() uint64
func (*CompletionQueueEvent32) Extra2 ¶
func (cqe *CompletionQueueEvent32) Extra2() uint64
type CompletionQueueRingOffset ¶
type CompletionQueueRingOffset struct { Head uint32 Tail uint32 RingMask uint32 RingEntries uint32 Overflow uint32 Cqes uint32 Flags uint32 Resv1 uint32 Resv2 uint64 }
CompletionQueueRingOffset describes the offsets of various ring buffer fields
type IOURingFilesUpdate ¶
type IOURingParams ¶
type IOURingParams struct { SQEntries uint32 // specifies the number of submission queue entries allocated CQEntries uint32 // when IORING_SETUP_CQSIZE flag is specified Flags uint32 // a bit mast of 0 or more of the IORING_SETUP_* SQThreadCPU uint32 // when IORING_SETUP_SQPOLL and IORING_SETUP_SQ_AFF flags are specified SQThreadIdle uint32 // when IORING_SETUP_SQPOLL flag is specified Features uint32 WQFd uint32 // when IORING_SETUP_ATTACH_WQ flag is specified Resv [3]uint32 SQOffset SubmissionQueueRingOffset CQOffset CompletionQueueRingOffset }
IOURingParams the flags, sq_thread_cpu, sq_thread_idle and WQFd fields are used to configure the io_uring instance
type SubmissionQueueEntry ¶
type SubmissionQueueEntry interface { Opcode() uint8 Reset() PrepOperation(op uint8, fd int32, addrOrSpliceOffIn uint64, len uint32, offsetOrCmdOp uint64) Fd() int32 SetFdIndex(index int32) SetOpFlags(opflags uint32) SetUserData(userData uint64) SetFlags(flag uint8) CleanFlags(flags uint8) SetIoprio(ioprio uint16) SetBufIndex(bufIndex uint16) SetBufGroup(bufGroup uint16) SetPersonality(personality uint16) SetSpliceFdIn(fdIn int32) CMD(castType interface{}) interface{} }
type SubmissionQueueEntry128 ¶
type SubmissionQueueEntry128 struct {
// contains filtered or unexported fields
}
func (*SubmissionQueueEntry128) CMD ¶
func (sqe *SubmissionQueueEntry128) CMD(castType interface{}) interface{}
func (*SubmissionQueueEntry128) CleanFlags ¶
func (sqe *SubmissionQueueEntry128) CleanFlags(flags uint8)
func (*SubmissionQueueEntry128) PrepOperation ¶
func (*SubmissionQueueEntry128) Reset ¶
func (sqe *SubmissionQueueEntry128) Reset()
func (*SubmissionQueueEntry128) SetBufGroup ¶
func (sqe *SubmissionQueueEntry128) SetBufGroup(bufGroup uint16)
func (*SubmissionQueueEntry128) SetBufIndex ¶
func (sqe *SubmissionQueueEntry128) SetBufIndex(bufIndex uint16)
func (*SubmissionQueueEntry128) SetFdIndex ¶
func (sqe *SubmissionQueueEntry128) SetFdIndex(index int32)
func (*SubmissionQueueEntry128) SetFlags ¶
func (sqe *SubmissionQueueEntry128) SetFlags(flags uint8)
func (*SubmissionQueueEntry128) SetIoprio ¶
func (sqe *SubmissionQueueEntry128) SetIoprio(ioprio uint16)
func (*SubmissionQueueEntry128) SetOpFlags ¶
func (sqe *SubmissionQueueEntry128) SetOpFlags(opflags uint32)
func (*SubmissionQueueEntry128) SetPersonality ¶
func (sqe *SubmissionQueueEntry128) SetPersonality(personality uint16)
func (*SubmissionQueueEntry128) SetSpliceFdIn ¶
func (sqe *SubmissionQueueEntry128) SetSpliceFdIn(fdIn int32)
func (*SubmissionQueueEntry128) SetUserData ¶
func (sqe *SubmissionQueueEntry128) SetUserData(userData uint64)
type SubmissionQueueEntry64 ¶
type SubmissionQueueEntry64 struct {
// contains filtered or unexported fields
}
func (*SubmissionQueueEntry64) CMD ¶
func (sqe *SubmissionQueueEntry64) CMD(_ interface{}) interface{}
func (*SubmissionQueueEntry64) CleanFlags ¶
func (sqe *SubmissionQueueEntry64) CleanFlags(flags uint8)
func (*SubmissionQueueEntry64) PrepOperation ¶
func (*SubmissionQueueEntry64) Reset ¶
func (sqe *SubmissionQueueEntry64) Reset()
func (*SubmissionQueueEntry64) SetBufGroup ¶
func (sqe *SubmissionQueueEntry64) SetBufGroup(bufGroup uint16)
func (*SubmissionQueueEntry64) SetBufIndex ¶
func (sqe *SubmissionQueueEntry64) SetBufIndex(bufIndex uint16)
func (*SubmissionQueueEntry64) SetFdIndex ¶
func (sqe *SubmissionQueueEntry64) SetFdIndex(index int32)
func (*SubmissionQueueEntry64) SetIoprio ¶
func (sqe *SubmissionQueueEntry64) SetIoprio(ioprio uint16)
func (*SubmissionQueueEntry64) SetOpFlags ¶
func (sqe *SubmissionQueueEntry64) SetOpFlags(opflags uint32)
func (*SubmissionQueueEntry64) SetPersonality ¶
func (sqe *SubmissionQueueEntry64) SetPersonality(personality uint16)
func (*SubmissionQueueEntry64) SetSpliceFdIn ¶
func (sqe *SubmissionQueueEntry64) SetSpliceFdIn(fdIn int32)
func (*SubmissionQueueEntry64) SetUserData ¶
func (sqe *SubmissionQueueEntry64) SetUserData(userData uint64)
Click to show internal directories.
Click to hide internal directories.