git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common/iavf: fix RSS algorithm type
[dpdk.git]
/
lib
/
librte_eal
/
include
/
rte_common.h
diff --git
a/lib/librte_eal/include/rte_common.h
b/lib/librte_eal/include/rte_common.h
index
f820c2e
..
0843ce6
100644
(file)
--- a/
lib/librte_eal/include/rte_common.h
+++ b/
lib/librte_eal/include/rte_common.h
@@
-63,21
+63,21
@@
extern "C" {
__GNUC_PATCHLEVEL__)
#endif
__GNUC_PATCHLEVEL__)
#endif
+/**
+ * Force alignment
+ */
+#define __rte_aligned(a) __attribute__((__aligned__(a)))
+
#ifdef RTE_ARCH_STRICT_ALIGN
#ifdef RTE_ARCH_STRICT_ALIGN
-typedef uint64_t unaligned_uint64_t __
attribute__ ((aligned(1))
);
-typedef uint32_t unaligned_uint32_t __
attribute__ ((aligned(1))
);
-typedef uint16_t unaligned_uint16_t __
attribute__ ((aligned(1))
);
+typedef uint64_t unaligned_uint64_t __
rte_aligned(1
);
+typedef uint32_t unaligned_uint32_t __
rte_aligned(1
);
+typedef uint16_t unaligned_uint16_t __
rte_aligned(1
);
#else
typedef uint64_t unaligned_uint64_t;
typedef uint32_t unaligned_uint32_t;
typedef uint16_t unaligned_uint16_t;
#endif
#else
typedef uint64_t unaligned_uint64_t;
typedef uint32_t unaligned_uint32_t;
typedef uint16_t unaligned_uint16_t;
#endif
-/**
- * Force alignment
- */
-#define __rte_aligned(a) __attribute__((__aligned__(a)))
-
/**
* Force a structure to be packed
*/
/**
* Force a structure to be packed
*/
@@
-91,6
+91,11
@@
typedef uint16_t unaligned_uint16_t;
*/
#define __rte_weak __attribute__((__weak__))
*/
#define __rte_weak __attribute__((__weak__))
+/**
+ * Force symbol to be generated even if it appears to be unused.
+ */
+#define __rte_used __attribute__((used))
+
/*********** Macros to eliminate unused variable warnings ********/
/**
/*********** Macros to eliminate unused variable warnings ********/
/**
@@
-177,6
+182,11
@@
static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
#define RTE_FINI(func) \
RTE_FINI_PRIO(func, LAST)
#define RTE_FINI(func) \
RTE_FINI_PRIO(func, LAST)
+/**
+ * Hint never returning function
+ */
+#define __rte_noreturn __attribute__((noreturn))
+
/**
* Force a function to be inlined
*/
/**
* Force a function to be inlined
*/
@@
-185,7
+195,17
@@
static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
/**
* Force a function to be noinlined
*/
/**
* Force a function to be noinlined
*/
-#define __rte_noinline __attribute__((noinline))
+#define __rte_noinline __attribute__((noinline))
+
+/**
+ * Hint function in the hot path
+ */
+#define __rte_hot __attribute__((hot))
+
+/**
+ * Hint function in the cold path
+ */
+#define __rte_cold __attribute__((cold))
/*********** Macros for pointer arithmetic ********/
/*********** Macros for pointer arithmetic ********/
@@
-389,7
+409,7
@@
__extension__ typedef uint64_t RTE_MARKER64[0];
* The combined value.
*/
static inline uint32_t
* The combined value.
*/
static inline uint32_t
-rte_combine32ms1b(
register
uint32_t x)
+rte_combine32ms1b(uint32_t x)
{
x |= x >> 1;
x |= x >> 2;
{
x |= x >> 1;
x |= x >> 2;
@@
-411,7
+431,7
@@
rte_combine32ms1b(register uint32_t x)
* The combined value.
*/
static inline uint64_t
* The combined value.
*/
static inline uint64_t
-rte_combine64ms1b(
register
uint64_t v)
+rte_combine64ms1b(uint64_t v)
{
v |= v >> 1;
v |= v >> 2;
{
v |= v >> 1;
v |= v >> 2;
@@
-717,7
+737,7
@@
rte_log2_u64(uint64_t v)
#ifndef container_of
#define container_of(ptr, type, member) __extension__ ({ \
const typeof(((type *)0)->member) *_ptr = (ptr); \
#ifndef container_of
#define container_of(ptr, type, member) __extension__ ({ \
const typeof(((type *)0)->member) *_ptr = (ptr); \
- __
attribute__((unused)) type *_target_ptr =
\
+ __
rte_unused type *_target_ptr =
\
(type *)(ptr); \
(type *)(((uintptr_t)_ptr) - offsetof(type, member)); \
})
(type *)(ptr); \
(type *)(((uintptr_t)_ptr) - offsetof(type, member)); \
})
@@
-811,9
+831,8
@@
rte_str_to_size(const char *str)
* printf format characters which will be expanded using any further parameters
* to the function.
*/
* printf format characters which will be expanded using any further parameters
* to the function.
*/
-void
+
__rte_noreturn
void
rte_exit(int exit_code, const char *format, ...)
rte_exit(int exit_code, const char *format, ...)
- __attribute__((noreturn))
__rte_format_printf(2, 3);
#ifdef __cplusplus
__rte_format_printf(2, 3);
#ifdef __cplusplus