File tree 2 files changed +44
-2
lines changed
2 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 4
4
#![ allow( non_snake_case) ]
5
5
6
6
7
+ pub const RTE_CACHE_LINE_SIZE : :: std:: os:: raw:: c_uint = 64 ;
7
8
#[ doc = "__attribute__(aligned(16))" ]
8
9
pub const x: :: std:: os:: raw:: c_int = 0 ;
9
10
#[ repr( C ) ]
@@ -47,3 +48,44 @@ extern "C" {
47
48
#[ link_name = "_Z5fatalv" ]
48
49
pub fn fatal ( ) ;
49
50
}
51
+ /**
52
+ * The generic rte_mbuf, containing a packet mbuf.
53
+ */
54
+ #[ doc = "__attribute__(__aligned__(a))" ]
55
+ #[ repr( C ) ]
56
+ #[ derive( Debug , Copy ) ]
57
+ pub struct rte_mbuf {
58
+ /** Timesync flags for use with IEEE1588. */
59
+ pub timesync : u16 ,
60
+ }
61
+ impl Clone for rte_mbuf {
62
+ fn clone ( & self ) -> Self { * self }
63
+ }
64
+ /**
65
+ * Physical memory segment descriptor.
66
+ */
67
+ #[ repr( C , packed) ]
68
+ #[ derive( Debug , Copy ) ]
69
+ pub struct rte_memseg {
70
+ /**< Number of channels. */
71
+ pub nchannel : u32 ,
72
+ /**< Number of ranks. */
73
+ pub nrank : u32 ,
74
+ }
75
+ #[ test]
76
+ fn bindgen_test_layout_rte_memseg ( ) {
77
+ assert_eq ! ( :: std:: mem:: size_of:: <rte_memseg>( ) , 8usize ) ;
78
+ assert_eq ! ( :: std:: mem:: align_of:: <rte_memseg>( ) , 1usize ) ;
79
+ }
80
+ impl Clone for rte_memseg {
81
+ fn clone ( & self ) -> Self { * self }
82
+ }
83
+ #[ doc = "__attribute__(aligned(2*sizeof(longlong)))" ]
84
+ #[ repr( C ) ]
85
+ #[ derive( Debug , Copy ) ]
86
+ pub struct align {
87
+ pub foo : :: std:: os:: raw:: c_int ,
88
+ }
89
+ impl Clone for align {
90
+ fn clone ( & self ) -> Self { * self }
91
+ }
Original file line number Diff line number Diff line change 1
- # include < stdint.h >
2
- # include < stddef.h >
1
+ typedef unsigned short uint16_t ;
2
+ typedef unsigned int uint32_t ;
3
3
4
4
int x __attribute__ ((aligned (16 ))) = 0;
5
5
You can’t perform that action at this time.
0 commit comments