FD.io VPP  v16.12-rc0-308-g931be3a
Vector Packet Processing
feature.h File Reference
+ Include dependency graph for feature.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vnet_feature_config_main_t_
 
struct  vnet_feature_main_t
 

Macros

#define VNET_FEATURE_ARC_INIT(x, ...)
 
#define VNET_FEATURE_INIT(x, ...)
 
#define ORDER_CONSTRAINTS   (char*[])
 
#define VNET_FEATURES(...)   (char*[]) { __VA_ARGS__, 0}
 

Typedefs

typedef struct _vnet_feature_arc_registration vnet_feature_arc_registration_t
 feature registration object More...
 
typedef struct _vnet_feature_registration vnet_feature_registration_t
 feature registration object More...
 
typedef struct vnet_feature_config_main_t_ vnet_feature_config_main_t
 

Functions

void vnet_config_update_feature_count (vnet_feature_main_t *fm, u16 arc, u32 sw_if_index, int is_add)
 
u32 vnet_feature_index_from_node_name (u16 type, const char *s)
 
void vnet_feature_enable_disable (const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
 
static_always_inline int vnet_have_features (u32 arc, u32 sw_if_index)
 
static_always_inline u32 vnet_feature_get_config_index (u16 arc, u32 sw_if_index)
 
static_always_inline void vnet_feature_redirect (u16 arc, u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
 
static_always_inline void vnet_feature_device_input_redirect_x1 (vlib_node_runtime_t *node, u32 sw_if_index, u32 *next0, vlib_buffer_t *b0, u16 buffer_advanced0)
 
clib_error_tvnet_feature_arc_init (vlib_main_t *vm, vnet_config_main_t *vcm, char **feature_start_nodes, int num_feature_start_nodes, vnet_feature_registration_t *first_reg, char ***feature_nodes)
 Initialize a feature graph arc. More...
 
void vnet_interface_features_show (vlib_main_t *vm, u32 sw_if_index)
 Display the set of driver features configured on a specific interface Called by "show interface" handler. More...
 

Variables

vnet_feature_main_t feature_main
 

Macro Definition Documentation

#define ORDER_CONSTRAINTS   (char*[])

Definition at line 188 of file feature.h.

#define VNET_FEATURE_ARC_INIT (   x,
  ... 
)
Value:
__VA_ARGS__ vnet_feature_arc_registration_t vnet_feat_arc_##x;\
static void __vnet_add_feature_arc_registration_##x (void) \
__attribute__((__constructor__)) ; \
static void __vnet_add_feature_arc_registration_##x (void) \
{ \
vnet_feature_main_t * fm = &feature_main; \
vnet_feat_arc_##x.next = fm->next_arc; \
fm->next_arc = & vnet_feat_arc_##x; \
} \
__VA_ARGS__ vnet_feature_arc_registration_t vnet_feat_arc_##x
vnet_feature_main_t feature_main
Definition: feature.c:18
struct _vnet_feature_arc_registration vnet_feature_arc_registration_t
feature registration object
vnet_feature_arc_registration_t * next_arc
feature arc configuration list
Definition: feature.h:62

Definition at line 89 of file feature.h.

#define VNET_FEATURE_INIT (   x,
  ... 
)
Value:
__VA_ARGS__ vnet_feature_registration_t vnet_feat_##x; \
static void __vnet_add_feature_registration_##x (void) \
__attribute__((__constructor__)) ; \
static void __vnet_add_feature_registration_##x (void) \
{ \
vnet_feature_main_t * fm = &feature_main; \
vnet_feat_##x.next = fm->next_feature; \
fm->next_feature = & vnet_feat_##x; \
} \
__VA_ARGS__ vnet_feature_registration_t vnet_feat_##x
vnet_feature_registration_t * next_feature
feature path configuration lists
Definition: feature.h:66
vnet_feature_main_t feature_main
Definition: feature.c:18
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object

Definition at line 101 of file feature.h.

#define VNET_FEATURES (   ...)    (char*[]) { __VA_ARGS__, 0}

Definition at line 189 of file feature.h.

Typedef Documentation

typedef struct _vnet_feature_arc_registration vnet_feature_arc_registration_t

feature registration object

typedef struct _vnet_feature_registration vnet_feature_registration_t

feature registration object

Function Documentation

void vnet_config_update_feature_count ( vnet_feature_main_t fm,
u16  arc,
u32  sw_if_index,
int  is_add 
)

Definition at line 136 of file feature.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_feature_arc_init ( vlib_main_t vm,
vnet_config_main_t vcm,
char **  feature_start_nodes,
int  num_feature_start_nodes,
vnet_feature_registration_t first_reg,
char ***  in_feature_nodes 
)

Initialize a feature graph arc.

Parameters
vmvlib main structure pointer
vcmvnet config main structure pointer
feature_start_nodesnames of start-nodes which use this feature graph arc
num_feature_start_nodesnumber of start-nodes
first_regfirst element in [an attribute((constructor)) function built, or otherwise created] singly-linked list of feature registrations
[out]in_feature_nodesreturned vector of topologically-sorted feature node names, for use in show commands
Returns
0 on success, otherwise an error message. Errors are fatal since they invariably involve mistyped node-names, or genuinely missing node-names

Definition at line 127 of file registration.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void vnet_feature_device_input_redirect_x1 ( vlib_node_runtime_t node,
u32  sw_if_index,
u32 next0,
vlib_buffer_t b0,
u16  buffer_advanced0 
)

Definition at line 158 of file feature.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_feature_enable_disable ( const char *  arc_name,
const char *  node_name,
u32  sw_if_index,
int  enable_disable,
void *  feature_config,
u32  n_feature_config_bytes 
)

Definition at line 185 of file feature.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline u32 vnet_feature_get_config_index ( u16  arc,
u32  sw_if_index 
)

Definition at line 134 of file feature.h.

u32 vnet_feature_index_from_node_name ( u16  type,
const char *  s 
)

Definition at line 170 of file feature.c.

+ Here is the caller graph for this function:

static_always_inline void vnet_feature_redirect ( u16  arc,
u32  sw_if_index,
u32 next0,
vlib_buffer_t b0 
)

Definition at line 142 of file feature.h.

+ Here is the call graph for this function:

static_always_inline int vnet_have_features ( u32  arc,
u32  sw_if_index 
)

Definition at line 127 of file feature.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_interface_features_show ( vlib_main_t vm,
u32  sw_if_index 
)

Display the set of driver features configured on a specific interface Called by "show interface" handler.

Definition at line 272 of file feature.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vnet_feature_main_t feature_main

Definition at line 18 of file feature.c.