55 u32 n_left_from, *from, *to_next, next_index;
61 while (n_left_from > 0)
67 while (n_left_from > 0 && n_left_to_next > 0)
95 ethertype = clib_net_to_host_u16 (*(
u16 *) (l3h - 2));
97 if (ethertype == ETHERNET_TYPE_IP4)
99 else if (ethertype == ETHERNET_TYPE_IP6)
101 else if (ethertype == ETHERNET_TYPE_MPLS)
136 b0->
flags |= VNET_BUFFER_F_QOS_DATA_VALID;
139 (b0->
flags & VLIB_BUFFER_IS_TRACED)))
152 L2INPUT_FEAT_L2_IP_QOS_RECORD);
159 to_next, n_left_to_next,
227 .name =
"ip4-qos-record",
228 .vector_size =
sizeof (
u32),
241 .arc_name =
"ip4-unicast",
242 .node_name =
"ip4-qos-record",
245 .arc_name =
"ip4-multicast",
246 .node_name =
"ip4-qos-record",
250 .name =
"ip6-qos-record",
251 .vector_size =
sizeof (
u32),
264 .arc_name =
"ip6-unicast",
265 .node_name =
"ip6-qos-record",
268 .arc_name =
"ip6-multicast",
269 .node_name =
"ip6-qos-record",
273 .name =
"mpls-qos-record",
274 .vector_size =
sizeof (
u32),
287 .arc_name =
"mpls-input",
288 .node_name =
"mpls-qos-record",
292 .name =
"vlan-mpls-qos-record",
293 .vector_size =
sizeof (
u32),
306 .arc_name =
"mpls-input",
307 .node_name =
"vlan-mpls-qos-record",
312 .name =
"vlan-ip4-qos-record",
313 .vector_size =
sizeof (
u32),
326 .arc_name =
"ip4-unicast",
327 .node_name =
"vlan-ip4-qos-record",
331 .arc_name =
"ip4-multicast",
332 .node_name =
"vlan-ip4-qos-record",
337 .name =
"vlan-ip6-qos-record",
338 .vector_size =
sizeof (
u32),
351 .arc_name =
"ip6-unicast",
352 .node_name =
"vlan-ip6-qos-record",
356 .arc_name =
"ip6-multicast",
357 .node_name =
"vlan-ip6-qos-record",
362 .name =
"l2-ip-qos-record",
363 .vector_size =
sizeof (
u32),
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
vlib_node_registration_t mpls_qos_record_node
(constructor) VLIB_REGISTER_NODE (mpls_qos_record_node)
vlib_node_registration_t l2_ip_qos_record_node
(constructor) VLIB_REGISTER_NODE (l2_ip_qos_record_node)
static u8 * format_qos_record_trace(u8 *s, va_list *args)
static uword qos_record_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, qos_source_t qos_src, dpo_proto_t dproto, int is_l2)
static_always_inline ip_dscp_t ip6_traffic_class_network_order(const ip6_header_t *ip6)
VNET_FEATURE_INIT(ip4_qos_record_node, static)
#define VLIB_NODE_FN(node)
vlib_node_registration_t ip6_qos_record_node
(constructor) VLIB_REGISTER_NODE (ip6_qos_record_node)
static u32 vnet_l2_feature_next(vlib_buffer_t *b, u32 *next_nodes, u32 feat_bit)
Return the graph node index for the feature corresponding to the next set bit after clearing the curr...
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
vl_api_fib_path_type_t type
vlib_node_registration_t vlan_ip6_qos_record_node
(constructor) VLIB_REGISTER_NODE (vlan_ip6_qos_record_node)
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).
#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.
u8 * qos_record_configs[QOS_N_SOURCES]
Per-interface, per-protocol vector of feature on/off configurations.
vlib_node_registration_t vlan_ip4_qos_record_node
(constructor) VLIB_REGISTER_NODE (vlan_ip4_qos_record_node)
struct qos_record_trace_t_ qos_record_trace_t
per-packet trace data
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
IPv6 to IPv4 translation.
#define VNET_FEATURES(...)
static 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_record_node
(constructor) VLIB_REGISTER_NODE (vlan_mpls_qos_record_node)
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 l2_qos_input_next[QOS_N_SOURCES][32]
u16 flags
Copy of main node flags.
static u32 vnet_mpls_uc_get_exp(mpls_label_t label_exp_s_ttl)
static u8 ethernet_vlan_header_get_priority_net_order(ethernet_vlan_header_t *h)
#define VLIB_NODE_FLAG_TRACE
vlib_node_registration_t ip4_qos_record_node
(constructor) VLIB_REGISTER_NODE (ip4_qos_record_node)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
u8 qos_bits_t
Type, er, safety for us water based entities.
#define QOS_N_SOURCES
The maximum number of sources.