DPDK 22.11.4
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
27static inline void rte_prefetch0(const volatile void *p);
28
34static inline void rte_prefetch1(const volatile void *p);
35
42static inline void rte_prefetch2(const volatile void *p);
43
54static inline void rte_prefetch_non_temporal(const volatile void *p);
55
66__rte_experimental
67static inline void
68rte_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
88static inline void
89rte_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
109static inline void
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
134static inline void
135rte_cldemote(const volatile void *p);
136
137#endif /* _RTE_PREFETCH_H_ */
static void rte_prefetch_non_temporal(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 __rte_experimental void rte_prefetch2_write(const void *p)
Definition: rte_prefetch.h:110
static void rte_prefetch2(const volatile void *p)
static __rte_experimental void rte_cldemote(const volatile void *p)