35 sw_if_index, enable,
NULL, 0);
37 sw_if_index, enable,
NULL, 0);
39 sw_if_index, enable,
NULL, 0);
41 sw_if_index, enable,
NULL, 0);
69 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
72 return VNET_API_ERROR_VALUE_EXIST;
90 u32 sw_if_index,
u32 is_add)
121 u32 n_left_from, *from, *to_next, next_index;
127 while (n_left_from > 0)
133 while (n_left_from > 0 && n_left_to_next > 0)
138 u32 sw_if_index0, next0, bi0;
162 b0->
flags |= VNET_BUFFER_F_QOS_DATA_VALID;
168 (b0->
flags & VLIB_BUFFER_IS_TRACED)))
177 to_next, n_left_to_next,
217 .name =
"ip4-qos-record",
218 .vector_size =
sizeof (
u32),
233 .arc_name =
"ip4-unicast",
234 .node_name =
"ip4-qos-record",
239 .name =
"ip6-qos-record",
240 .vector_size =
sizeof (
u32),
255 .arc_name =
"ip6-unicast",
256 .node_name =
"ip6-qos-record",
280 else if (
unformat (input,
"enable"))
282 else if (
unformat (input,
"disable"))
288 if (~0 == sw_if_index)
312 .path =
"qos record",
313 .short_help =
"qos record <record-source> <INTERFACE> [disable]",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
vlib_node_registration_t ip6_qos_record_node
(constructor) VLIB_REGISTER_NODE (ip6_qos_record_node)
static uword ip4_qos_record(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
vnet_main_t * vnet_get_main(void)
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(qos_record_ip_interface_add_del)
static u8 * qos_record_configs[QOS_N_SOURCES]
Per-interface, per-protocol vector of feature on/off configurations.
unformat_function_t unformat_vnet_sw_interface
Some external source, e.g.
static clib_error_t * qos_record_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static uword qos_record_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip6)
static_always_inline u8 ip6_traffic_class_network_order(const ip6_header_t *ip6)
#define clib_error_return(e, args...)
#define FOR_EACH_QOS_SOURCE(_src)
struct qos_record_trace_t_ qos_record_trace_t
per-packet trace data
static clib_error_t * qos_record_ip_interface_add_del(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
VLIB_NODE_FUNCTION_MULTIARCH(ip4_qos_record_node, ip4_qos_record)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static void qos_record_feature_config(u32 sw_if_index, qos_source_t input_source, u8 enable)
static_always_inline void vnet_feature_next(u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
#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 tyeps.
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.
#define VLIB_CLI_COMMAND(x,...)
int qos_record_disable(u32 sw_if_index, qos_source_t input_source)
static u8 * format_qos_record_trace(u8 *s, va_list *args)
static uword ip6_qos_record(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
IPv6 to IPv4 translation.
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
int qos_record_enable(u32 sw_if_index, qos_source_t input_source)
u16 flags
Copy of main node flags.
#define VLIB_NODE_FLAG_TRACE
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 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.
uword unformat_qos_source(unformat_input_t *input, va_list *args)
u8 qos_bits_t
Type, er, safety for us water based entities.
VNET_FEATURE_INIT(ip4_qos_record_node, static)
int 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)
#define QOS_N_SOURCES
The maximum number of sources.