DPDK  22.07.0
rte_prefetch.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2015 Intel Corporation
3  */
4 
5 #ifndef _RTE_PREFETCH_H_
6 #define _RTE_PREFETCH_H_
7 
8 #include <rte_compat.h>
9 
27 static inline void rte_prefetch0(const volatile void *p);
28 
34 static inline void rte_prefetch1(const volatile void *p);
35 
42 static inline void rte_prefetch2(const volatile void *p);
43 
54 static inline void rte_prefetch_non_temporal(const volatile void *p);
55 
66 __rte_experimental
67 static inline void
68 rte_prefetch0_write(const void *p)
69 {
70  /* 1 indicates intention to write, 3 sets target cache level to L1. See
71  * GCC docs where these integer constants are described in more detail:
72  * https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
73  */
74  __builtin_prefetch(p, 1, 3);
75 }
76 
87 __rte_experimental
88 static inline void
89 rte_prefetch1_write(const void *p)
90 {
91  /* 1 indicates intention to write, 2 sets target cache level to L2. See
92  * GCC docs where these integer constants are described in more detail:
93  * https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
94  */
95  __builtin_prefetch(p, 1, 2);
96 }
97 
108 __rte_experimental
109 static inline void
110 rte_prefetch2_write(const void *p)
111 {
112  /* 1 indicates intention to write, 1 sets target cache level to L3. See
113  * GCC docs where these integer constants are described in more detail:
114  * https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
115  */
116  __builtin_prefetch(p, 1, 1);
117 }
118 
133 __rte_experimental
134 static inline void
135 rte_cldemote(const volatile void *p);
136 
137 #endif /* _RTE_PREFETCH_H_ */
static void rte_prefetch2(const volatile void *p)
static __rte_experimental void rte_prefetch2_write(const void *p)
Definition: rte_prefetch.h:110
static __rte_experimental void rte_cldemote(const volatile void *p)
static __rte_experimental void rte_prefetch1_write(const void *p)
Definition: rte_prefetch.h:89
static void rte_prefetch1(const volatile void *p)
static __rte_experimental void rte_prefetch0_write(const void *p)
Definition: rte_prefetch.h:68
static void rte_prefetch0(const volatile void *p)
static void rte_prefetch_non_temporal(const volatile void *p)