@@ -1492,20 +1492,29 @@ opcode! {
1492
1492
fd: { impl sealed:: UseFixed } ,
1493
1493
cmd_op: { u32 } ,
1494
1494
; ;
1495
+ /// The `buf_index` is an index into an array of fixed buffers,
1496
+ /// and is only valid if fixed buffers were registered.
1497
+ buf_index: Option <u16 > = None ,
1495
1498
/// Arbitrary command data.
1496
1499
cmd: [ u8 ; 16 ] = [ 0u8 ; 16 ]
1497
1500
}
1498
1501
1499
1502
pub const CODE = sys:: IORING_OP_URING_CMD ;
1500
1503
1501
1504
pub fn build( self ) -> Entry {
1502
- let UringCmd16 { fd, cmd_op, cmd } = self ;
1505
+ let UringCmd16 { fd, cmd_op, cmd, buf_index } = self ;
1503
1506
1504
1507
let mut sqe = sqe_zeroed( ) ;
1505
1508
sqe. opcode = Self :: CODE ;
1506
1509
assign_fd!( sqe. fd = fd) ;
1507
1510
sqe. __bindgen_anon_1. __bindgen_anon_1. cmd_op = cmd_op;
1508
1511
unsafe { * sqe. __bindgen_anon_6. cmd. as_mut( ) . as_mut_ptr( ) . cast:: <[ u8 ; 16 ] >( ) = cmd } ;
1512
+ if let Some ( buf_index) = buf_index {
1513
+ sqe. __bindgen_anon_4. buf_index = buf_index;
1514
+ unsafe {
1515
+ sqe. __bindgen_anon_3. uring_cmd_flags |= sys:: IORING_URING_CMD_FIXED ;
1516
+ }
1517
+ }
1509
1518
Entry ( sqe)
1510
1519
}
1511
1520
}
@@ -1516,14 +1525,17 @@ opcode! {
1516
1525
fd: { impl sealed:: UseFixed } ,
1517
1526
cmd_op: { u32 } ,
1518
1527
; ;
1528
+ /// The `buf_index` is an index into an array of fixed buffers,
1529
+ /// and is only valid if fixed buffers were registered.
1530
+ buf_index: Option <u16 > = None ,
1519
1531
/// Arbitrary command data.
1520
1532
cmd: [ u8 ; 80 ] = [ 0u8 ; 80 ]
1521
1533
}
1522
1534
1523
1535
pub const CODE = sys:: IORING_OP_URING_CMD ;
1524
1536
1525
1537
pub fn build( self ) -> Entry128 {
1526
- let UringCmd80 { fd, cmd_op, cmd } = self ;
1538
+ let UringCmd80 { fd, cmd_op, cmd, buf_index } = self ;
1527
1539
1528
1540
let cmd1 = cmd[ ..16 ] . try_into( ) . unwrap( ) ;
1529
1541
let cmd2 = cmd[ 16 ..] . try_into( ) . unwrap( ) ;
@@ -1533,6 +1545,12 @@ opcode! {
1533
1545
assign_fd!( sqe. fd = fd) ;
1534
1546
sqe. __bindgen_anon_1. __bindgen_anon_1. cmd_op = cmd_op;
1535
1547
unsafe { * sqe. __bindgen_anon_6. cmd. as_mut( ) . as_mut_ptr( ) . cast:: <[ u8 ; 16 ] >( ) = cmd1 } ;
1548
+ if let Some ( buf_index) = buf_index {
1549
+ sqe. __bindgen_anon_4. buf_index = buf_index;
1550
+ unsafe {
1551
+ sqe. __bindgen_anon_3. uring_cmd_flags |= sys:: IORING_URING_CMD_FIXED ;
1552
+ }
1553
+ }
1536
1554
Entry128 ( Entry ( sqe) , cmd2)
1537
1555
}
1538
1556
}
0 commit comments