DPDK
25.11.0
Toggle main menu visibility
Loading...
Searching...
No Matches
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
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
25
31
static
inline
void
rte_prefetch0
(
const
volatile
void
*p);
32
38
static
inline
void
rte_prefetch1
(
const
volatile
void
*p);
39
46
static
inline
void
rte_prefetch2
(
const
volatile
void
*p);
47
58
static
inline
void
rte_prefetch_non_temporal
(
const
volatile
void
*p);
59
70
__rte_experimental
71
static
inline
void
72
rte_prefetch0_write
(
const
void
*p)
73
{
74
/* 1 indicates intention to write, 3 sets target cache level to L1. See
75
* GCC docs where these integer constants are described in more detail:
76
* https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
77
*/
78
#ifdef RTE_TOOLCHAIN_MSVC
79
rte_prefetch0
(p);
80
#else
81
__builtin_prefetch(p, 1, 3);
82
#endif
83
}
84
95
__rte_experimental
96
static
inline
void
97
rte_prefetch1_write
(
const
void
*p)
98
{
99
/* 1 indicates intention to write, 2 sets target cache level to L2. See
100
* GCC docs where these integer constants are described in more detail:
101
* https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
102
*/
103
#ifdef RTE_TOOLCHAIN_MSVC
104
rte_prefetch1
(p);
105
#else
106
__builtin_prefetch(p, 1, 2);
107
#endif
108
}
109
120
__rte_experimental
121
static
inline
void
122
rte_prefetch2_write
(
const
void
*p)
123
{
124
/* 1 indicates intention to write, 1 sets target cache level to L3. See
125
* GCC docs where these integer constants are described in more detail:
126
* https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
127
*/
128
#ifdef RTE_TOOLCHAIN_MSVC
129
rte_prefetch2
(p);
130
#else
131
__builtin_prefetch(p, 1, 1);
132
#endif
133
}
134
149
__rte_experimental
150
static
inline
void
151
rte_cldemote
(
const
volatile
void
*p);
152
153
#ifdef __cplusplus
154
}
155
#endif
156
157
#endif
/* _RTE_PREFETCH_H_ */
rte_prefetch_non_temporal
static void rte_prefetch_non_temporal(const volatile void *p)
rte_prefetch1_write
static __rte_experimental void rte_prefetch1_write(const void *p)
Definition
rte_prefetch.h:97
rte_prefetch1
static void rte_prefetch1(const volatile void *p)
rte_prefetch0_write
static __rte_experimental void rte_prefetch0_write(const void *p)
Definition
rte_prefetch.h:72
rte_prefetch0
static void rte_prefetch0(const volatile void *p)
rte_prefetch2_write
static __rte_experimental void rte_prefetch2_write(const void *p)
Definition
rte_prefetch.h:122
rte_prefetch2
static void rte_prefetch2(const volatile void *p)
rte_cldemote
static __rte_experimental void rte_cldemote(const volatile void *p)
lib
eal
include
generic
rte_prefetch.h
Generated by
1.17.0