Skip to content

Commit

Permalink
Fix io_uring changes from kernel version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-alpaca committed Nov 27, 2023
1 parent 315bce6 commit bafbcd0
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions src/io_uring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,9 @@ pub struct io_uring_sync_cancel_reg {
pub fd: i32,
pub flags: IoringAsyncCancelFlags,
pub timeout: Timespec,
pub pad: [u64; 4],
pub opcode: u8,
pub pad: [u8; 7],
pub pad2: [u64; 3],
}

/// An io_uring Completion Queue Entry.
Expand Down Expand Up @@ -1220,7 +1222,7 @@ pub struct io_sqring_offsets {
pub dropped: u32,
pub array: u32,
pub resv1: u32,
pub resv2: u64,
pub user_addr: u64,
}

#[allow(missing_docs)]
Expand All @@ -1235,7 +1237,7 @@ pub struct io_cqring_offsets {
pub cqes: u32,
pub flags: u32,
pub resv1: u32,
pub resv2: u64,
pub user_addr: u64,
}

#[allow(missing_docs)]
Expand Down Expand Up @@ -1348,7 +1350,7 @@ pub struct io_uring_buf_reg {
pub ring_addr: u64,
pub ring_entries: u32,
pub bgid: u16,
pub pad: u16,
pub flags: u16,
pub resv: [u64; 3_usize],
}

Expand Down Expand Up @@ -1497,7 +1499,7 @@ fn io_uring_layouts() {
dropped,
array,
resv1,
resv2
user_addr
);
check_struct!(
io_cqring_offsets,
Expand All @@ -1509,7 +1511,7 @@ fn io_uring_layouts() {
cqes,
flags,
resv1,
resv2
user_addr
);
check_struct!(io_uring_recvmsg_out, namelen, controllen, payloadlen, flags);
check_struct!(io_uring_probe, last_op, ops_len, resv, resv2, ops);
Expand All @@ -1521,7 +1523,16 @@ fn io_uring_layouts() {
check_struct!(io_uring_getevents_arg, sigmask, sigmask_sz, pad, ts);
check_struct!(iovec, iov_base, iov_len);
check_struct!(open_how, flags, mode, resolve);
check_struct!(io_uring_buf_reg, ring_addr, ring_entries, bgid, pad, resv);
check_struct!(io_uring_buf_reg, ring_addr, ring_entries, bgid, flags, resv);
check_struct!(io_uring_buf, addr, len, bid, resv);
check_struct!(io_uring_sync_cancel_reg, addr, fd, flags, timeout, pad);
check_struct!(
io_uring_sync_cancel_reg,
addr,
fd,
flags,
timeout,
opcode,
pad,
pad2
);
}

0 comments on commit bafbcd0

Please sign in to comment.