FD.io VPP  v19.04-6-g6f05f72
Vector Packet Processing
pipeline.h File Reference

Go to the source code of this file.

Macros

#define clib_pipeline_stage(F, TYPE, ARG, I, BODY)
 
#define clib_pipeline_stage_static(F, TYPE, ARG, I, BODY)
 
#define clib_pipeline_stage_no_inline(F, TYPE, ARG, I, BODY)
 
#define clib_pipeline_stage_execute(F, A, I, S)   F##_##S (A, _clib_pipeline_var(i) - (I))
 
#define clib_pipeline_main_stage(F, A, I)   clib_pipeline_stage_execute (F, A, I, inline)
 
#define clib_pipeline_init_stage(F, A, I)   if (_clib_pipeline_var(i) >= (I)) clib_pipeline_stage_execute (F, A, I, no_inline)
 
#define clib_pipeline_exit_stage(F, A, I)
 
#define clib_pipeline_init_loop
 
#define clib_pipeline_main_loop
 
#define clib_pipeline_exit_loop
 
#define clib_pipeline_run_2_stage(N, ARG, STAGE0, STAGE1)
 
#define clib_pipeline_run_3_stage(N, ARG, STAGE0, STAGE1, STAGE2)
 
#define clib_pipeline_run_4_stage(N, ARG, STAGE0, STAGE1, STAGE2, STAGE3)
 

Macro Definition Documentation

#define clib_pipeline_exit_loop
Value:
for (; _clib_pipeline_var(i) < (_clib_pipeline_var(n_vectors) \
+ _clib_pipeline_var(n_stages) - 1); \
_clib_pipeline_var(i)++)
int i

Definition at line 85 of file pipeline.h.

#define clib_pipeline_exit_stage (   F,
  A,
 
)
Value:
if (_clib_pipeline_var(i) >= (I) && _clib_pipeline_var(i) - (I) < _clib_pipeline_var(n_vectors)) \
int i
#define A(x)
Definition: main.c:1024
#define clib_pipeline_stage_execute(F, A, I, S)
Definition: pipeline.h:63
#define F(n, v, s)
Definition: cuckoo_common.h:38

Definition at line 70 of file pipeline.h.

#define clib_pipeline_init_loop
Value:
for (_clib_pipeline_var(i) = 0; \
_clib_pipeline_var(i) < \
clib_min (_clib_pipeline_var(n_stages) - 1, \
_clib_pipeline_var(n_vectors)); \
_clib_pipeline_var(i)++)
#define clib_min(x, y)
Definition: clib.h:295
int i

Definition at line 74 of file pipeline.h.

#define clib_pipeline_init_stage (   F,
  A,
 
)    if (_clib_pipeline_var(i) >= (I)) clib_pipeline_stage_execute (F, A, I, no_inline)

Definition at line 68 of file pipeline.h.

#define clib_pipeline_main_loop
Value:
for (; _clib_pipeline_var(i) < _clib_pipeline_var(n_vectors); \
_clib_pipeline_var(i)++)
int i

Definition at line 81 of file pipeline.h.

#define clib_pipeline_main_stage (   F,
  A,
 
)    clib_pipeline_stage_execute (F, A, I, inline)

Definition at line 66 of file pipeline.h.

#define clib_pipeline_run_2_stage (   N,
  ARG,
  STAGE0,
  STAGE1 
)
Value:
do { \
uword _clib_pipeline_var(n_vectors) = (N); \
uword _clib_pipeline_var(n_stages) = 2; \
uword _clib_pipeline_var(i); \
\
{ \
clib_pipeline_init_stage (STAGE0, ARG, 0); \
} \
\
{ \
clib_pipeline_main_stage (STAGE0, ARG, 0); \
clib_pipeline_main_stage (STAGE1, ARG, 1); \
} \
\
{ \
clib_pipeline_exit_stage (STAGE1, ARG, 1); \
} \
} while (0)
#define clib_pipeline_exit_loop
Definition: pipeline.h:85
#define clib_pipeline_init_stage(F, A, I)
Definition: pipeline.h:68
#define clib_pipeline_exit_stage(F, A, I)
Definition: pipeline.h:70
int i
#define clib_pipeline_main_stage(F, A, I)
Definition: pipeline.h:66
#define clib_pipeline_main_loop
Definition: pipeline.h:81
u64 uword
Definition: types.h:112
#define clib_pipeline_init_loop
Definition: pipeline.h:74

Definition at line 90 of file pipeline.h.

#define clib_pipeline_run_3_stage (   N,
  ARG,
  STAGE0,
  STAGE1,
  STAGE2 
)
Value:
do { \
uword _clib_pipeline_var(n_vectors) = (N); \
uword _clib_pipeline_var(n_stages) = 3; \
uword _clib_pipeline_var(i); \
\
{ \
clib_pipeline_init_stage (STAGE0, ARG, 0); \
clib_pipeline_init_stage (STAGE1, ARG, 1); \
} \
\
{ \
clib_pipeline_main_stage (STAGE0, ARG, 0); \
clib_pipeline_main_stage (STAGE1, ARG, 1); \
clib_pipeline_main_stage (STAGE2, ARG, 2); \
} \
\
{ \
clib_pipeline_exit_stage (STAGE1, ARG, 1); \
clib_pipeline_exit_stage (STAGE2, ARG, 2); \
} \
} while (0)
#define clib_pipeline_exit_loop
Definition: pipeline.h:85
#define clib_pipeline_init_stage(F, A, I)
Definition: pipeline.h:68
#define clib_pipeline_exit_stage(F, A, I)
Definition: pipeline.h:70
int i
#define clib_pipeline_main_stage(F, A, I)
Definition: pipeline.h:66
#define clib_pipeline_main_loop
Definition: pipeline.h:81
u64 uword
Definition: types.h:112
#define clib_pipeline_init_loop
Definition: pipeline.h:74

Definition at line 113 of file pipeline.h.

#define clib_pipeline_run_4_stage (   N,
  ARG,
  STAGE0,
  STAGE1,
  STAGE2,
  STAGE3 
)
Value:
do { \
uword _clib_pipeline_var(n_vectors) = (N); \
uword _clib_pipeline_var(n_stages) = 4; \
uword _clib_pipeline_var(i); \
\
{ \
clib_pipeline_init_stage (STAGE0, ARG, 0); \
clib_pipeline_init_stage (STAGE1, ARG, 1); \
clib_pipeline_init_stage (STAGE2, ARG, 2); \
} \
\
{ \
clib_pipeline_main_stage (STAGE0, ARG, 0); \
clib_pipeline_main_stage (STAGE1, ARG, 1); \
clib_pipeline_main_stage (STAGE2, ARG, 2); \
clib_pipeline_main_stage (STAGE3, ARG, 3); \
} \
\
{ \
clib_pipeline_exit_stage (STAGE1, ARG, 1); \
clib_pipeline_exit_stage (STAGE2, ARG, 2); \
clib_pipeline_exit_stage (STAGE3, ARG, 3); \
} \
} while (0)
#define clib_pipeline_exit_loop
Definition: pipeline.h:85
#define clib_pipeline_init_stage(F, A, I)
Definition: pipeline.h:68
#define clib_pipeline_exit_stage(F, A, I)
Definition: pipeline.h:70
int i
#define clib_pipeline_main_stage(F, A, I)
Definition: pipeline.h:66
#define clib_pipeline_main_loop
Definition: pipeline.h:81
u64 uword
Definition: types.h:112
#define clib_pipeline_init_loop
Definition: pipeline.h:74

Definition at line 139 of file pipeline.h.

#define clib_pipeline_stage (   F,
  TYPE,
  ARG,
  I,
  BODY 
)
Value:
always_inline void F##_inline (void * _, u32 I) \
{ TYPE ARG = _; { BODY; } } \
never_inline void F##_no_inline (TYPE ARG, u32 I) \
{ F##_inline (ARG, I); }
#define always_inline
Definition: clib.h:98
unsigned int u32
Definition: types.h:88
#define never_inline
Definition: clib.h:95
#define F(n, v, s)
Definition: cuckoo_common.h:38

Definition at line 43 of file pipeline.h.

#define clib_pipeline_stage_execute (   F,
  A,
  I,
  S 
)    F##_##S (A, _clib_pipeline_var(i) - (I))

Definition at line 63 of file pipeline.h.

#define clib_pipeline_stage_no_inline (   F,
  TYPE,
  ARG,
  I,
  BODY 
)
Value:
never_inline void F##_no_inline (void * _, u32 I) \
{ TYPE ARG = _; { BODY; } } \
never_inline void F##_inline (TYPE ARG, u32 I) \
{ F##_no_inline (ARG, I); }
unsigned int u32
Definition: types.h:88
#define never_inline
Definition: clib.h:95
#define F(n, v, s)
Definition: cuckoo_common.h:38

Definition at line 55 of file pipeline.h.

#define clib_pipeline_stage_static (   F,
  TYPE,
  ARG,
  I,
  BODY 
)
Value:
static_always_inline void F##_inline (void * _, u32 I) \
{ TYPE ARG = _; { BODY; } } \
never_inline void F##_no_inline (TYPE ARG, u32 I) \
{ F##_inline (ARG, I); }
#define static_always_inline
Definition: clib.h:99
unsigned int u32
Definition: types.h:88
#define never_inline
Definition: clib.h:95
#define F(n, v, s)
Definition: cuckoo_common.h:38

Definition at line 49 of file pipeline.h.