@@ -52,6 +52,7 @@ pub const VIRTIO_NET_F_CTRL_RX_EXTRA: u32 = 20;
52
52
pub const VIRTIO_NET_F_GUEST_ANNOUNCE : u32 = 21 ;
53
53
pub const VIRTIO_NET_F_MQ : u32 = 22 ;
54
54
pub const VIRTIO_NET_F_CTRL_MAC_ADDR : u32 = 23 ;
55
+ pub const VIRTIO_NET_F_VQ_NOTF_COAL : u32 = 52 ;
55
56
pub const VIRTIO_NET_F_NOTF_COAL : u32 = 53 ;
56
57
pub const VIRTIO_NET_F_GUEST_USO4 : u32 = 54 ;
57
58
pub const VIRTIO_NET_F_GUEST_USO6 : u32 = 55 ;
@@ -121,6 +122,8 @@ pub const VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET: u32 = 0;
121
122
pub const VIRTIO_NET_CTRL_NOTF_COAL : u32 = 6 ;
122
123
pub const VIRTIO_NET_CTRL_NOTF_COAL_TX_SET : u32 = 0 ;
123
124
pub const VIRTIO_NET_CTRL_NOTF_COAL_RX_SET : u32 = 1 ;
125
+ pub const VIRTIO_NET_CTRL_NOTF_COAL_VQ_SET : u32 = 2 ;
126
+ pub const VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET : u32 = 3 ;
124
127
pub type __u8 = :: std:: os:: raw:: c_uchar ;
125
128
pub type __u16 = :: std:: os:: raw:: c_ushort ;
126
129
pub type __u32 = :: std:: os:: raw:: c_uint ;
@@ -1094,3 +1097,97 @@ fn bindgen_test_layout_virtio_net_ctrl_coal_rx() {
1094
1097
)
1095
1098
) ;
1096
1099
}
1100
+ #[ repr( C ) ]
1101
+ #[ derive( Debug , Default , Copy , Clone , PartialEq ) ]
1102
+ pub struct virtio_net_ctrl_coal {
1103
+ pub max_packets : __le32 ,
1104
+ pub max_usecs : __le32 ,
1105
+ }
1106
+ #[ test]
1107
+ fn bindgen_test_layout_virtio_net_ctrl_coal ( ) {
1108
+ const UNINIT : :: std:: mem:: MaybeUninit < virtio_net_ctrl_coal > = :: std:: mem:: MaybeUninit :: uninit ( ) ;
1109
+ let ptr = UNINIT . as_ptr ( ) ;
1110
+ assert_eq ! (
1111
+ :: std:: mem:: size_of:: <virtio_net_ctrl_coal>( ) ,
1112
+ 8usize ,
1113
+ concat!( "Size of: " , stringify!( virtio_net_ctrl_coal) )
1114
+ ) ;
1115
+ assert_eq ! (
1116
+ :: std:: mem:: align_of:: <virtio_net_ctrl_coal>( ) ,
1117
+ 4usize ,
1118
+ concat!( "Alignment of " , stringify!( virtio_net_ctrl_coal) )
1119
+ ) ;
1120
+ assert_eq ! (
1121
+ unsafe { :: std:: ptr:: addr_of!( ( * ptr) . max_packets) as usize - ptr as usize } ,
1122
+ 0usize ,
1123
+ concat!(
1124
+ "Offset of field: " ,
1125
+ stringify!( virtio_net_ctrl_coal) ,
1126
+ "::" ,
1127
+ stringify!( max_packets)
1128
+ )
1129
+ ) ;
1130
+ assert_eq ! (
1131
+ unsafe { :: std:: ptr:: addr_of!( ( * ptr) . max_usecs) as usize - ptr as usize } ,
1132
+ 4usize ,
1133
+ concat!(
1134
+ "Offset of field: " ,
1135
+ stringify!( virtio_net_ctrl_coal) ,
1136
+ "::" ,
1137
+ stringify!( max_usecs)
1138
+ )
1139
+ ) ;
1140
+ }
1141
+ #[ repr( C ) ]
1142
+ #[ derive( Debug , Default , Copy , Clone , PartialEq ) ]
1143
+ pub struct virtio_net_ctrl_coal_vq {
1144
+ pub vqn : __le16 ,
1145
+ pub reserved : __le16 ,
1146
+ pub coal : virtio_net_ctrl_coal ,
1147
+ }
1148
+ #[ test]
1149
+ fn bindgen_test_layout_virtio_net_ctrl_coal_vq ( ) {
1150
+ const UNINIT : :: std:: mem:: MaybeUninit < virtio_net_ctrl_coal_vq > =
1151
+ :: std:: mem:: MaybeUninit :: uninit ( ) ;
1152
+ let ptr = UNINIT . as_ptr ( ) ;
1153
+ assert_eq ! (
1154
+ :: std:: mem:: size_of:: <virtio_net_ctrl_coal_vq>( ) ,
1155
+ 12usize ,
1156
+ concat!( "Size of: " , stringify!( virtio_net_ctrl_coal_vq) )
1157
+ ) ;
1158
+ assert_eq ! (
1159
+ :: std:: mem:: align_of:: <virtio_net_ctrl_coal_vq>( ) ,
1160
+ 4usize ,
1161
+ concat!( "Alignment of " , stringify!( virtio_net_ctrl_coal_vq) )
1162
+ ) ;
1163
+ assert_eq ! (
1164
+ unsafe { :: std:: ptr:: addr_of!( ( * ptr) . vqn) as usize - ptr as usize } ,
1165
+ 0usize ,
1166
+ concat!(
1167
+ "Offset of field: " ,
1168
+ stringify!( virtio_net_ctrl_coal_vq) ,
1169
+ "::" ,
1170
+ stringify!( vqn)
1171
+ )
1172
+ ) ;
1173
+ assert_eq ! (
1174
+ unsafe { :: std:: ptr:: addr_of!( ( * ptr) . reserved) as usize - ptr as usize } ,
1175
+ 2usize ,
1176
+ concat!(
1177
+ "Offset of field: " ,
1178
+ stringify!( virtio_net_ctrl_coal_vq) ,
1179
+ "::" ,
1180
+ stringify!( reserved)
1181
+ )
1182
+ ) ;
1183
+ assert_eq ! (
1184
+ unsafe { :: std:: ptr:: addr_of!( ( * ptr) . coal) as usize - ptr as usize } ,
1185
+ 4usize ,
1186
+ concat!(
1187
+ "Offset of field: " ,
1188
+ stringify!( virtio_net_ctrl_coal_vq) ,
1189
+ "::" ,
1190
+ stringify!( coal)
1191
+ )
1192
+ ) ;
1193
+ }
0 commit comments