48 u32 n_left_from, *from, *to_next, next_index;
54 while (n_left_from > 0)
60 while (n_left_from > 0 && n_left_to_next > 0)
64 u32 sw_if_index0, next0, bi0;
120 mpls_bytes_0[2] &= 0xf1;
122 mpls_bytes_0[2] |= (qos0 & 0x7) << 1;
123 eos0 = mpls_bytes_0[2] & 0x1;
143 t->
input = input_source0;
144 t->
used = (b0->
flags & VNET_BUFFER_F_QOS_DATA_VALID);
149 to_next, n_left_to_next,
167 s =
format (s,
"source:%U qos:%d used:%s",
217 .name =
"ip4-qos-mark",
218 .vector_size =
sizeof (
u32),
231 .arc_name =
"ip4-output",
232 .node_name =
"ip4-qos-mark",
236 .name =
"ip6-qos-mark",
237 .vector_size =
sizeof (
u32),
250 .arc_name =
"ip6-output",
251 .node_name =
"ip6-qos-mark",
255 .name =
"mpls-qos-mark",
256 .vector_size =
sizeof (
u32),
269 .arc_name =
"mpls-output",
270 .node_name =
"mpls-qos-mark",
274 .name =
"vlan-ip4-qos-mark",
275 .vector_size =
sizeof (
u32),
288 .arc_name =
"ip4-output",
289 .node_name =
"vlan-ip4-qos-mark",
294 .name =
"vlan-ip6-qos-mark",
295 .vector_size =
sizeof (
u32),
308 .arc_name =
"ip6-output",
309 .node_name =
"vlan-ip6-qos-mark",
314 .name =
"vlan-mpls-qos-mark",
315 .vector_size =
sizeof (
u32),
328 .arc_name =
"mpls-output",
329 .node_name =
"vlan-mpls-qos-mark",
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
qos_egress_map_t * qem_pool
Pool from which to allocate table.
vl_api_qos_source_t output_source
static_always_inline void ip6_set_traffic_class_network_order(ip6_header_t *ip6, ip_dscp_t dscp)
static u8 * format_qos_mark_trace(u8 *s, va_list *args)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define VLIB_NODE_FN(node)
vlib_node_registration_t vlan_ip6_qos_mark_node
(constructor) VLIB_REGISTER_NODE (vlan_ip6_qos_mark_node)
VNET_FEATURE_INIT(ip4_qos_mark_node, static)
struct qos_mark_trace_t_ qos_mark_trace_t
per-packet trace data
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)
u8 * format_qos_source(u8 *s, va_list *args)
format/unformat QoS source types
vl_api_fib_path_type_t type
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void ethernet_vlan_header_set_priority_net_order(ethernet_vlan_header_t *h, u8 prio)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
index_t * qos_mark_configs[QOS_N_SOURCES]
per-interface vector of which MAP is used by which interface for each output source ...
vlib_node_registration_t ip4_qos_mark_node
(constructor) VLIB_REGISTER_NODE (ip4_qos_mark_node)
vlib_node_registration_t ip6_qos_mark_node
(constructor) VLIB_REGISTER_NODE (ip6_qos_mark_node)
#define VLIB_REGISTER_NODE(x,...)
enum qos_source_t_ qos_source_t
QoS types.
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
vlib_main_t vlib_node_runtime_t * node
For a given output source a table maps each value of every input source.
#define VNET_FEATURES(...)
static qos_egress_map_t * qos_egress_map_interface(u32 sw_if_index, qos_source_t output_source)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
vlib_node_registration_t vlan_ip4_qos_mark_node
(constructor) VLIB_REGISTER_NODE (vlan_ip4_qos_mark_node)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
vlib_node_registration_t vlan_mpls_qos_mark_node
(constructor) VLIB_REGISTER_NODE (vlan_mpls_qos_mark_node)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static u16 ip4_header_checksum(ip4_header_t *i)
qos_bits_t qem_output[QOS_N_SOURCES][256]
The array of output mapped values; output = eq_qos[input-source][input-value].
u8 qos_bits_t
Type, er, safety for us water based entities.
vl_api_interface_index_t sw_if_index
#define QOS_N_SOURCES
The maximum number of sources.
vlib_node_registration_t mpls_qos_mark_node
(constructor) VLIB_REGISTER_NODE (mpls_qos_mark_node)