|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
29 #include <sys/mount.h>
39 #include <dpdk/api/dpdk.api_enum.h>
40 #include <dpdk/api/dpdk.api_types.h>
48 vl_api_sw_interface_set_dpdk_hqos_pipe_reply_t *rmp;
67 rv = rte_sched_pipe_config (xd->hqos_ht->hqos, subport, pipe, profile);
71 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_PIPE_REPLY);
79 s =
format (0,
"SCRIPT: sw_interface_set_dpdk_hqos_pipe ");
83 s =
format (s,
"subport %u pipe %u profile %u ",
93 vl_api_sw_interface_set_dpdk_hqos_subport_reply_t *rmp;
98 struct rte_sched_subport_params p;
102 p.tb_rate = ntohl (mp->
tb_rate);
103 p.tb_size = ntohl (mp->
tb_size);
104 p.tc_rate[0] = ntohl (mp->
tc_rate[0]);
105 p.tc_rate[1] = ntohl (mp->
tc_rate[1]);
106 p.tc_rate[2] = ntohl (mp->
tc_rate[2]);
107 p.tc_rate[3] = ntohl (mp->
tc_rate[3]);
119 rv = rte_sched_subport_config (xd->hqos_ht->hqos, subport, &p);
123 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_SUBPORT_REPLY);
131 s =
format (0,
"SCRIPT: sw_interface_set_dpdk_hqos_subport ");
137 "subport %u rate %u bkt_size %u tc0 %u tc1 %u tc2 %u tc3 %u period %u",
150 vl_api_sw_interface_set_dpdk_hqos_tctbl_reply_t *rmp;
159 u32 tc = ntohl (mp->
tc);
172 if (tc >= RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE)
175 rv = VNET_API_ERROR_INVALID_VALUE;
178 if (queue >= RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS)
181 rv = VNET_API_ERROR_INVALID_VALUE;
191 rv = VNET_API_ERROR_INVALID_VALUE_2;
197 int worker_thread_count = tr->
count;
199 val = tc * RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS + queue;
200 for (
i = 0;
i < worker_thread_count;
i++)
201 xd->hqos_wt[worker_thread_first +
i].hqos_tc_table[entry] = val;
206 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_TCTBL_REPLY);
214 s =
format (0,
"SCRIPT: sw_interface_set_dpdk_hqos_tctbl ");
218 s =
format (s,
"entry %u tc %u queue %u",
224 #include <dpdk/api/dpdk.api.c>
#define VALIDATE_SW_IF_INDEX(mp)
DPDK interface HQoS pipe profile set request.
static void * vl_api_sw_interface_set_dpdk_hqos_pipe_t_print(vl_api_sw_interface_set_dpdk_hqos_pipe_t *mp, void *handle)
static clib_error_t * dpdk_api_init(vlib_main_t *vm)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void vl_api_sw_interface_set_dpdk_hqos_tctbl_t_handler(vl_api_sw_interface_set_dpdk_hqos_tctbl_t *mp)
static void setup_message_id_table(api_main_t *am)
DPDK interface HQoS subport parameters set request.
vl_api_interface_index_t sw_if_index
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static void * vl_api_sw_interface_set_dpdk_hqos_tctbl_t_print(vl_api_sw_interface_set_dpdk_hqos_tctbl_t *mp, void *handle)
uword * thread_registrations_by_name
sll srl srl sll sra u16x4 i
#define BAD_SW_IF_INDEX_LABEL
vl_api_interface_index_t sw_if_index
#define hash_get_mem(h, key)
description fragment has unexpected format
#define VLIB_INIT_FUNCTION(x)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
DPDK interface HQoS tctbl entry set request.
#define clib_warning(format, args...)
vl_api_interface_index_t sw_if_index
static vlib_thread_main_t * vlib_get_thread_main()
vl_api_interface_index_t sw_if_index
static void vl_api_sw_interface_set_dpdk_hqos_pipe_t_handler(vl_api_sw_interface_set_dpdk_hqos_pipe_t *mp)
static void vl_api_sw_interface_set_dpdk_hqos_subport_t_handler(vl_api_sw_interface_set_dpdk_hqos_subport_t *mp)
static void * vl_api_sw_interface_set_dpdk_hqos_subport_t_print(vl_api_sw_interface_set_dpdk_hqos_subport_t *mp, void *handle)