37 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 45 #define foreach_qos_api_msg \ 46 _(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) \ 47 _(QOS_EGRESS_MAP_DELETE, qos_egress_map_delete) \ 48 _(QOS_EGRESS_MAP_UPDATE, qos_egress_map_update) \ 49 _(QOS_MARK_ENABLE_DISABLE, qos_mark_enable_disable) 72 return (VNET_API_ERROR_INVALID_VALUE);
79 vl_api_qos_record_enable_disable_reply_t *rmp;
93 REPLY_MACRO (VL_API_QOS_RECORD_ENABLE_DISABLE_REPLY);
99 vl_api_qos_egress_map_update_reply_t *rmp;
114 vl_api_qos_egress_map_delete_reply_t *rmp;
126 vl_api_qos_mark_enable_disable_reply_t *rmp;
141 REPLY_MACRO (VL_API_QOS_MARK_ENABLE_DISABLE_REPLY);
144 #define vl_msg_name_crc_list 145 #include <vnet/qos/qos.api.h> 146 #undef vl_msg_name_crc_list 151 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 152 foreach_vl_msg_name_crc_qos;
162 vl_msg_api_set_handlers(VL_API_##N, #n, \ 163 vl_api_##n##_t_handler, \ 165 vl_api_##n##_t_endian, \ 166 vl_api_##n##_t_print, \ 167 sizeof(vl_api_##n##_t), 1);
static int qos_source_decode(vl_api_qos_source_t v, qos_source_t *q)
vl_api_qos_egress_map_row_t rows[4]
vl_api_qos_source_t output_source
static clib_error_t * qos_api_hookup(vlib_main_t *vm)
void vl_api_qos_egress_map_update_t_handler(vl_api_qos_egress_map_update_t *mp)
void vl_api_qos_egress_map_delete_t_handler(vl_api_qos_egress_map_delete_t *mp)
void qos_egress_map_delete(qos_egress_map_id_t mid)
int qos_mark_disable(u32 sw_if_index, qos_source_t output_source)
static void setup_message_id_table(api_main_t *am)
Some external source, e.g.
VLIB_API_INIT_FUNCTION(qos_api_hookup)
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.
#define FOR_EACH_QOS_SOURCE(_src)
#define foreach_qos_api_msg
void qos_egress_map_update(qos_egress_map_id_t mid, qos_source_t input_source, qos_bits_t *values)
Add a qos-egress map to an interface.
Enable/Disable QoS recording The QoS bits from the packet at the specified input layer are copied int...
API main structure, used by both vpp and binary API clients.
enum qos_source_t_ qos_source_t
QoS types.
int qos_record_disable(u32 sw_if_index, qos_source_t input_source)
Enable/Disable QoS marking The QoS bits from the packet are mapped (using the desired egress map) int...
void vl_api_qos_mark_enable_disable_t_handler(vl_api_qos_mark_enable_disable_t *mp)
Update a QoS Map A QoS map, translates from the QoS value in the packet set by the 'record' feature...
int qos_record_enable(u32 sw_if_index, qos_source_t input_source)
vl_api_qos_source_t input_source
void vl_api_qos_record_enable_disable_t_handler(vl_api_qos_record_enable_disable_t *mp)