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) 55 vl_api_qos_record_enable_disable_reply_t *rmp;
59 rv = VNET_API_ERROR_INVALID_VALUE;
68 REPLY_MACRO (VL_API_QOS_RECORD_ENABLE_DISABLE_REPLY);
74 vl_api_qos_egress_map_update_reply_t *rmp;
89 vl_api_qos_egress_map_delete_reply_t *rmp;
101 vl_api_qos_mark_enable_disable_reply_t *rmp;
105 rv = VNET_API_ERROR_INVALID_VALUE;
115 REPLY_MACRO (VL_API_QOS_MARK_ENABLE_DISABLE_REPLY);
118 #define vl_msg_name_crc_list 119 #include <vnet/qos/qos.api.h> 120 #undef vl_msg_name_crc_list 125 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 126 foreach_vl_msg_name_crc_qos;
136 vl_msg_api_set_handlers(VL_API_##N, #n, \ 137 vl_api_##n##_t_handler, \ 139 vl_api_##n##_t_endian, \ 140 vl_api_##n##_t_print, \ 141 sizeof(vl_api_##n##_t), 1);
vl_api_qos_egress_map_row_t rows[4]
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)
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 tyeps.
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)
#define QOS_N_SOURCES
The maximum number of sources.
void vl_api_qos_record_enable_disable_t_handler(vl_api_qos_record_enable_disable_t *mp)