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

Function parse_eventdev_queue_xstats_params

dpdk/app/proc-info/main.c:320–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320static int
321parse_eventdev_queue_xstats_params(const char *list)
322{
323 uint16_t queue_id;
324 uint16_t evdev_id;
325
326 if (sscanf(list, "*:%hu", &evdev_id) == 1) {
327 if (evdev_id >= rte_event_dev_count()) {
328 printf("Invalid eventdev id: %hu\n", evdev_id);
329 return -EINVAL;
330 }
331 eventdev_var[evdev_id].shw_all_queues = 1;
332 } else if (sscanf(list, "%hu:%hu", &queue_id, &evdev_id) == 2) {
333 if (evdev_id >= rte_event_dev_count()) {
334 printf("Invalid eventdev id: %hu\n", evdev_id);
335 return -EINVAL;
336 }
337
338 if (queue_id >= MAX_PORTS_QUEUES) {
339 printf("Invalid queue_id: %hu\n", queue_id);
340 return -EINVAL;
341 }
342
343 eventdev_var[evdev_id].queues[eventdev_var[evdev_id].num_queues] = queue_id;
344 eventdev_var[evdev_id].num_queues++;
345 } else {
346 return -EINVAL;
347 }
348
349 return 0;
350}
351
352static int
353parse_eventdev_port_xstats_params(const char *list)

Callers 1

proc_info_parse_argsFunction · 0.85

Calls 3

sscanfFunction · 0.85
rte_event_dev_countFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected