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>