summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ir/comment.rs25
-rw-r--r--tests/expectations/tests/constify-enum.rs2
-rw-r--r--tests/expectations/tests/convert-cpp-comment-to-rust.rs15
-rw-r--r--tests/expectations/tests/enum-doc-bitfield.rs11
-rw-r--r--tests/expectations/tests/enum-doc-mod.rs11
-rw-r--r--tests/expectations/tests/enum-doc-rusty.rs11
-rw-r--r--tests/expectations/tests/enum-doc.rs11
-rw-r--r--tests/expectations/tests/layout_align.rs19
-rw-r--r--tests/expectations/tests/layout_arp.rs17
-rw-r--r--tests/expectations/tests/layout_array.rs38
-rw-r--r--tests/expectations/tests/layout_array_too_long.rs51
-rw-r--r--tests/expectations/tests/layout_eth_conf.rs197
-rw-r--r--tests/expectations/tests/layout_eth_conf_1_0.rs197
-rw-r--r--tests/expectations/tests/layout_kni_mbuf.rs17
-rw-r--r--tests/expectations/tests/layout_large_align_field.rs75
-rw-r--r--tests/expectations/tests/layout_mbuf.rs48
-rw-r--r--tests/expectations/tests/layout_mbuf_1_0.rs48
17 files changed, 429 insertions, 364 deletions
diff --git a/src/ir/comment.rs b/src/ir/comment.rs
index 6a87c492..1a76542c 100644
--- a/src/ir/comment.rs
+++ b/src/ir/comment.rs
@@ -35,7 +35,6 @@ fn kind(comment: &str) -> Option<Kind> {
fn make_indent(indent: usize) -> String {
const RUST_INDENTATION: usize = 4;
-
iter::repeat(' ').take(indent * RUST_INDENTATION).collect()
}
@@ -49,12 +48,11 @@ fn preprocess_single_lines(comment: &str, indent: usize) -> String {
let mut is_first = true;
let lines: Vec<_> = comment
.lines()
- .map(|l| l.trim_left_matches('/').trim())
+ .map(|l| l.trim().trim_left_matches('/'))
.map(|l| {
let indent = if is_first { "" } else { &*indent };
is_first = false;
- let maybe_space = if l.is_empty() { "" } else { " " };
- format!("{}///{}{}", indent, maybe_space, l)
+ format!("{}///{}", indent, l)
})
.collect();
lines.join("\n")
@@ -63,30 +61,24 @@ fn preprocess_single_lines(comment: &str, indent: usize) -> String {
fn preprocess_multi_line(comment: &str, indent: usize) -> String {
let comment = comment
.trim_left_matches('/')
- .trim_left_matches('*')
- .trim_left_matches('!')
.trim_right_matches('/')
- .trim_right_matches('*')
- .trim();
+ .trim_right_matches('*');
let indent = make_indent(indent);
// Strip any potential `*` characters preceding each line.
let mut is_first = true;
let mut lines: Vec<_> = comment.lines()
- .map(|line| line.trim().trim_left_matches('*').trim())
- .skip_while(|line| line.is_empty()) // Skip the first empty lines.
+ .map(|line| line.trim().trim_left_matches('*').trim_left_matches('!'))
+ .skip_while(|line| line.trim().is_empty()) // Skip the first empty lines.
.map(|line| {
let indent = if is_first { "" } else { &*indent };
is_first = false;
- let maybe_space = if line.is_empty() { "" } else { " " };
- format!("{}///{}{}", indent, maybe_space, line)
+ format!("{}///{}", indent, line)
})
.collect();
// Remove the trailing line corresponding to the `*/`.
- let last_line_is_empty = lines.last().map_or(false, |l| l.is_empty());
-
- if last_line_is_empty {
+ if lines.last().map_or(false, |l| l.trim().is_empty() || l.trim() == "///") {
lines.pop();
}
@@ -107,6 +99,7 @@ mod test {
fn processes_single_lines_correctly() {
assert_eq!(preprocess("/// hello", 0), "/// hello");
assert_eq!(preprocess("// hello", 0), "/// hello");
+ assert_eq!(preprocess("// hello", 0), "/// hello");
}
#[test]
@@ -118,7 +111,7 @@ mod test {
assert_eq!(
preprocess("/**\nhello\n*world\n*foo\n*/", 0),
- "/// hello\n/// world\n/// foo"
+ "///hello\n///world\n///foo"
);
}
}
diff --git a/tests/expectations/tests/constify-enum.rs b/tests/expectations/tests/constify-enum.rs
index a1744a2a..f1dc139c 100644
--- a/tests/expectations/tests/constify-enum.rs
+++ b/tests/expectations/tests/constify-enum.rs
@@ -19,6 +19,6 @@ pub enum nsCSSPropertyID {
eCSSProperty_b = 1,
eCSSPropertyAlias_aa = 2,
eCSSPropertyAlias_bb = 3,
- /// < <div rustbindgen constant></div>
+ ///< <div rustbindgen constant></div>
eCSSProperty_COUNT_unexistingVariantValue = 4,
}
diff --git a/tests/expectations/tests/convert-cpp-comment-to-rust.rs b/tests/expectations/tests/convert-cpp-comment-to-rust.rs
index f9f8e200..8058af10 100644
--- a/tests/expectations/tests/convert-cpp-comment-to-rust.rs
+++ b/tests/expectations/tests/convert-cpp-comment-to-rust.rs
@@ -1,19 +1,22 @@
/* automatically generated by rust-bindgen */
-
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
pub type mbedtls_mpi_uint = ::std::os::raw::c_uint;
/// \brief MPI structure
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mbedtls_mpi {
- /// < integer sign
+ ///< integer sign
pub s: ::std::os::raw::c_int,
- /// < total # of limbs
+ ///< total # of limbs
pub n: ::std::os::raw::c_ulong,
- /// < pointer to limbs
+ ///< pointer to limbs
pub p: *mut mbedtls_mpi_uint,
}
#[test]
diff --git a/tests/expectations/tests/enum-doc-bitfield.rs b/tests/expectations/tests/enum-doc-bitfield.rs
index 93d1f5f0..9ebfc10e 100644
--- a/tests/expectations/tests/enum-doc-bitfield.rs
+++ b/tests/expectations/tests/enum-doc-bitfield.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
impl B {
/// Document field with three slashes
@@ -15,11 +20,11 @@ impl B {
pub const VAR_C: B = B(2);
}
impl B {
- /// < Document field with following star
+ ///< Document field with following star
pub const VAR_D: B = B(3);
}
impl B {
- /// < Document field with following exclamation
+ ///< Document field with following exclamation
pub const VAR_E: B = B(4);
}
impl B {
diff --git a/tests/expectations/tests/enum-doc-mod.rs b/tests/expectations/tests/enum-doc-mod.rs
index cb10bb3d..1da02f41 100644
--- a/tests/expectations/tests/enum-doc-mod.rs
+++ b/tests/expectations/tests/enum-doc-mod.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
pub mod B {
/// Document enum
@@ -11,9 +16,9 @@ pub mod B {
pub const VAR_B: Type = 1;
/// Document field with preceeding exclamation
pub const VAR_C: Type = 2;
- /// < Document field with following star
+ ///< Document field with following star
pub const VAR_D: Type = 3;
- /// < Document field with following exclamation
+ ///< Document field with following exclamation
pub const VAR_E: Type = 4;
/// Document field with preceeding star, with a loong long multiline
/// comment.
diff --git a/tests/expectations/tests/enum-doc-rusty.rs b/tests/expectations/tests/enum-doc-rusty.rs
index 2a57fb64..e4209e3e 100644
--- a/tests/expectations/tests/enum-doc-rusty.rs
+++ b/tests/expectations/tests/enum-doc-rusty.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
#[repr(u32)]
/// Document enum
@@ -12,9 +17,9 @@ pub enum B {
VAR_B = 1,
/// Document field with preceeding exclamation
VAR_C = 2,
- /// < Document field with following star
+ ///< Document field with following star
VAR_D = 3,
- /// < Document field with following exclamation
+ ///< Document field with following exclamation
VAR_E = 4,
/// Document field with preceeding star, with a loong long multiline
/// comment.
diff --git a/tests/expectations/tests/enum-doc.rs b/tests/expectations/tests/enum-doc.rs
index e57728fb..0df3a5a5 100644
--- a/tests/expectations/tests/enum-doc.rs
+++ b/tests/expectations/tests/enum-doc.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
/// Document field with three slashes
pub const B_VAR_A: B = 0;
@@ -8,9 +13,9 @@ pub const B_VAR_A: B = 0;
pub const B_VAR_B: B = 1;
/// Document field with preceeding exclamation
pub const B_VAR_C: B = 2;
-/// < Document field with following star
+///< Document field with following star
pub const B_VAR_D: B = 3;
-/// < Document field with following exclamation
+///< Document field with following exclamation
pub const B_VAR_E: B = 4;
/// Document field with preceeding star, with a loong long multiline
/// comment.
diff --git a/tests/expectations/tests/layout_align.rs b/tests/expectations/tests/layout_align.rs
index 71ba76fb..a1fd55ba 100644
--- a/tests/expectations/tests/layout_align.rs
+++ b/tests/expectations/tests/layout_align.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@@ -140,15 +145,15 @@ impl<T> ::std::marker::Copy for __IncompleteArrayField<T> {}
#[repr(C)]
#[derive(Debug)]
pub struct rte_kni_fifo {
- /// < Next position to be written
+ ///< Next position to be written
pub write: ::std::os::raw::c_uint,
- /// < Next position to be read
+ ///< Next position to be read
pub read: ::std::os::raw::c_uint,
- /// < Circular buffer length
+ ///< Circular buffer length
pub len: ::std::os::raw::c_uint,
- /// < Pointer size - for 32/64 bit OS
+ ///< Pointer size - for 32/64 bit OS
pub elem_size: ::std::os::raw::c_uint,
- /// < The buffer contains mbuf pointers
+ ///< The buffer contains mbuf pointers
pub buffer: __IncompleteArrayField<*mut ::std::os::raw::c_void>,
pub __bindgen_align: [u64; 0usize],
}
@@ -173,7 +178,7 @@ impl Default for rte_kni_fifo {
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct rte_eth_link {
- /// < ETH_SPEED_NUM_
+ ///< ETH_SPEED_NUM_
pub link_speed: u32,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub __bindgen_padding_0: [u8; 3usize],
diff --git a/tests/expectations/tests/layout_arp.rs b/tests/expectations/tests/layout_arp.rs
index 7516f5e4..28dfd53c 100644
--- a/tests/expectations/tests/layout_arp.rs
+++ b/tests/expectations/tests/layout_arp.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
pub const ETHER_ADDR_LEN: u32 = 6;
pub const ARP_HRD_ETHER: u32 = 1;
@@ -22,7 +27,7 @@ pub const ARP_OP_INVREPLY: u32 = 9;
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ether_addr {
- /// < Addr bytes in tx order
+ ///< Addr bytes in tx order
pub addr_bytes: [u8; 6usize],
}
#[test]
@@ -52,13 +57,13 @@ fn bindgen_test_layout_ether_addr() {
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct arp_ipv4 {
- /// < sender hardware address
+ ///< sender hardware address
pub arp_sha: ether_addr,
- /// < sender IP address
+ ///< sender IP address
pub arp_sip: u32,
- /// < target hardware address
+ ///< target hardware address
pub arp_tha: ether_addr,
- /// < target IP address
+ ///< target IP address
pub arp_tip: u32,
}
#[test]
diff --git a/tests/expectations/tests/layout_array.rs b/tests/expectations/tests/layout_array.rs
index 15fbfa42..2fd93c4a 100644
--- a/tests/expectations/tests/layout_array.rs
+++ b/tests/expectations/tests/layout_array.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
pub const RTE_CACHE_LINE_SIZE: u32 = 64;
pub const RTE_MEMPOOL_OPS_NAMESIZE: u32 = 32;
@@ -46,17 +51,17 @@ pub type rte_mempool_get_count =
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rte_mempool_ops {
- /// < Name of mempool ops struct.
+ ///< Name of mempool ops struct.
pub name: [::std::os::raw::c_char; 32usize],
- /// < Allocate private data.
+ ///< Allocate private data.
pub alloc: rte_mempool_alloc_t,
- /// < Free the external pool.
+ ///< Free the external pool.
pub free: rte_mempool_free_t,
- /// < Enqueue an object.
+ ///< Enqueue an object.
pub enqueue: rte_mempool_enqueue_t,
- /// < Dequeue an object.
+ ///< Dequeue an object.
pub dequeue: rte_mempool_dequeue_t,
- /// < Get qty of available objs.
+ ///< Get qty of available objs.
pub get_count: rte_mempool_get_count,
pub __bindgen_padding_0: [u64; 7usize],
}
@@ -135,8 +140,11 @@ impl Default for rte_mempool_ops {
}
impl ::std::cmp::PartialEq for rte_mempool_ops {
fn eq(&self, other: &rte_mempool_ops) -> bool {
- self.name == other.name && self.alloc == other.alloc && self.free == other.free
- && self.enqueue == other.enqueue && self.dequeue == other.dequeue
+ self.name == other.name
+ && self.alloc == other.alloc
+ && self.free == other.free
+ && self.enqueue == other.enqueue
+ && self.dequeue == other.dequeue
&& self.get_count == other.get_count
}
}
@@ -144,7 +152,7 @@ impl ::std::cmp::PartialEq for rte_mempool_ops {
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_spinlock_t {
- /// < lock status 0 = unlocked, 1 = locked
+ ///< lock status 0 = unlocked, 1 = locked
pub locked: ::std::os::raw::c_int,
}
#[test]
@@ -180,9 +188,9 @@ fn bindgen_test_layout_rte_spinlock_t() {
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rte_mempool_ops_table {
- /// < Spinlock for add/delete.
+ ///< Spinlock for add/delete.
pub sl: rte_spinlock_t,
- /// < Number of used ops structs in the table.
+ ///< Number of used ops structs in the table.
pub num_ops: u32,
pub __bindgen_padding_0: [u64; 7usize],
/// Storage for all possible ops structs.
@@ -330,8 +338,10 @@ impl Default for malloc_heap {
}
impl ::std::cmp::PartialEq for malloc_heap {
fn eq(&self, other: &malloc_heap) -> bool {
- self.lock == other.lock && self.free_head == other.free_head
- && self.alloc_count == other.alloc_count && self.total_size == other.total_size
+ self.lock == other.lock
+ && self.free_head == other.free_head
+ && self.alloc_count == other.alloc_count
+ && self.total_size == other.total_size
}
}
#[repr(C)]
diff --git a/tests/expectations/tests/layout_array_too_long.rs b/tests/expectations/tests/layout_array_too_long.rs
index 24ab41a4..91c74d4b 100644
--- a/tests/expectations/tests/layout_array_too_long.rs
+++ b/tests/expectations/tests/layout_array_too_long.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
pub const RTE_CACHE_LINE_SIZE: u32 = 64;
pub const RTE_LIBRTE_IP_FRAG_MAX_FRAG: u32 = 4;
@@ -11,11 +16,11 @@ pub const IP_MAX_FRAG_NUM: _bindgen_ty_1 = _bindgen_ty_1::IP_MAX_FRAG_NUM;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_1 {
- /// < index of last fragment
+ ///< index of last fragment
IP_LAST_FRAG_IDX = 0,
- /// < index of first fragment
+ ///< index of first fragment
IP_FIRST_FRAG_IDX = 1,
- /// < minimum number of fragments
+ ///< minimum number of fragments
IP_MIN_FRAG_NUM = 2,
IP_MAX_FRAG_NUM = 4,
}
@@ -23,11 +28,11 @@ pub enum _bindgen_ty_1 {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ip_frag {
- /// < offset into the packet
+ ///< offset into the packet
pub ofs: u16,
- /// < length of fragment
+ ///< length of fragment
pub len: u16,
- /// < fragment mbuf
+ ///< fragment mbuf
pub mb: *mut rte_mbuf,
}
#[test]
@@ -82,11 +87,11 @@ impl Default for ip_frag {
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ip_frag_key {
- /// < src address, first 8 bytes used for IPv4
+ ///< src address, first 8 bytes used for IPv4
pub src_dst: [u64; 4usize],
- /// < dst address
+ ///< dst address
pub id: u32,
- /// < src/dst key length
+ ///< src/dst key length
pub key_len: u32,
}
#[test]
@@ -137,19 +142,19 @@ fn bindgen_test_layout_ip_frag_key() {
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ip_frag_pkt {
- /// < LRU list
+ ///< LRU list
pub lru: ip_frag_pkt__bindgen_ty_1,
- /// < fragmentation key
+ ///< fragmentation key
pub key: ip_frag_key,
- /// < creation timestamp
+ ///< creation timestamp
pub start: u64,
- /// < expected reassembled size
+ ///< expected reassembled size
pub total_size: u32,
- /// < size of fragments received
+ ///< size of fragments received
pub frag_size: u32,
- /// < index of next entry to fill
+ ///< index of next entry to fill
pub last_idx: u32,
- /// < fragments
+ ///< fragments
pub frags: [ip_frag; 4usize],
pub __bindgen_padding_0: [u64; 6usize],
}
@@ -286,12 +291,16 @@ impl Default for ip_frag_pkt {
}
impl ::std::cmp::PartialEq for ip_frag_pkt {
fn eq(&self, other: &ip_frag_pkt) -> bool {
- self.lru == other.lru && self.key == other.key && self.start == other.start
- && self.total_size == other.total_size && self.frag_size == other.frag_size
- && self.last_idx == other.last_idx && self.frags == other.frags
+ self.lru == other.lru
+ && self.key == other.key
+ && self.start == other.start
+ && self.total_size == other.total_size
+ && self.frag_size == other.frag_size
+ && self.last_idx == other.last_idx
+ && self.frags == other.frags
}
}
-/// < fragment mbuf
+///< fragment mbuf
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_mbuf {
diff --git a/tests/expectations/tests/layout_eth_conf.rs b/tests/expectations/tests/layout_eth_conf.rs
index c78d4db7..68aef5c6 100644
--- a/tests/expectations/tests/layout_eth_conf.rs
+++ b/tests/expectations/tests/layout_eth_conf.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@@ -133,8 +138,8 @@ pub const RTE_ETH_FLOW_GENEVE: u32 = 20;
pub const RTE_ETH_FLOW_NVGRE: u32 = 21;
pub const RTE_ETH_FLOW_MAX: u32 = 22;
#[repr(u32)]
-/// A set of values to identify what method is to be used to route
-/// packets to multiple queues.
+/// A set of values to identify what method is to be used to route
+/// packets to multiple queues.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_eth_rx_mq_mode {
/// None of DCB,RSS or VMDQ mode
@@ -160,9 +165,9 @@ pub enum rte_eth_rx_mq_mode {
pub struct rte_eth_rxmode {
/// The multi-queue packet distribution mode to be used, e.g. RSS.
pub mq_mode: rte_eth_rx_mq_mode,
- /// < Only used if jumbo_frame enabled.
+ ///< Only used if jumbo_frame enabled.
pub max_rx_pkt_len: u32,
- /// < hdr buf size (header_split enabled).
+ ///< hdr buf size (header_split enabled).
pub split_hdr_size: u16,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>,
}
@@ -372,20 +377,20 @@ impl rte_eth_rxmode {
/// packets using multi-TCs.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_eth_tx_mq_mode {
- /// < It is in neither DCB nor VT mode.
+ ///< It is in neither DCB nor VT mode.
ETH_MQ_TX_NONE = 0,
- /// < For TX side,only DCB is on.
+ ///< For TX side,only DCB is on.
ETH_MQ_TX_DCB = 1,
- /// < For TX side,both DCB and VT is on.
+ ///< For TX side,both DCB and VT is on.
ETH_MQ_TX_VMDQ_DCB = 2,
- /// < Only VT on, no DCB
+ ///< Only VT on, no DCB
ETH_MQ_TX_VMDQ_ONLY = 3,
}
/// A structure used to configure the TX features of an Ethernet port.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_txmode {
- /// < TX multi-queues mode.
+ ///< TX multi-queues mode.
pub mq_mode: rte_eth_tx_mq_mode,
pub pvid: u16,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
@@ -505,11 +510,11 @@ impl rte_eth_txmode {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_rss_conf {
- /// < If not NULL, 40-byte hash key.
+ ///< If not NULL, 40-byte hash key.
pub rss_key: *mut u8,
- /// < hash key length in bytes.
+ ///< hash key length in bytes.
pub rss_key_len: u8,
- /// < Hash functions to apply - see below.
+ ///< Hash functions to apply - see below.
pub rss_hf: u64,
}
#[test]
@@ -565,9 +570,9 @@ impl Default for rte_eth_rss_conf {
/// in DCB configratioins
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_eth_nb_tcs {
- /// < 4 TCs with DCB.
+ ///< 4 TCs with DCB.
ETH_4_TCS = 4,
- /// < 8 TCs with DCB.
+ ///< 8 TCs with DCB.
ETH_8_TCS = 8,
}
#[repr(u32)]
@@ -575,13 +580,13 @@ pub enum rte_eth_nb_tcs {
/// in VMDQ configurations.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_eth_nb_pools {
- /// < 8 VMDq pools.
+ ///< 8 VMDq pools.
ETH_8_POOLS = 8,
- /// < 16 VMDq pools.
+ ///< 16 VMDq pools.
ETH_16_POOLS = 16,
- /// < 32 VMDq pools.
+ ///< 32 VMDq pools.
ETH_32_POOLS = 32,
- /// < 64 VMDq pools.
+ ///< 64 VMDq pools.
ETH_64_POOLS = 64,
}
/// A structure used to configure the VMDQ+DCB feature
@@ -596,24 +601,24 @@ pub enum rte_eth_nb_pools {
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rte_eth_vmdq_dcb_conf {
- /// < With DCB, 16 or 32 pools
+ ///< With DCB, 16 or 32 pools
pub nb_queue_pools: rte_eth_nb_pools,
- /// < If non-zero, use a default pool
+ ///< If non-zero, use a default pool
pub enable_default_pool: u8,
- /// < The default pool, if applicable
+ ///< The default pool, if applicable
pub default_pool: u8,
- /// < We can have up to 64 filters/mappings
+ ///< We can have up to 64 filters/mappings
pub nb_pool_maps: u8,
- /// < VMDq vlan pool maps.
+ ///< VMDq vlan pool maps.
pub pool_map: [rte_eth_vmdq_dcb_conf__bindgen_ty_1; 64usize],
pub dcb_tc: [u8; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_vmdq_dcb_conf__bindgen_ty_1 {
- /// < The vlan id of the received frame
+ ///< The vlan id of the received frame
pub vlan_id: u16,
- /// < Bitmask of pools for packet rx
+ ///< Bitmask of pools for packet rx
pub pools: u64,
}
#[test]
@@ -748,7 +753,7 @@ impl Default for rte_eth_vmdq_dcb_conf {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_dcb_rx_conf {
- /// < Possible DCB TCs, 4 or 8 TCs
+ ///< Possible DCB TCs, 4 or 8 TCs
pub nb_tcs: rte_eth_nb_tcs,
/// Traffic class each UP mapped to.
pub dcb_tc: [u8; 8usize],
@@ -794,7 +799,7 @@ impl Default for rte_eth_dcb_rx_conf {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_vmdq_dcb_tx_conf {
- /// < With DCB, 16 or 32 pools.
+ ///< With DCB, 16 or 32 pools.
pub nb_queue_pools: rte_eth_nb_pools,
/// Traffic class each UP mapped to.
pub dcb_tc: [u8; 8usize],
@@ -842,7 +847,7 @@ impl Default for rte_eth_vmdq_dcb_tx_conf {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_dcb_tx_conf {
- /// < Possible DCB TCs, 4 or 8 TCs.
+ ///< Possible DCB TCs, 4 or 8 TCs.
pub nb_tcs: rte_eth_nb_tcs,
/// Traffic class each UP mapped to.
pub dcb_tc: [u8; 8usize],
@@ -888,7 +893,7 @@ impl Default for rte_eth_dcb_tx_conf {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_vmdq_tx_conf {
- /// < VMDq mode, 64 pools.
+ ///< VMDq mode, 64 pools.
pub nb_queue_pools: rte_eth_nb_pools,
}
#[test]
@@ -924,27 +929,27 @@ impl Default for rte_eth_vmdq_tx_conf {
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rte_eth_vmdq_rx_conf {
- /// < VMDq only mode, 8 or 64 pools
+ ///< VMDq only mode, 8 or 64 pools
pub nb_queue_pools: rte_eth_nb_pools,
- /// < If non-zero, use a default pool
+ ///< If non-zero, use a default pool
pub enable_default_pool: u8,
- /// < The default pool, if applicable
+ ///< The default pool, if applicable
pub default_pool: u8,
- /// < Enable VT loop back
+ ///< Enable VT loop back
pub enable_loop_back: u8,
- /// < We can have up to 64 filters/mappings
+ ///< We can have up to 64 filters/mappings
pub nb_pool_maps: u8,
- /// < Flags from ETH_VMDQ_ACCEPT_*
+ ///< Flags from ETH_VMDQ_ACCEPT_*
pub rx_mode: u32,
- /// < VMDq vlan pool maps.
+ ///< VMDq vlan pool maps.
pub pool_map: [rte_eth_vmdq_rx_conf__bindgen_ty_1; 64usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_vmdq_rx_conf__bindgen_ty_1 {
- /// < The vlan id of the received frame
+ ///< The vlan id of the received frame
pub vlan_id: u16,
- /// < Bitmask of pools for packet rx
+ ///< Bitmask of pools for packet rx
pub pools: u64,
}
#[test]
@@ -1089,56 +1094,56 @@ impl Default for rte_eth_vmdq_rx_conf {
}
}
#[repr(u32)]
-/// Flow Director setting modes: none, signature or perfect.
+/// Flow Director setting modes: none, signature or perfect.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_fdir_mode {
- /// < Disable FDIR support.
+ ///< Disable FDIR support.
RTE_FDIR_MODE_NONE = 0,
- /// < Enable FDIR signature filter mode.
+ ///< Enable FDIR signature filter mode.
RTE_FDIR_MODE_SIGNATURE = 1,
- /// < Enable FDIR perfect filter mode.
+ ///< Enable FDIR perfect filter mode.
RTE_FDIR_MODE_PERFECT = 2,
- /// < Enable FDIR filter mode - MAC VLAN.
+ ///< Enable FDIR filter mode - MAC VLAN.
RTE_FDIR_MODE_PERFECT_MAC_VLAN = 3,
- /// < Enable FDIR filter mode - tunnel.
+ ///< Enable FDIR filter mode - tunnel.
RTE_FDIR_MODE_PERFECT_TUNNEL = 4,
}
#[repr(u32)]
-/// Memory space that can be configured to store Flow Director filters
-/// in the board memory.
+/// Memory space that can be configured to store Flow Director filters
+/// in the board memory.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_fdir_pballoc_type {
- /// < 64k.
+ ///< 64k.
RTE_FDIR_PBALLOC_64K = 0,
- /// < 128k.
+ ///< 128k.
RTE_FDIR_PBALLOC_128K = 1,
- /// < 256k.
+ ///< 256k.
RTE_FDIR_PBALLOC_256K = 2,
}
#[repr(u32)]
-/// Select report mode of FDIR hash information in RX descriptors.
+/// Select report mode of FDIR hash information in RX descriptors.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_fdir_status_mode {
- /// < Never report FDIR hash.
+ ///< Never report FDIR hash.
RTE_FDIR_NO_REPORT_STATUS = 0,
- /// < Only report FDIR hash for matching pkts.
+ ///< Only report FDIR hash for matching pkts.
RTE_FDIR_REPORT_STATUS = 1,
- /// < Always report FDIR hash.
+ ///< Always report FDIR hash.
RTE_FDIR_REPORT_STATUS_ALWAYS = 2,
}
/// A structure used to define the input for IPV4 flow
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_ipv4_flow {
- /// < IPv4 source address in big endian.
+ ///< IPv4 source address in big endian.
pub src_ip: u32,
- /// < IPv4 destination address in big endian.
+ ///< IPv4 destination address in big endian.
pub dst_ip: u32,
- /// < Type of service to match.
+ ///< Type of service to match.
pub tos: u8,
- /// < Time to live to match.
+ ///< Time to live to match.
pub ttl: u8,
- /// < Protocol, next header in big endian.
+ ///< Protocol, next header in big endian.
pub proto: u8,
}
#[test]
@@ -1208,15 +1213,15 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_ipv6_flow {
- /// < IPv6 source address in big endian.
+ ///< IPv6 source address in big endian.
pub src_ip: [u32; 4usize],
- /// < IPv6 destination address in big endian.
+ ///< IPv6 destination address in big endian.
pub dst_ip: [u32; 4usize],
- /// < Traffic class to match.
+ ///< Traffic class to match.
pub tc: u8,
- /// < Protocol, next header to match.
+ ///< Protocol, next header to match.
pub proto: u8,
- /// < Hop limits to match.
+ ///< Hop limits to match.
pub hop_limits: u8,
}
#[test]
@@ -1282,12 +1287,12 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
}
-/// A structure used to configure FDIR masks that are used by the device
-/// to match the various fields of RX packet headers.
+/// A structure used to configure FDIR masks that are used by the device
+/// to match the various fields of RX packet headers.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_fdir_masks {
- /// < Bit mask for vlan_tci in big endian
+ ///< Bit mask for vlan_tci in big endian
pub vlan_tci_mask: u16,
/// Bit mask for ipv4 flow in big endian.
pub ipv4_mask: rte_eth_ipv4_flow,
@@ -1298,12 +1303,12 @@ pub struct rte_eth_fdir_masks {
/// Bit mask for L4 destination port in big endian.
pub dst_port_mask: u16,
/// 6 bit mask for proper 6 bytes of Mac address, bit 0 matches the
- /// first byte on the wire
+ ///first byte on the wire
pub mac_addr_byte_mask: u8,
/// Bit mask for tunnel ID in big endian.
pub tunnel_id_mask: u32,
- /// < 1 - Match tunnel type,
- /// 0 - Ignore tunnel type.
+ ///< 1 - Match tunnel type,
+ ///0 - Ignore tunnel type.
pub tunnel_type_mask: u8,
}
#[test]
@@ -1427,7 +1432,7 @@ pub enum rte_eth_payload_type {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_flex_payload_cfg {
- /// < Payload type
+ ///< Payload type
pub type_: rte_eth_payload_type,
pub src_offset: [u16; 16usize],
}
@@ -1519,9 +1524,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_mask() {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_eth_fdir_flex_conf {
- /// < The number of following payload cfg
+ ///< The number of following payload cfg
pub nb_payloads: u16,
- /// < The number of following mask
+ ///< The number of following mask
pub nb_flexmasks: u16,
pub flex_set: [rte_eth_flex_payload_cfg; 8usize],
pub flex_mask: [rte_eth_fdir_flex_mask; 22usize],
@@ -1597,11 +1602,11 @@ impl Default for rte_eth_fdir_flex_conf {
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_fdir_conf {
- /// < Flow Director mode.
+ ///< Flow Director mode.
pub mode: rte_fdir_mode,
- /// < Space for FDIR filters.
+ ///< Space for FDIR filters.
pub pballoc: rte_fdir_pballoc_type,
- /// < How to report FDIR hash.
+ ///< How to report FDIR hash.
pub status: rte_fdir_status_mode,
/// RX queue of packets matching a "drop" filter in perfect mode.
pub drop_queue: u8,
@@ -1734,40 +1739,40 @@ fn bindgen_test_layout_rte_intr_conf() {
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rte_eth_conf {
- /// < bitmap of ETH_LINK_SPEED_XXX of speeds to be
- /// used. ETH_LINK_SPEED_FIXED disables link
- /// autonegotiation, and a unique speed shall be
- /// set. Otherwise, the bitmap defines the set of
- /// speeds to be advertised. If the special value
- /// ETH_LINK_SPEED_AUTONEG (0) is used, all speeds
- /// supported are advertised.
+ ///< bitmap of ETH_LINK_SPEED_XXX of speeds to be
+ ///used. ETH_LINK_SPEED_FIXED disables link
+ ///autonegotiation, and a unique speed shall be
+ ///set. Otherwise, the bitmap defines the set of
+ ///speeds to be advertised. If the special value
+ ///ETH_LINK_SPEED_AUTONEG (0) is used, all speeds
+ ///supported are advertised.
pub link_speeds: u32,
- /// < Port RX configuration.
+ ///< Port RX configuration.
pub rxmode: rte_eth_rxmode,
- /// < Port TX configuration.
+ ///< Port TX configuration.
pub txmode: rte_eth_txmode,
- /// < Loopback operation mode. By default the value
- /// is 0, meaning the loopback mode is disabled.
- /// Read the datasheet of given ethernet controller
- /// for details. The possible values of this field
- /// are defined in implementation of each driver.
+ ///< Loopback operation mode. By default the value
+ ///is 0, meaning the loopback mode is disabled.
+ ///Read the datasheet of given ethernet controller
+ ///for details. The possible values of this field
+ ///are defined in implementation of each driver.
pub lpbk_mode: u32,
- /// < Port RX filtering configuration (union).
+ ///< Port RX filtering configuration (union).
pub rx_adv_conf: rte_eth_conf__bindgen_ty_1,
- /// < Port TX DCB configuration (union).
+ ///< Port TX DCB configuration (union).
pub tx_adv_conf: rte_eth_conf__bindgen_ty_2,
/// Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
- /// is needed,and the variable must be set ETH_DCB_PFC_SUPPORT.
+ ///is needed,and the variable must be set ETH_DCB_PFC_SUPPORT.
pub dcb_capability_en: u32,
- /// < FDIR configuration.
+ ///< FDIR configuration.
pub fdir_conf: rte_fdir_conf,
- /// < Interrupt mode configuration.
+ ///< Interrupt mode configuration.
pub intr_conf: rte_intr_conf,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rte_eth_conf__bindgen_ty_1 {
- /// < Port RSS configuration
+ ///< Port RSS configuration
pub rss_conf: rte_eth_rss_conf,
pub vmdq_dcb_conf: rte_eth_vmdq_dcb_conf,
pub dcb_rx_conf: rte_eth_dcb_rx_conf,
diff --git a/tests/expectations/tests/layout_eth_conf_1_0.rs b/tests/expectations/tests/layout_eth_conf_1_0.rs
index b20a74d8..d90b24f4 100644
--- a/tests/expectations/tests/layout_eth_conf_1_0.rs
+++ b/tests/expectations/tests/layout_eth_conf_1_0.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@@ -176,8 +181,8 @@ pub const RTE_ETH_FLOW_GENEVE: u32 = 20;
pub const RTE_ETH_FLOW_NVGRE: u32 = 21;
pub const RTE_ETH_FLOW_MAX: u32 = 22;
#[repr(u32)]
-/// A set of values to identify what method is to be used to route
-/// packets to multiple queues.
+/// A set of values to identify what method is to be used to route
+/// packets to multiple queues.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_eth_rx_mq_mode {
/// None of DCB,RSS or VMDQ mode
@@ -203,9 +208,9 @@ pub enum rte_eth_rx_mq_mode {
pub struct rte_eth_rxmode {
/// The multi-queue packet distribution mode to be used, e.g. RSS.
pub mq_mode: rte_eth_rx_mq_mode,
- /// < Only used if jumbo_frame enabled.
+ ///< Only used if jumbo_frame enabled.
pub max_rx_pkt_len: u32,
- /// < hdr buf size (header_split enabled).
+ ///< hdr buf size (header_split enabled).
pub split_hdr_size: u16,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>,
}
@@ -420,20 +425,20 @@ impl rte_eth_rxmode {
/// packets using multi-TCs.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_eth_tx_mq_mode {
- /// < It is in neither DCB nor VT mode.
+ ///< It is in neither DCB nor VT mode.
ETH_MQ_TX_NONE = 0,
- /// < For TX side,only DCB is on.
+ ///< For TX side,only DCB is on.
ETH_MQ_TX_DCB = 1,
- /// < For TX side,both DCB and VT is on.
+ ///< For TX side,both DCB and VT is on.
ETH_MQ_TX_VMDQ_DCB = 2,
- /// < Only VT on, no DCB
+ ///< Only VT on, no DCB
ETH_MQ_TX_VMDQ_ONLY = 3,
}
/// A structure used to configure the TX features of an Ethernet port.
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_txmode {
- /// < TX multi-queues mode.
+ ///< TX multi-queues mode.
pub mq_mode: rte_eth_tx_mq_mode,
pub pvid: u16,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
@@ -558,11 +563,11 @@ impl rte_eth_txmode {
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_rss_conf {
- /// < If not NULL, 40-byte hash key.
+ ///< If not NULL, 40-byte hash key.
pub rss_key: *mut u8,
- /// < hash key length in bytes.
+ ///< hash key length in bytes.
pub rss_key_len: u8,
- /// < Hash functions to apply - see below.
+ ///< Hash functions to apply - see below.
pub rss_hf: u64,
}
#[test]
@@ -623,9 +628,9 @@ impl Default for rte_eth_rss_conf {
/// in DCB configratioins
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_eth_nb_tcs {
- /// < 4 TCs with DCB.
+ ///< 4 TCs with DCB.
ETH_4_TCS = 4,
- /// < 8 TCs with DCB.
+ ///< 8 TCs with DCB.
ETH_8_TCS = 8,
}
#[repr(u32)]
@@ -633,13 +638,13 @@ pub enum rte_eth_nb_tcs {
/// in VMDQ configurations.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_eth_nb_pools {
- /// < 8 VMDq pools.
+ ///< 8 VMDq pools.
ETH_8_POOLS = 8,
- /// < 16 VMDq pools.
+ ///< 16 VMDq pools.
ETH_16_POOLS = 16,
- /// < 32 VMDq pools.
+ ///< 32 VMDq pools.
ETH_32_POOLS = 32,
- /// < 64 VMDq pools.
+ ///< 64 VMDq pools.
ETH_64_POOLS = 64,
}
/// A structure used to configure the VMDQ+DCB feature
@@ -654,24 +659,24 @@ pub enum rte_eth_nb_pools {
#[repr(C)]
#[derive(Copy)]
pub struct rte_eth_vmdq_dcb_conf {
- /// < With DCB, 16 or 32 pools
+ ///< With DCB, 16 or 32 pools
pub nb_queue_pools: rte_eth_nb_pools,
- /// < If non-zero, use a default pool
+ ///< If non-zero, use a default pool
pub enable_default_pool: u8,
- /// < The default pool, if applicable
+ ///< The default pool, if applicable
pub default_pool: u8,
- /// < We can have up to 64 filters/mappings
+ ///< We can have up to 64 filters/mappings
pub nb_pool_maps: u8,
- /// < VMDq vlan pool maps.
+ ///< VMDq vlan pool maps.
pub pool_map: [rte_eth_vmdq_dcb_conf__bindgen_ty_1; 64usize],
pub dcb_tc: [u8; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_vmdq_dcb_conf__bindgen_ty_1 {
- /// < The vlan id of the received frame
+ ///< The vlan id of the received frame
pub vlan_id: u16,
- /// < Bitmask of pools for packet rx
+ ///< Bitmask of pools for packet rx
pub pools: u64,
}
#[test]
@@ -816,7 +821,7 @@ impl Default for rte_eth_vmdq_dcb_conf {
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_dcb_rx_conf {
- /// < Possible DCB TCs, 4 or 8 TCs
+ ///< Possible DCB TCs, 4 or 8 TCs
pub nb_tcs: rte_eth_nb_tcs,
/// Traffic class each UP mapped to.
pub dcb_tc: [u8; 8usize],
@@ -867,7 +872,7 @@ impl Default for rte_eth_dcb_rx_conf {
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_vmdq_dcb_tx_conf {
- /// < With DCB, 16 or 32 pools.
+ ///< With DCB, 16 or 32 pools.
pub nb_queue_pools: rte_eth_nb_pools,
/// Traffic class each UP mapped to.
pub dcb_tc: [u8; 8usize],
@@ -920,7 +925,7 @@ impl Default for rte_eth_vmdq_dcb_tx_conf {
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_dcb_tx_conf {
- /// < Possible DCB TCs, 4 or 8 TCs.
+ ///< Possible DCB TCs, 4 or 8 TCs.
pub nb_tcs: rte_eth_nb_tcs,
/// Traffic class each UP mapped to.
pub dcb_tc: [u8; 8usize],
@@ -971,7 +976,7 @@ impl Default for rte_eth_dcb_tx_conf {
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_vmdq_tx_conf {
- /// < VMDq mode, 64 pools.
+ ///< VMDq mode, 64 pools.
pub nb_queue_pools: rte_eth_nb_pools,
}
#[test]
@@ -1012,27 +1017,27 @@ impl Default for rte_eth_vmdq_tx_conf {
#[repr(C)]
#[derive(Copy)]
pub struct rte_eth_vmdq_rx_conf {
- /// < VMDq only mode, 8 or 64 pools
+ ///< VMDq only mode, 8 or 64 pools
pub nb_queue_pools: rte_eth_nb_pools,
- /// < If non-zero, use a default pool
+ ///< If non-zero, use a default pool
pub enable_default_pool: u8,
- /// < The default pool, if applicable
+ ///< The default pool, if applicable
pub default_pool: u8,
- /// < Enable VT loop back
+ ///< Enable VT loop back
pub enable_loop_back: u8,
- /// < We can have up to 64 filters/mappings
+ ///< We can have up to 64 filters/mappings
pub nb_pool_maps: u8,
- /// < Flags from ETH_VMDQ_ACCEPT_*
+ ///< Flags from ETH_VMDQ_ACCEPT_*
pub rx_mode: u32,
- /// < VMDq vlan pool maps.
+ ///< VMDq vlan pool maps.
pub pool_map: [rte_eth_vmdq_rx_conf__bindgen_ty_1; 64usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_vmdq_rx_conf__bindgen_ty_1 {
- /// < The vlan id of the received frame
+ ///< The vlan id of the received frame
pub vlan_id: u16,
- /// < Bitmask of pools for packet rx
+ ///< Bitmask of pools for packet rx
pub pools: u64,
}
#[test]
@@ -1187,56 +1192,56 @@ impl Default for rte_eth_vmdq_rx_conf {
}
}
#[repr(u32)]
-/// Flow Director setting modes: none, signature or perfect.
+/// Flow Director setting modes: none, signature or perfect.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_fdir_mode {
- /// < Disable FDIR support.
+ ///< Disable FDIR support.
RTE_FDIR_MODE_NONE = 0,
- /// < Enable FDIR signature filter mode.
+ ///< Enable FDIR signature filter mode.
RTE_FDIR_MODE_SIGNATURE = 1,
- /// < Enable FDIR perfect filter mode.
+ ///< Enable FDIR perfect filter mode.
RTE_FDIR_MODE_PERFECT = 2,
- /// < Enable FDIR filter mode - MAC VLAN.
+ ///< Enable FDIR filter mode - MAC VLAN.
RTE_FDIR_MODE_PERFECT_MAC_VLAN = 3,
- /// < Enable FDIR filter mode - tunnel.
+ ///< Enable FDIR filter mode - tunnel.
RTE_FDIR_MODE_PERFECT_TUNNEL = 4,
}
#[repr(u32)]
-/// Memory space that can be configured to store Flow Director filters
-/// in the board memory.
+/// Memory space that can be configured to store Flow Director filters
+/// in the board memory.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_fdir_pballoc_type {
- /// < 64k.
+ ///< 64k.
RTE_FDIR_PBALLOC_64K = 0,
- /// < 128k.
+ ///< 128k.
RTE_FDIR_PBALLOC_128K = 1,
- /// < 256k.
+ ///< 256k.
RTE_FDIR_PBALLOC_256K = 2,
}
#[repr(u32)]
-/// Select report mode of FDIR hash information in RX descriptors.
+/// Select report mode of FDIR hash information in RX descriptors.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rte_fdir_status_mode {
- /// < Never report FDIR hash.
+ ///< Never report FDIR hash.
RTE_FDIR_NO_REPORT_STATUS = 0,
- /// < Only report FDIR hash for matching pkts.
+ ///< Only report FDIR hash for matching pkts.
RTE_FDIR_REPORT_STATUS = 1,
- /// < Always report FDIR hash.
+ ///< Always report FDIR hash.
RTE_FDIR_REPORT_STATUS_ALWAYS = 2,
}
/// A structure used to define the input for IPV4 flow
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_ipv4_flow {
- /// < IPv4 source address in big endian.
+ ///< IPv4 source address in big endian.
pub src_ip: u32,
- /// < IPv4 destination address in big endian.
+ ///< IPv4 destination address in big endian.
pub dst_ip: u32,
- /// < Type of service to match.
+ ///< Type of service to match.
pub tos: u8,
- /// < Time to live to match.
+ ///< Time to live to match.
pub ttl: u8,
- /// < Protocol, next header in big endian.
+ ///< Protocol, next header in big endian.
pub proto: u8,
}
#[test]
@@ -1311,15 +1316,15 @@ impl Clone for rte_eth_ipv4_flow {
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_ipv6_flow {
- /// < IPv6 source address in big endian.
+ ///< IPv6 source address in big endian.
pub src_ip: [u32; 4usize],
- /// < IPv6 destination address in big endian.
+ ///< IPv6 destination address in big endian.
pub dst_ip: [u32; 4usize],
- /// < Traffic class to match.
+ ///< Traffic class to match.
pub tc: u8,
- /// < Protocol, next header to match.
+ ///< Protocol, next header to match.
pub proto: u8,
- /// < Hop limits to match.
+ ///< Hop limits to match.
pub hop_limits: u8,
}
#[test]
@@ -1390,12 +1395,12 @@ impl Clone for rte_eth_ipv6_flow {
*self
}
}
-/// A structure used to configure FDIR masks that are used by the device
-/// to match the various fields of RX packet headers.
+/// A structure used to configure FDIR masks that are used by the device
+/// to match the various fields of RX packet headers.
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_fdir_masks {
- /// < Bit mask for vlan_tci in big endian
+ ///< Bit mask for vlan_tci in big endian
pub vlan_tci_mask: u16,
/// Bit mask for ipv4 flow in big endian.
pub ipv4_mask: rte_eth_ipv4_flow,
@@ -1406,12 +1411,12 @@ pub struct rte_eth_fdir_masks {
/// Bit mask for L4 destination port in big endian.
pub dst_port_mask: u16,
/// 6 bit mask for proper 6 bytes of Mac address, bit 0 matches the
- /// first byte on the wire
+ ///first byte on the wire
pub mac_addr_byte_mask: u8,
/// Bit mask for tunnel ID in big endian.
pub tunnel_id_mask: u32,
- /// < 1 - Match tunnel type,
- /// 0 - Ignore tunnel type.
+ ///< 1 - Match tunnel type,
+ ///0 - Ignore tunnel type.
pub tunnel_type_mask: u8,
}
#[test]
@@ -1540,7 +1545,7 @@ pub enum rte_eth_payload_type {
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_flex_payload_cfg {
- /// < Payload type
+ ///< Payload type
pub type_: rte_eth_payload_type,
pub src_offset: [u16; 16usize],
}
@@ -1642,9 +1647,9 @@ impl Clone for rte_eth_fdir_flex_mask {
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_eth_fdir_flex_conf {
- /// < The number of following payload cfg
+ ///< The number of following payload cfg
pub nb_payloads: u16,
- /// < The number of following mask
+ ///< The number of following mask
pub nb_flexmasks: u16,
pub flex_set: [rte_eth_flex_payload_cfg; 8usize],
pub flex_mask: [rte_eth_fdir_flex_mask; 22usize],
@@ -1725,11 +1730,11 @@ impl Default for rte_eth_fdir_flex_conf {
#[repr(C)]
#[derive(Debug, Copy, Hash, PartialEq, Eq)]
pub struct rte_fdir_conf {
- /// < Flow Director mode.
+ ///< Flow Director mode.
pub mode: rte_fdir_mode,
- /// < Space for FDIR filters.
+ ///< Space for FDIR filters.
pub pballoc: rte_fdir_pballoc_type,
- /// < How to report FDIR hash.
+ ///< How to report FDIR hash.
pub status: rte_fdir_status_mode,
/// RX queue of packets matching a "drop" filter in perfect mode.
pub drop_queue: u8,
@@ -1872,40 +1877,40 @@ impl Clone for rte_intr_conf {
#[repr(C)]
#[derive(Copy)]
pub struct rte_eth_conf {
- /// < bitmap of ETH_LINK_SPEED_XXX of speeds to be
- /// used. ETH_LINK_SPEED_FIXED disables link
- /// autonegotiation, and a unique speed shall be
- /// set. Otherwise, the bitmap defines the set of
- /// speeds to be advertised. If the special value
- /// ETH_LINK_SPEED_AUTONEG (0) is used, all speeds
- /// supported are advertised.
+ ///< bitmap of ETH_LINK_SPEED_XXX of speeds to be
+ ///used. ETH_LINK_SPEED_FIXED disables link
+ ///autonegotiation, and a unique speed shall be
+ ///set. Otherwise, the bitmap defines the set of
+ ///speeds to be advertised. If the special value
+ ///ETH_LINK_SPEED_AUTONEG (0) is used, all speeds
+ ///supported are advertised.
pub link_speeds: u32,
- /// < Port RX configuration.
+ ///< Port RX configuration.
pub rxmode: rte_eth_rxmode,
- /// < Port TX configuration.
+ ///< Port TX configuration.
pub txmode: rte_eth_txmode,
- /// < Loopback operation mode. By default the value
- /// is 0, meaning the loopback mode is disabled.
- /// Read the datasheet of given ethernet controller
- /// for details. The possible values of this field
- /// are defined in implementation of each driver.
+ ///< Loopback operation mode. By default the value
+ ///is 0, meaning the loopback mode is disabled.
+ ///Read the datasheet of given ethernet controller
+ ///for details. The possible values of this field
+ ///are defined in implementation of each driver.
pub lpbk_mode: u32,
- /// < Port RX filtering configuration (union).
+ ///< Port RX filtering configuration (union).
pub rx_adv_conf: rte_eth_conf__bindgen_ty_1,
- /// < Port TX DCB configuration (union).
+ ///< Port TX DCB configuration (union).
pub tx_adv_conf: rte_eth_conf__bindgen_ty_2,
/// Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
- /// is needed,and the variable must be set ETH_DCB_PFC_SUPPORT.
+ ///is needed,and the variable must be set ETH_DCB_PFC_SUPPORT.
pub dcb_capability_en: u32,
- /// < FDIR configuration.
+ ///< FDIR configuration.
pub fdir_conf: rte_fdir_conf,
- /// < Interrupt mode configuration.
+ ///< Interrupt mode configuration.
pub intr_conf: rte_intr_conf,
}
#[repr(C)]
#[derive(Copy)]
pub struct rte_eth_conf__bindgen_ty_1 {
- /// < Port RSS configuration
+ ///< Port RSS configuration
pub rss_conf: rte_eth_rss_conf,
pub vmdq_dcb_conf: rte_eth_vmdq_dcb_conf,
pub dcb_rx_conf: rte_eth_dcb_rx_conf,
diff --git a/tests/expectations/tests/layout_kni_mbuf.rs b/tests/expectations/tests/layout_kni_mbuf.rs
index 80ab1be9..cd456881 100644
--- a/tests/expectations/tests/layout_kni_mbuf.rs
+++ b/tests/expectations/tests/layout_kni_mbuf.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
pub const RTE_CACHE_LINE_MIN_SIZE: u32 = 64;
pub const RTE_CACHE_LINE_SIZE: u32 = 64;
@@ -10,18 +15,18 @@ pub struct rte_kni_mbuf {
pub buf_addr: *mut ::std::os::raw::c_void,
pub buf_physaddr: u64,
pub pad0: [::std::os::raw::c_char; 2usize],
- /// < Start address of data in segment buffer.
+ ///< Start address of data in segment buffer.
pub data_off: u16,
pub pad1: [::std::os::raw::c_char; 2usize],
- /// < Number of segments.
+ ///< Number of segments.
pub nb_segs: u8,
pub pad4: [::std::os::raw::c_char; 1usize],
- /// < Offload features.
+ ///< Offload features.
pub ol_flags: u64,
pub pad2: [::std::os::raw::c_char; 4usize],
- /// < Total pkt len: sum of all segment data_len.
+ ///< Total pkt len: sum of all segment data_len.
pub pkt_len: u32,
- /// < Amount of data in segment buffer.
+ ///< Amount of data in segment buffer.
pub data_len: u16,
pub __bindgen_padding_0: [u8; 22usize],
pub pad3: [::std::os::raw::c_char; 8usize],
diff --git a/tests/expectations/tests/layout_large_align_field.rs b/tests/expectations/tests/layout_large_align_field.rs
index af738d04..2bf8098e 100644
--- a/tests/expectations/tests/layout_large_align_field.rs
+++ b/tests/expectations/tests/layout_large_align_field.rs
@@ -1,6 +1,11 @@
/* automatically generated by rust-bindgen */
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
#[repr(C)]
#[derive(Default)]
@@ -48,11 +53,11 @@ pub const IP_MAX_FRAG_NUM: _bindgen_ty_1 = _bindgen_ty_1::IP_MAX_FRAG_NUM;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_1 {
- /// < index of last fragment
+ ///< index of last fragment
IP_LAST_FRAG_IDX = 0,
- /// < index of first fragment
+ ///< index of first fragment
IP_FIRST_FRAG_IDX = 1,
- /// < minimum number of fragments
+ ///< minimum number of fragments
IP_MIN_FRAG_NUM = 2,
IP_MAX_FRAG_NUM = 4,
}
@@ -60,11 +65,11 @@ pub enum _bindgen_ty_1 {
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ip_frag {
- /// < offset into the packet
+ ///< offset into the packet
pub ofs: u16,
- /// < length of fragment
+ ///< length of fragment
pub len: u16,
- /// < fragment mbuf
+ ///< fragment mbuf
pub mb: *mut rte_mbuf,
}
#[test]
@@ -119,11 +124,11 @@ impl Default for ip_frag {
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ip_frag_key {
- /// < src address, first 8 bytes used for IPv4
+ ///< src address, first 8 bytes used for IPv4
pub src_dst: [u64; 4usize],
- /// < dst address
+ ///< dst address
pub id: u32,
- /// < src/dst key length
+ ///< src/dst key length
pub key_len: u32,
}
#[test]
@@ -174,19 +179,19 @@ fn bindgen_test_layout_ip_frag_key() {
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ip_frag_pkt {
- /// < LRU list
+ ///< LRU list
pub lru: ip_frag_pkt__bindgen_ty_1,
- /// < fragmentation key
+ ///< fragmentation key
pub key: ip_frag_key,
- /// < creation timestamp
+ ///< creation timestamp
pub start: u64,
- /// < expected reassembled size
+ ///< expected reassembled size
pub total_size: u32,
- /// < size of fragments received
+ ///< size of fragments received
pub frag_size: u32,
- /// < index of next entry to fill
+ ///< index of next entry to fill
pub last_idx: u32,
- /// < fragments
+ ///< fragments
pub frags: [ip_frag; 4usize],
pub __bindgen_padding_0: [u64; 6usize],
}
@@ -369,17 +374,17 @@ impl Default for ip_pkt_list {
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ip_frag_tbl_stat {
- /// < total # of find/insert attempts.
+ ///< total # of find/insert attempts.
pub find_num: u64,
- /// < # of add ops.
+ ///< # of add ops.
pub add_num: u64,
- /// < # of del ops.
+ ///< # of del ops.
pub del_num: u64,
- /// < # of reuse (del/add) ops.
+ ///< # of reuse (del/add) ops.
pub reuse_num: u64,
- /// < total # of add failures.
+ ///< total # of add failures.
pub fail_total: u64,
- /// < # of 'no space' add failures.
+ ///< # of 'no space' add failures.
pub fail_nospace: u64,
pub __bindgen_padding_0: [u64; 2usize],
}
@@ -459,28 +464,28 @@ impl Default for ip_frag_tbl_stat {
/// fragmentation table
#[repr(C)]
pub struct rte_ip_frag_tbl {
- /// < ttl for table entries.
+ ///< ttl for table entries.
pub max_cycles: u64,
- /// < hash value mask.
+ ///< hash value mask.
pub entry_mask: u32,
- /// < max entries allowed.
+ ///< max entries allowed.
pub max_entries: u32,
- /// < entries in use.
+ ///< entries in use.
pub use_entries: u32,
- /// < hash assocaitivity.
+ ///< hash assocaitivity.
pub bucket_entries: u32,
- /// < total size of the table.
+ ///< total size of the table.
pub nb_entries: u32,
- /// < num of associativity lines.
+ ///< num of associativity lines.
pub nb_buckets: u32,
- /// < last used entry.
+ ///< last used entry.
pub last: *mut ip_frag_pkt,
- /// < LRU list for table entries.
+ ///< LRU list for table entries.
pub lru: ip_pkt_list,
pub __bindgen_padding_0: u64,
- /// < statistics counters.
+ ///< statistics counters.
pub stat: ip_frag_tbl_stat,
- /// < hash table.
+ ///< hash table.
pub pkt: __IncompleteArrayField<ip_frag_pkt>,
}
#[test]
@@ -606,7 +611,7 @@ impl Default for rte_ip_frag_tbl {
unsafe { ::std::mem::zeroed() }
}
}
-/// < fragment mbuf
+///< fragment mbuf
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct rte_mbuf {
diff --git a/tests/expectations/tests/layout_mbuf.rs b/tests/expectations/tests/layout_mbuf.rs
index af58ca1c..79b6d687 100644
--- a/tests/expectations/tests/layout_mbuf.rs
+++ b/tests/expectations/tests/layout_mbuf.rs
@@ -115,7 +115,7 @@ pub type MARKER64 = [u64; 0usize];
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_atomic16_t {
- /// < An internal counter value.
+ ///< An internal counter value.
pub cnt: i16,
}
#[test]
@@ -145,40 +145,40 @@ fn bindgen_test_layout_rte_atomic16_t() {
#[repr(C)]
pub struct rte_mbuf {
pub cacheline0: MARKER,
- /// < Virtual address of segment buffer.
+ ///< Virtual address of segment buffer.
pub buf_addr: *mut ::std::os::raw::c_void,
- /// < Physical address of segment buffer.
+ ///< Physical address of segment buffer.
pub buf_physaddr: phys_addr_t,
- /// < Length of segment buffer.
+ ///< Length of segment buffer.
pub buf_len: u16,
pub rearm_data: MARKER8,
pub data_off: u16,
pub __bindgen_anon_1: rte_mbuf__bindgen_ty_1,
- /// < Number of segments.
+ ///< Number of segments.
pub nb_segs: u8,
- /// < Input port.
+ ///< Input port.
pub port: u8,
- /// < Offload features.
+ ///< Offload features.
pub ol_flags: u64,
pub rx_descriptor_fields1: MARKER,
pub __bindgen_anon_2: rte_mbuf__bindgen_ty_2,
- /// < Total pkt len: sum of all segments.
+ ///< Total pkt len: sum of all segments.
pub pkt_len: u32,
- /// < Amount of data in segment buffer.
+ ///< Amount of data in segment buffer.
pub data_len: u16,
/// VLAN TCI (CPU order), valid if PKT_RX_VLAN_STRIPPED is set.
pub vlan_tci: u16,
- /// < hash information
+ ///< hash information
pub hash: rte_mbuf__bindgen_ty_3,
- /// < Sequence number. See also rte_reorder_insert()
+ ///< Sequence number. See also rte_reorder_insert()
pub seqn: u32,
/// Outer VLAN TCI (CPU order), valid if PKT_RX_QINQ_STRIPPED is set.
pub vlan_tci_outer: u16,
pub cacheline1: MARKER,
pub __bindgen_anon_3: rte_mbuf__bindgen_ty_4,
- /// < Pool from which mbuf was allocated.
+ ///< Pool from which mbuf was allocated.
pub pool: *mut rte_mempool,
- /// < Next segment of scattered packet.
+ ///< Next segment of scattered packet.
pub next: *mut rte_mbuf,
pub __bindgen_anon_4: rte_mbuf__bindgen_ty_5,
/// Size of the application private data. In case of an indirect
@@ -197,9 +197,9 @@ pub struct rte_mbuf {
#[repr(C)]
#[derive(Copy, Clone)]
pub union rte_mbuf__bindgen_ty_1 {
- /// < Atomically accessed refcnt
+ ///< Atomically accessed refcnt
pub refcnt_atomic: rte_atomic16_t,
- /// < Non-atomically accessed refcnt
+ ///< Non-atomically accessed refcnt
pub refcnt: u16,
_bindgen_union_align: u16,
}
@@ -246,7 +246,7 @@ impl Default for rte_mbuf__bindgen_ty_1 {
#[repr(C)]
#[derive(Copy, Clone)]
pub union rte_mbuf__bindgen_ty_2 {
- /// < L2/L3/L4 and tunnel information.
+ ///< L2/L3/L4 and tunnel information.
pub packet_type: u32,
pub __bindgen_anon_1: rte_mbuf__bindgen_ty_2__bindgen_ty_1,
_bindgen_union_align: u32,
@@ -430,13 +430,13 @@ impl Default for rte_mbuf__bindgen_ty_2 {
#[repr(C)]
#[derive(Copy, Clone)]
pub union rte_mbuf__bindgen_ty_3 {
- /// < RSS hash result if RSS enabled
+ ///< RSS hash result if RSS enabled
pub rss: u32,
- /// < Filter identifier if FDIR enabled
+ ///< Filter identifier if FDIR enabled
pub fdir: rte_mbuf__bindgen_ty_3__bindgen_ty_1,
- /// < Hierarchical scheduler
+ ///< Hierarchical scheduler
pub sched: rte_mbuf__bindgen_ty_3__bindgen_ty_2,
- /// < User defined tags. See rte_distributor_process()
+ ///< User defined tags. See rte_distributor_process()
pub usr: u32,
_bindgen_union_align: [u32; 2usize],
}
@@ -685,9 +685,9 @@ impl Default for rte_mbuf__bindgen_ty_3 {
#[repr(C)]
#[derive(Copy, Clone)]
pub union rte_mbuf__bindgen_ty_4 {
- /// < Can be used for external metadata
+ ///< Can be used for external metadata
pub userdata: *mut ::std::os::raw::c_void,
- /// < Allow 8-byte userdata on 32-bit
+ ///< Allow 8-byte userdata on 32-bit
pub udata64: u64,
_bindgen_union_align: u64,
}
@@ -732,7 +732,7 @@ impl Default for rte_mbuf__bindgen_ty_4 {
#[repr(C)]
#[derive(Copy, Clone)]
pub union rte_mbuf__bindgen_ty_5 {
- /// < combined for easy fetch
+ ///< combined for easy fetch
pub tx_offload: u64,
pub __bindgen_anon_1: rte_mbuf__bindgen_ty_5__bindgen_ty_1,
_bindgen_union_align: u64,
@@ -1120,7 +1120,7 @@ impl Default for rte_mbuf {
unsafe { ::std::mem::zeroed() }
}
}
-/// < Pool from which mbuf was allocated.
+///< Pool from which mbuf was allocated.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct rte_mempool {
diff --git a/tests/expectations/tests/layout_mbuf_1_0.rs b/tests/expectations/tests/layout_mbuf_1_0.rs
index da9d84b8..1ca99158 100644
--- a/tests/expectations/tests/layout_mbuf_1_0.rs
+++ b/tests/expectations/tests/layout_mbuf_1_0.rs
@@ -158,7 +158,7 @@ pub type MARKER64 = [u64; 0usize];
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_atomic16_t {
- /// < An internal counter value.
+ ///< An internal counter value.
pub cnt: i16,
}
#[test]
@@ -193,40 +193,40 @@ impl Clone for rte_atomic16_t {
#[repr(C)]
pub struct rte_mbuf {
pub cacheline0: MARKER,
- /// < Virtual address of segment buffer.
+ ///< Virtual address of segment buffer.
pub buf_addr: *mut ::std::os::raw::c_void,
- /// < Physical address of segment buffer.
+ ///< Physical address of segment buffer.
pub buf_physaddr: phys_addr_t,
- /// < Length of segment buffer.
+ ///< Length of segment buffer.
pub buf_len: u16,
pub rearm_data: MARKER8,
pub data_off: u16,
pub __bindgen_anon_1: rte_mbuf__bindgen_ty_1,
- /// < Number of segments.
+ ///< Number of segments.
pub nb_segs: u8,
- /// < Input port.
+ ///< Input port.
pub port: u8,
- /// < Offload features.
+ ///< Offload features.
pub ol_flags: u64,
pub rx_descriptor_fields1: MARKER,
pub __bindgen_anon_2: rte_mbuf__bindgen_ty_2,
- /// < Total pkt len: sum of all segments.
+ ///< Total pkt len: sum of all segments.
pub pkt_len: u32,
- /// < Amount of data in segment buffer.
+ ///< Amount of data in segment buffer.
pub data_len: u16,
/// VLAN TCI (CPU order), valid if PKT_RX_VLAN_STRIPPED is set.
pub vlan_tci: u16,
- /// < hash information
+ ///< hash information
pub hash: rte_mbuf__bindgen_ty_3,
- /// < Sequence number. See also rte_reorder_insert()
+ ///< Sequence number. See also rte_reorder_insert()
pub seqn: u32,
/// Outer VLAN TCI (CPU order), valid if PKT_RX_QINQ_STRIPPED is set.
pub vlan_tci_outer: u16,
pub cacheline1: MARKER,
pub __bindgen_anon_3: rte_mbuf__bindgen_ty_4,
- /// < Pool from which mbuf was allocated.
+ ///< Pool from which mbuf was allocated.
pub pool: *mut rte_mempool,
- /// < Next segment of scattered packet.
+ ///< Next segment of scattered packet.
pub next: *mut rte_mbuf,
pub __bindgen_anon_4: rte_mbuf__bindgen_ty_5,
/// Size of the application private data. In case of an indirect
@@ -245,9 +245,9 @@ pub struct rte_mbuf {
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_mbuf__bindgen_ty_1 {
- /// < Atomically accessed refcnt
+ ///< Atomically accessed refcnt
pub refcnt_atomic: __BindgenUnionField<rte_atomic16_t>,
- /// < Non-atomically accessed refcnt
+ ///< Non-atomically accessed refcnt
pub refcnt: __BindgenUnionField<u16>,
pub bindgen_union_field: u16,
}
@@ -294,7 +294,7 @@ impl Clone for rte_mbuf__bindgen_ty_1 {
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_mbuf__bindgen_ty_2 {
- /// < L2/L3/L4 and tunnel information.
+ ///< L2/L3/L4 and tunnel information.
pub packet_type: __BindgenUnionField<u32>,
pub __bindgen_anon_1: __BindgenUnionField<rte_mbuf__bindgen_ty_2__bindgen_ty_1>,
pub bindgen_union_field: u32,
@@ -483,13 +483,13 @@ impl Clone for rte_mbuf__bindgen_ty_2 {
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_mbuf__bindgen_ty_3 {
- /// < RSS hash result if RSS enabled
+ ///< RSS hash result if RSS enabled
pub rss: __BindgenUnionField<u32>,
- /// < Filter identifier if FDIR enabled
+ ///< Filter identifier if FDIR enabled
pub fdir: __BindgenUnionField<rte_mbuf__bindgen_ty_3__bindgen_ty_1>,
- /// < Hierarchical scheduler
+ ///< Hierarchical scheduler
pub sched: __BindgenUnionField<rte_mbuf__bindgen_ty_3__bindgen_ty_2>,
- /// < User defined tags. See rte_distributor_process()
+ ///< User defined tags. See rte_distributor_process()
pub usr: __BindgenUnionField<u32>,
pub bindgen_union_field: [u32; 2usize],
}
@@ -749,9 +749,9 @@ impl Clone for rte_mbuf__bindgen_ty_3 {
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_mbuf__bindgen_ty_4 {
- /// < Can be used for external metadata
+ ///< Can be used for external metadata
pub userdata: __BindgenUnionField<*mut ::std::os::raw::c_void>,
- /// < Allow 8-byte userdata on 32-bit
+ ///< Allow 8-byte userdata on 32-bit
pub udata64: __BindgenUnionField<u64>,
pub bindgen_union_field: u64,
}
@@ -796,7 +796,7 @@ impl Clone for rte_mbuf__bindgen_ty_4 {
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_mbuf__bindgen_ty_5 {
- /// < combined for easy fetch
+ ///< combined for easy fetch
pub tx_offload: __BindgenUnionField<u64>,
pub __bindgen_anon_1: __BindgenUnionField<rte_mbuf__bindgen_ty_5__bindgen_ty_1>,
pub bindgen_union_field: u64,
@@ -1189,7 +1189,7 @@ impl Default for rte_mbuf {
unsafe { ::std::mem::zeroed() }
}
}
-/// < Pool from which mbuf was allocated.
+///< Pool from which mbuf was allocated.
#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_mempool {