43 sw_if_index, enable, &value,
46 sw_if_index, enable, &value,
49 sw_if_index, enable, &value,
52 sw_if_index, enable, &value,
70 return VNET_API_ERROR_UNIMPLEMENTED;
72 vec_validate (qos_store_configs[input_source], sw_if_index);
92 if (
vec_len (qos_store_configs[input_source]) <= sw_if_index)
93 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
98 return VNET_API_ERROR_VALUE_EXIST;
180 else if (
unformat (input,
"enable"))
182 else if (
unformat (input,
"disable"))
184 else if (
unformat (input,
"value &d", &value))
190 if (~0 == sw_if_index)
217 .short_help =
"qos store <store-source> <INTERFACE> [disable]",
234 if (
vec_len (qos_store_configs[qs]) <= sw_if_index)
236 if (0 != (n_cfgs[qs] = qos_store_configs[qs][sw_if_index].
qst_n_cfgs))
250 qos_store_configs[qs][sw_if_index].
qst_value);
272 if (~0 == sw_if_index)
281 for (ii = 0; ii < n_ints; ii++)
300 .path =
"show qos store",
301 .short_help =
"show qos store [interface]",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
#define vec_foreach_index(var, v)
Iterate over vector indices.
vnet_main_t * vnet_get_main(void)
static void qos_store_show_one_interface(vlib_main_t *vm, u32 sw_if_index)
static void qst(qst_t *q, char *base, char *max)
unformat_function_t unformat_vnet_sw_interface
format_function_t format_vnet_sw_if_index_name
Some external source, e.g.
static void qos_store_feature_config(u32 sw_if_index, qos_source_t input_source, u8 enable, qos_bits_t value)
#define VLIB_INIT_FUNCTION(x)
static clib_error_t * qos_store_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
#define FOR_EACH_QOS_SOURCE(_src)
void qos_store_walk(qos_store_walk_cb_t fn, void *c)
vl_api_qos_source_t input_source
u8 * format_qos_source(u8 *s, va_list *args)
format/unformat QoS source types
clib_error_t * qos_store_init(vlib_main_t *vm)
walk_rc_t(* qos_store_walk_cb_t)(u32 sw_if_index, qos_source_t input_source, qos_bits_t value, void *ctx)
enum qos_source_t_ qos_source_t
QoS types.
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(qos_store_ip_interface_add_del)
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * qos_store_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * qos_store_ip_interface_add_del(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
int qos_store_disable(u32 sw_if_index, qos_source_t input_source)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
struct qos_store_t_ qos_store_t
QoS Store configuration.
int qos_store_enable(u32 sw_if_index, qos_source_t input_source, qos_bits_t value)
uword unformat_qos_source(unformat_input_t *input, va_list *args)
u8 qos_bits_t
Type, er, safety for us water based entities.
vl_api_interface_index_t sw_if_index
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.