FD.io VPP  v19.01.3-6-g70449b9b9
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_mpls_qos_mark (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword vlan_ip4_qos_mark (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword vlan_ip6_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_ip4_qos_mark_node, vlan_ip4_qos_mark)
 
 VNET_FEATURE_INIT (vlan_ip4_qos_mark_node, static)
 
 VLIB_NODE_FUNCTION_MULTIARCH (vlan_ip6_qos_mark_node, vlan_ip6_qos_mark)
 
 VNET_FEATURE_INIT (vlan_ip6_qos_mark_node, static)
 
 VLIB_NODE_FUNCTION_MULTIARCH (vlan_mpls_qos_mark_node, vlan_mpls_qos_mark)
 
 VNET_FEATURE_INIT (vlan_mpls_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_ip4_qos_mark_node
 (constructor) VLIB_REGISTER_NODE (vlan_ip4_qos_mark_node) More...
 
vlib_node_registration_t vlan_ip6_qos_mark_node
 (constructor) VLIB_REGISTER_NODE (vlan_ip6_qos_mark_node) More...
 
vlib_node_registration_t vlan_mpls_qos_mark_node
 (constructor) VLIB_REGISTER_NODE (vlan_mpls_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

◆ qos_mark_trace_t

per-packet trace data

Function Documentation

◆ format_qos_mark_trace()

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

Definition at line 216 of file qos_mark.c.

+ Here is the call graph for this function:

◆ ip4_qos_mark()

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

Definition at line 229 of file qos_mark.c.

+ Here is the call graph for this function:

◆ ip6_qos_mark()

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

Definition at line 236 of file qos_mark.c.

+ Here is the call graph for this function:

◆ mpls_qos_mark()

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

Definition at line 243 of file qos_mark.c.

+ Here is the call graph for this function:

◆ qos_egress_map_feature_config()

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

Definition at line 59 of file qos_mark.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qos_egress_map_interface()

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

Definition at line 79 of file qos_mark.c.

+ Here is the caller graph for this function:

◆ qos_mark_cli()

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

Definition at line 450 of file qos_mark.c.

+ Here is the call graph for this function:

◆ qos_mark_disable()

int qos_mark_disable ( u32  sw_if_index,
qos_source_t  output_source 
)

Definition at line 432 of file qos_mark.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qos_mark_enable()

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 408 of file qos_mark.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qos_mark_inline()

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 99 of file qos_mark.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qos_mark_ip_enable_disable()

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:

◆ qos_mark_mpls_enable_disable()

void qos_mark_mpls_enable_disable ( u32  sw_if_index,
u8  enable 
)

Definition at line 52 of file qos_mark.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qos_mark_vlan_enable_disable()

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:

◆ vlan_ip4_qos_mark()

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

Definition at line 257 of file qos_mark.c.

+ Here is the call graph for this function:

◆ vlan_ip6_qos_mark()

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

Definition at line 264 of file qos_mark.c.

+ Here is the call graph for this function:

◆ vlan_mpls_qos_mark()

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

Definition at line 250 of file qos_mark.c.

+ Here is the call graph for this function:

◆ VLIB_NODE_FUNCTION_MULTIARCH() [1/6]

VLIB_NODE_FUNCTION_MULTIARCH ( ip4_qos_mark_node  ,
ip4_qos_mark   
)

◆ VLIB_NODE_FUNCTION_MULTIARCH() [2/6]

VLIB_NODE_FUNCTION_MULTIARCH ( ip6_qos_mark_node  ,
ip6_qos_mark   
)

◆ VLIB_NODE_FUNCTION_MULTIARCH() [3/6]

VLIB_NODE_FUNCTION_MULTIARCH ( mpls_qos_mark_node  ,
mpls_qos_mark   
)

◆ VLIB_NODE_FUNCTION_MULTIARCH() [4/6]

VLIB_NODE_FUNCTION_MULTIARCH ( vlan_ip4_qos_mark_node  ,
vlan_ip4_qos_mark   
)

◆ VLIB_NODE_FUNCTION_MULTIARCH() [5/6]

VLIB_NODE_FUNCTION_MULTIARCH ( vlan_ip6_qos_mark_node  ,
vlan_ip6_qos_mark   
)

◆ VLIB_NODE_FUNCTION_MULTIARCH() [6/6]

VLIB_NODE_FUNCTION_MULTIARCH ( vlan_mpls_qos_mark_node  ,
vlan_mpls_qos_mark   
)

◆ VNET_FEATURE_INIT() [1/6]

VNET_FEATURE_INIT ( ip4_qos_mark_node  ,
static   
)

◆ VNET_FEATURE_INIT() [2/6]

VNET_FEATURE_INIT ( ip6_qos_mark_node  ,
static   
)

◆ VNET_FEATURE_INIT() [3/6]

VNET_FEATURE_INIT ( mpls_qos_mark_node  ,
static   
)

◆ VNET_FEATURE_INIT() [4/6]

VNET_FEATURE_INIT ( vlan_ip4_qos_mark_node  ,
static   
)

◆ VNET_FEATURE_INIT() [5/6]

VNET_FEATURE_INIT ( vlan_ip6_qos_mark_node  ,
static   
)

◆ VNET_FEATURE_INIT() [6/6]

VNET_FEATURE_INIT ( vlan_mpls_qos_mark_node  ,
static   
)

Variable Documentation

◆ ip4_qos_mark_node

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:216
static uword ip4_qos_mark(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: qos_mark.c:229

(constructor) VLIB_REGISTER_NODE (ip4_qos_mark_node)

Definition at line 271 of file qos_mark.c.

◆ ip6_qos_mark_node

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:236
unsigned int u32
Definition: types.h:88
static u8 * format_qos_mark_trace(u8 *s, va_list *args)
Definition: qos_mark.c:216

(constructor) VLIB_REGISTER_NODE (ip6_qos_mark_node)

Definition at line 293 of file qos_mark.c.

◆ mpls_qos_mark_node

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:216
static uword mpls_qos_mark(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: qos_mark.c:243

(constructor) VLIB_REGISTER_NODE (mpls_qos_mark_node)

Definition at line 315 of file qos_mark.c.

◆ qos_egress_map_interface_command

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:450

(constructor) VLIB_CLI_COMMAND (qos_egress_map_interface_command)

Definition at line 502 of file qos_mark.c.

◆ qos_mark_configs

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.

◆ vlan_ip4_qos_mark_node

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

(constructor) VLIB_REGISTER_NODE (vlan_ip4_qos_mark_node)

Definition at line 337 of file qos_mark.c.

◆ vlan_ip6_qos_mark_node

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

(constructor) VLIB_REGISTER_NODE (vlan_ip6_qos_mark_node)

Definition at line 360 of file qos_mark.c.

◆ vlan_mpls_qos_mark_node

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

(constructor) VLIB_REGISTER_NODE (vlan_mpls_qos_mark_node)

Definition at line 383 of file qos_mark.c.