File tree 1 file changed +41
-1
lines changed
1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change
1
+ #include < stdint.h>
2
+ #include < stddef.h>
3
+
1
4
int x __attribute__ ((aligned (16 ))) = 0;
2
5
3
6
struct foo { int x[2 ] __attribute__ ((unused, aligned (8 ), deprecated)); };
@@ -17,4 +20,41 @@ extern int
17
20
my_printf (void *my_object, const char *my_format, ...)
18
21
__attribute__ ((format (printf, 2 , 3 )));
19
22
20
- void fatal () __attribute__ ((noreturn));
23
+ void fatal () __attribute__ ((noreturn));
24
+
25
+ /* *
26
+ * Force alignment
27
+ */
28
+ #define __rte_aligned (a ) __attribute__((__aligned__(a)))
29
+
30
+ /* *
31
+ * Force a structure to be packed
32
+ */
33
+ #define __rte_packed __attribute__ ((__packed__))
34
+
35
+ #define RTE_CACHE_LINE_SIZE 64 /* *< Minimum Cache line size. */
36
+
37
+ /* *
38
+ * Force alignment to cache line.
39
+ */
40
+ #define __rte_cache_aligned __rte_aligned (RTE_CACHE_LINE_SIZE)
41
+
42
+ /* *
43
+ * The generic rte_mbuf, containing a packet mbuf.
44
+ */
45
+ struct rte_mbuf {
46
+ /* * Timesync flags for use with IEEE1588. */
47
+ uint16_t timesync;
48
+ } __rte_cache_aligned;
49
+
50
+ /* *
51
+ * Physical memory segment descriptor.
52
+ */
53
+ struct rte_memseg {
54
+ uint32_t nchannel; /* *< Number of channels. */
55
+ uint32_t nrank; /* *< Number of ranks. */
56
+ } __rte_packed;
57
+
58
+ struct align {
59
+ int foo;
60
+ } __attribute__((aligned(2 * sizeof (long long ))));
You can’t perform that action at this time.
0 commit comments