MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tmgr_pipe_config

Function tmgr_pipe_config

dpdk/examples/ip_pipeline/tmgr.c:210–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210int
211tmgr_pipe_config(const char *port_name,
212 uint32_t subport_id,
213 uint32_t pipe_id_first,
214 uint32_t pipe_id_last,
215 uint32_t pipe_profile_id)
216{
217 struct tmgr_port *port;
218 uint32_t i;
219
220 /* Check input params */
221 if (port_name == NULL)
222 return -1;
223
224 port = tmgr_port_find(port_name);
225 if ((port == NULL) ||
226 (subport_id >= port->n_subports_per_port) ||
227 (pipe_id_first >= port->n_pipes_per_subport) ||
228 (pipe_id_last >= port->n_pipes_per_subport) ||
229 (pipe_id_first > pipe_id_last) ||
230 (pipe_profile_id >= n_pipe_profiles))
231 return -1;
232
233 /* Resource config */
234 for (i = pipe_id_first; i <= pipe_id_last; i++) {
235 int status;
236
237 status = rte_sched_pipe_config(
238 port->s,
239 subport_id,
240 i,
241 (int) pipe_profile_id);
242
243 if (status)
244 return status;
245 }
246
247 return 0;
248}

Callers 1

cmd_tmgr_subport_pipeFunction · 0.85

Calls 2

tmgr_port_findFunction · 0.85
rte_sched_pipe_configFunction · 0.85

Tested by

no test coverage detected