FD.io VPP  v20.05.1-5-g09f167997
Vector Packet Processing
cache.h File Reference
+ Include dependency graph for cache.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CLIB_LOG2_CACHE_LINE_BYTES   6
 
#define CLIB_CACHE_LINE_BYTES   (1 << CLIB_LOG2_CACHE_LINE_BYTES)
 
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)   u8 mark[0] __attribute__((aligned(CLIB_CACHE_LINE_BYTES)))
 
#define CLIB_CACHE_LINE_ROUND(x)   ((x + CLIB_CACHE_LINE_BYTES - 1) & ~(CLIB_CACHE_LINE_BYTES - 1))
 
#define CLIB_N_PREFETCHES   16
 
#define CLIB_PREFETCH_READ   0
 
#define CLIB_PREFETCH_LOAD   0 /* alias for read */
 
#define CLIB_PREFETCH_WRITE   1
 
#define CLIB_PREFETCH_STORE   1 /* alias for write */
 
#define CLIB_PREFETCH(addr, size, type)
 

Functions

static_always_inline void clib_prefetch_load (void *p)
 
static_always_inline void clib_prefetch_store (void *p)
 

Macro Definition Documentation

◆ CLIB_CACHE_LINE_ALIGN_MARK

#define CLIB_CACHE_LINE_ALIGN_MARK (   mark)    u8 mark[0] __attribute__((aligned(CLIB_CACHE_LINE_BYTES)))

Definition at line 60 of file cache.h.

◆ CLIB_CACHE_LINE_BYTES

#define CLIB_CACHE_LINE_BYTES   (1 << CLIB_LOG2_CACHE_LINE_BYTES)

Definition at line 59 of file cache.h.

◆ CLIB_CACHE_LINE_ROUND

#define CLIB_CACHE_LINE_ROUND (   x)    ((x + CLIB_CACHE_LINE_BYTES - 1) & ~(CLIB_CACHE_LINE_BYTES - 1))

Definition at line 61 of file cache.h.

◆ CLIB_LOG2_CACHE_LINE_BYTES

#define CLIB_LOG2_CACHE_LINE_BYTES   6

Definition at line 50 of file cache.h.

◆ CLIB_N_PREFETCHES

#define CLIB_N_PREFETCHES   16

Definition at line 65 of file cache.h.

◆ CLIB_PREFETCH

#define CLIB_PREFETCH (   addr,
  size,
  type 
)
Value:
do { \
void * _addr = (addr); \
_CLIB_PREFETCH (0, size, type); \
_CLIB_PREFETCH (1, size, type); \
_CLIB_PREFETCH (2, size, type); \
_CLIB_PREFETCH (3, size, type); \
} while (0)
vhost_vring_addr_t addr
Definition: vhost_user.h:254
vl_api_fib_path_type_t type
Definition: fib_types.api:123
u64 size
Definition: vhost_user.h:150
#define ASSERT(truth)
#define CLIB_CACHE_LINE_BYTES
Definition: cache.h:59

Definition at line 80 of file cache.h.

◆ CLIB_PREFETCH_LOAD

#define CLIB_PREFETCH_LOAD   0 /* alias for read */

Definition at line 70 of file cache.h.

◆ CLIB_PREFETCH_READ

#define CLIB_PREFETCH_READ   0

Definition at line 69 of file cache.h.

◆ CLIB_PREFETCH_STORE

#define CLIB_PREFETCH_STORE   1 /* alias for write */

Definition at line 72 of file cache.h.

◆ CLIB_PREFETCH_WRITE

#define CLIB_PREFETCH_WRITE   1

Definition at line 71 of file cache.h.

Function Documentation

◆ clib_prefetch_load()

static_always_inline void clib_prefetch_load ( void *  p)

Definition at line 94 of file cache.h.

+ Here is the caller graph for this function:

◆ clib_prefetch_store()

static_always_inline void clib_prefetch_store ( void *  p)

Definition at line 100 of file cache.h.