|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
38 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
46 #define foreach_qos_api_msg \
47 _(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) \
48 _(QOS_RECORD_DUMP, qos_record_dump) \
49 _(QOS_STORE_ENABLE_DISABLE, qos_store_enable_disable) \
50 _(QOS_STORE_DUMP, qos_store_dump) \
51 _(QOS_EGRESS_MAP_DELETE, qos_egress_map_delete) \
52 _(QOS_EGRESS_MAP_UPDATE, qos_egress_map_update) \
53 _(QOS_EGRESS_MAP_DUMP, qos_egress_map_dump) \
54 _(QOS_MARK_ENABLE_DISABLE, qos_mark_enable_disable) \
55 _(QOS_MARK_DUMP, qos_mark_dump)
76 return (VNET_API_ERROR_INVALID_VALUE);
79 static vl_api_qos_source_t
82 return ((vl_api_qos_source_t) q);
89 vl_api_qos_record_enable_disable_reply_t *rmp;
106 REPLY_MACRO (VL_API_QOS_RECORD_ENABLE_DISABLE_REPLY);
124 mp->_vl_msg_id =
ntohs (VL_API_QOS_RECORD_DETAILS);
154 vl_api_qos_store_enable_disable_reply_t *rmp;
172 REPLY_MACRO (VL_API_QOS_STORE_ENABLE_DISABLE_REPLY);
191 mp->_vl_msg_id =
ntohs (VL_API_QOS_STORE_DETAILS);
221 vl_api_qos_egress_map_update_reply_t *rmp;
228 &mp->
map.rows[qs].outputs[0]);
237 vl_api_qos_egress_map_delete_reply_t *rmp;
262 mp->_vl_msg_id =
ntohs (VL_API_QOS_EGRESS_MAP_DETAILS);
264 mp->
map.id = htonl (
id);
266 for (ii = 0; ii < 4; ii++)
294 vl_api_qos_mark_enable_disable_reply_t *rmp;
304 qs, ntohl (mp->
mark.map_id));
309 REPLY_MACRO (VL_API_QOS_MARK_ENABLE_DISABLE_REPLY);
328 mp->_vl_msg_id =
ntohs (VL_API_QOS_MARK_DETAILS);
355 #define vl_msg_name_crc_list
356 #include <vnet/qos/qos.api.h>
357 #undef vl_msg_name_crc_list
362 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
363 foreach_vl_msg_name_crc_qos;
373 vl_msg_api_set_handlers(VL_API_##N, #n, \
374 vl_api_##n##_t_handler, \
376 vl_api_##n##_t_endian, \
377 vl_api_##n##_t_print, \
378 sizeof(vl_api_##n##_t), 1);
Dump QoS marking configs.
@ QOS_SOURCE_EXT
Some external source, e.g.
static void vl_api_qos_mark_dump_t_handler(vl_api_qos_mark_dump_t *mp)
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
Details of QoS recording configs.
For a given output source a table maps each value of every input source.
#define clib_memcpy(d, s, n)
void qos_mark_walk(qos_mark_walk_cb_t fn, void *c)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
void vl_api_qos_egress_map_delete_t_handler(vl_api_qos_egress_map_delete_t *mp)
static clib_error_t * qos_api_hookup(vlib_main_t *vm)
#define foreach_qos_api_msg
int qos_record_enable(u32 sw_if_index, qos_source_t input_source)
vl_api_registration_t * reg
static walk_rc_t send_qos_egress_map_details(qos_egress_map_id_t id, const qos_egress_map_t *m, void *c)
static vl_api_qos_source_t qos_source_encode(qos_source_t q)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
bool enable[default=true]
qos_bits_t qem_output[QOS_N_SOURCES][256]
The array of output mapped values; output = eq_qos[input-source][input-value].
void vl_api_qos_mark_enable_disable_t_handler(vl_api_qos_mark_enable_disable_t *mp)
void * vl_msg_api_alloc_zero(int nbytes)
vl_api_qos_source_t output_source
bool enable[default=true]
static void vl_api_qos_egress_map_dump_t_handler(vl_api_qos_egress_map_dump_t *mp)
vl_api_qos_record_t record
Dump the QoS record configs.
bool enable[default=true]
static void vl_api_qos_store_dump_t_handler(vl_api_qos_store_dump_t *mp)
Dump the QoS egress maps.
Enable/Disable QoS storing The QoS bits from the packet at the specified input layer are copied into ...
void qos_store_walk(qos_store_walk_cb_t fn, void *c)
u8 qos_bits_t
Type, er, safety for us water based entities.
VLIB_API_INIT_FUNCTION(qos_api_hookup)
static walk_rc_t send_qos_store_details(u32 sw_if_index, qos_source_t input_source, qos_bits_t value, void *c)
An API client registration, only in vpp/vlib.
static walk_rc_t send_qos_mark_details(u32 sw_if_index, u32 map_id, qos_source_t output_source, void *c)
static void setup_message_id_table(api_main_t *am)
static api_main_t * vlibapi_get_main(void)
void qos_record_walk(qos_record_walk_cb_t fn, void *c)
struct qos_store_send_walk_ctx_t_ qos_store_send_walk_ctx_t
vl_api_qos_source_t input_source
Enable/Disable QoS recording The QoS bits from the packet at the specified input layer are copied int...
vl_api_qos_egress_map_t map
enum qos_source_t_ qos_source_t
QoS types.
static walk_rc_t send_qos_record_details(u32 sw_if_index, qos_source_t input_source, void *c)
#define BAD_SW_IF_INDEX_LABEL
struct qos_egress_map_send_walk_ctx_t_ qos_egress_map_send_walk_ctx_t
API main structure, used by both vpp and binary API clients.
struct qos_mark_send_walk_ctx_t_ qos_mark_send_walk_ctx_t
void qos_egress_map_walk(qos_egress_map_walk_cb_t fn, void *c)
Details of QoS recording configs.
vl_api_registration_t * reg
Enable/Disable QoS marking.
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.
vl_api_registration_t * reg
#define FOR_EACH_QOS_SOURCE(_src)
void qos_egress_map_delete(qos_egress_map_id_t mid)
Dump the QoS store configs.
Update a QoS Map A QoS map, translates from the QoS value in the packet set by the 'record' feature,...
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.
struct qos_record_send_walk_ctx_t_ qos_record_send_walk_ctx_t
vl_api_registration_t * reg
static int qos_source_decode(vl_api_qos_source_t v, qos_source_t *q)
int qos_mark_disable(u32 sw_if_index, qos_source_t output_source)
u32 qos_egress_map_id_t
A QOS egress map translates from the COS bits stored in the packet's meta-data into a per-protocol CO...
static void vl_api_qos_record_dump_t_handler(vl_api_qos_record_dump_t *mp)
void vl_api_qos_egress_map_update_t_handler(vl_api_qos_egress_map_update_t *mp)
int qos_record_disable(u32 sw_if_index, qos_source_t input_source)
vl_api_interface_index_t sw_if_index
vl_api_qos_egress_map_t map
vl_api_qos_record_t record
void vl_api_qos_store_enable_disable_t_handler(vl_api_qos_store_enable_disable_t *mp)
enum walk_rc_t_ walk_rc_t
Walk return code.
int qos_store_disable(u32 sw_if_index, qos_source_t input_source)
void vl_api_qos_record_enable_disable_t_handler(vl_api_qos_record_enable_disable_t *mp)
int qos_store_enable(u32 sw_if_index, qos_source_t input_source, qos_bits_t value)