FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
qos_mark.c File Reference
+ Include dependency graph for qos_mark.c:

Go to the source code of this file.

Data Structures

struct  qos_mark_trace_t_
 per-packet trace data More...
 

Typedefs

typedef struct qos_mark_trace_t_ qos_mark_trace_t
 per-packet trace data More...
 

Functions

void qos_mark_ip_enable_disable (u32 sw_if_index, u8 enable)
 
void qos_mark_vlan_enable_disable (u32 sw_if_index, u8 enable)
 
void qos_mark_mpls_enable_disable (u32 sw_if_index, u8 enable)
 
static void qos_egress_map_feature_config (u32 sw_if_index, qos_source_t qs, u8 enable)
 
static qos_egress_map_tqos_egress_map_interface (u32 sw_if_index, qos_source_t output_source)
 
static uword qos_mark_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, qos_source_t output_source, int is_ip6)
 
static u8format_qos_mark_trace (u8 *s, va_list *args)
 
static uword ip4_qos_mark (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip6_qos_mark (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword mpls_qos_mark (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword vlan_qos_mark (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip4_qos_mark_node, ip4_qos_mark)
 
 VNET_FEATURE_INIT (ip4_qos_mark_node, static)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip6_qos_mark_node, ip6_qos_mark)
 
 VNET_FEATURE_INIT (ip6_qos_mark_node, static)
 
 VLIB_NODE_FUNCTION_MULTIARCH (mpls_qos_mark_node, mpls_qos_mark)
 
 VNET_FEATURE_INIT (mpls_qos_mark_node, static)
 
 VLIB_NODE_FUNCTION_MULTIARCH (vlan_qos_mark_node, vlan_qos_mark)
 
 VNET_FEATURE_INIT (vlan_qos_mark_node, static)
 
int qos_mark_enable (u32 sw_if_index, qos_source_t output_source, qos_egress_map_id_t mid)
 enable QoS marking by associating a MAP with an interface. More...
 
int qos_mark_disable (u32 sw_if_index, qos_source_t output_source)
 
static clib_error_tqos_mark_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

index_tqos_mark_configs [QOS_N_SOURCES]
 per-interface vector of which MAP is used by which interface for each output source More...
 
vlib_node_registration_t ip4_qos_mark_node
 (constructor) VLIB_REGISTER_NODE (ip4_qos_mark_node) More...
 
vlib_node_registration_t ip6_qos_mark_node
 (constructor) VLIB_REGISTER_NODE (ip6_qos_mark_node) More...
 
vlib_node_registration_t mpls_qos_mark_node
 (constructor) VLIB_REGISTER_NODE (mpls_qos_mark_node) More...
 
vlib_node_registration_t vlan_qos_mark_node
 (constructor) VLIB_REGISTER_NODE (vlan_qos_mark_node) More...
 
static vlib_cli_command_t qos_egress_map_interface_command
 (constructor) VLIB_CLI_COMMAND (qos_egress_map_interface_command) More...
 

Typedef Documentation

per-packet trace data

Function Documentation

static u8* format_qos_mark_trace ( u8 s,
va_list *  args 
)
static

Definition at line 208 of file qos_mark.c.

+ Here is the call graph for this function:

static uword ip4_qos_mark ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 221 of file qos_mark.c.

+ Here is the call graph for this function:

static uword ip6_qos_mark ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 228 of file qos_mark.c.

+ Here is the call graph for this function:

static uword mpls_qos_mark ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 235 of file qos_mark.c.

+ Here is the call graph for this function:

static void qos_egress_map_feature_config ( u32  sw_if_index,
qos_source_t  qs,
u8  enable 
)
static

Definition at line 51 of file qos_mark.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static qos_egress_map_t* qos_egress_map_interface ( u32  sw_if_index,
qos_source_t  output_source 
)
inlinestatic

Definition at line 71 of file qos_mark.c.

+ Here is the caller graph for this function:

static clib_error_t* qos_mark_cli ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 380 of file qos_mark.c.

+ Here is the call graph for this function:

int qos_mark_disable ( u32  sw_if_index,
qos_source_t  output_source 
)

Definition at line 362 of file qos_mark.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int qos_mark_enable ( u32  sw_if_index,
qos_source_t  output_source,
qos_egress_map_id_t  tid 
)

enable QoS marking by associating a MAP with an interface.

The output_source specifies which protocol/header the QoS value will be written into

Definition at line 338 of file qos_mark.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword qos_mark_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
qos_source_t  output_source,
int  is_ip6 
)
inlinestatic

Definition at line 91 of file qos_mark.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void qos_mark_ip_enable_disable ( u32  sw_if_index,
u8  enable 
)

Definition at line 28 of file qos_mark.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void qos_mark_mpls_enable_disable ( u32  sw_if_index,
u8  enable 
)

Definition at line 44 of file qos_mark.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void qos_mark_vlan_enable_disable ( u32  sw_if_index,
u8  enable 
)

Definition at line 37 of file qos_mark.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vlan_qos_mark ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 242 of file qos_mark.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ip4_qos_mark_node  ,
ip4_qos_mark   
)
VLIB_NODE_FUNCTION_MULTIARCH ( ip6_qos_mark_node  ,
ip6_qos_mark   
)
VLIB_NODE_FUNCTION_MULTIARCH ( mpls_qos_mark_node  ,
mpls_qos_mark   
)
VLIB_NODE_FUNCTION_MULTIARCH ( vlan_qos_mark_node  ,
vlan_qos_mark   
)
VNET_FEATURE_INIT ( ip4_qos_mark_node  ,
static   
)
VNET_FEATURE_INIT ( ip6_qos_mark_node  ,
static   
)
VNET_FEATURE_INIT ( mpls_qos_mark_node  ,
static   
)
VNET_FEATURE_INIT ( vlan_qos_mark_node  ,
static   
)

Variable Documentation

vlib_node_registration_t ip4_qos_mark_node
Initial value:
= {
.function = ip4_qos_mark,
.name = "ip4-qos-mark",
.vector_size = sizeof (u32),
.format_trace = format_qos_mark_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip4-drop",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_qos_mark_trace(u8 *s, va_list *args)
Definition: qos_mark.c:208
static uword ip4_qos_mark(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: qos_mark.c:221

(constructor) VLIB_REGISTER_NODE (ip4_qos_mark_node)

Definition at line 249 of file qos_mark.c.

vlib_node_registration_t ip6_qos_mark_node
Initial value:
= {
.function = ip6_qos_mark,
.name = "ip6-qos-mark",
.vector_size = sizeof (u32),
.format_trace = format_qos_mark_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip6-drop",
},
}
static uword ip6_qos_mark(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: qos_mark.c:228
unsigned int u32
Definition: types.h:88
static u8 * format_qos_mark_trace(u8 *s, va_list *args)
Definition: qos_mark.c:208

(constructor) VLIB_REGISTER_NODE (ip6_qos_mark_node)

Definition at line 271 of file qos_mark.c.

vlib_node_registration_t mpls_qos_mark_node
Initial value:
= {
.function = mpls_qos_mark,
.name = "mpls-qos-mark",
.vector_size = sizeof (u32),
.format_trace = format_qos_mark_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[0] = "mpls-drop",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_qos_mark_trace(u8 *s, va_list *args)
Definition: qos_mark.c:208
static uword mpls_qos_mark(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: qos_mark.c:235

(constructor) VLIB_REGISTER_NODE (mpls_qos_mark_node)

Definition at line 293 of file qos_mark.c.

vlib_cli_command_t qos_egress_map_interface_command
static
Initial value:
= {
.path = "qos mark",
.short_help = "qos mark <SOURCE> <INTERFACE> id <MAP>",
.function = qos_mark_cli,
.is_mp_safe = 1,
}
static clib_error_t * qos_mark_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: qos_mark.c:380

(constructor) VLIB_CLI_COMMAND (qos_egress_map_interface_command)

Definition at line 432 of file qos_mark.c.

index_t* qos_mark_configs[QOS_N_SOURCES]

per-interface vector of which MAP is used by which interface for each output source

Definition at line 25 of file qos_mark.c.

vlib_node_registration_t vlan_qos_mark_node
Initial value:
= {
.function = vlan_qos_mark,
.name = "vlan-qos-mark",
.vector_size = sizeof (u32),
.format_trace = format_qos_mark_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
static uword vlan_qos_mark(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: qos_mark.c:242
unsigned int u32
Definition: types.h:88
static u8 * format_qos_mark_trace(u8 *s, va_list *args)
Definition: qos_mark.c:208

(constructor) VLIB_REGISTER_NODE (vlan_qos_mark_node)

Definition at line 314 of file qos_mark.c.