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

Function handle_queue_links

dpdk/lib/eventdev/rte_eventdev.c:1781–1823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1779}
1780
1781static int
1782handle_queue_links(const char *cmd __rte_unused,
1783 const char *params,
1784 struct rte_tel_data *d)
1785{
1786 int i, ret, port_id = 0;
1787 char *end_param;
1788 uint8_t dev_id;
1789 uint8_t queues[RTE_EVENT_MAX_QUEUES_PER_DEV];
1790 uint8_t priorities[RTE_EVENT_MAX_QUEUES_PER_DEV];
1791 const char *p_param;
1792
1793 if (params == NULL || strlen(params) == 0 || !isdigit(*params))
1794 return -1;
1795
1796 /* Get dev ID from parameter string */
1797 dev_id = strtoul(params, &end_param, 10);
1798 RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
1799
1800 p_param = strtok(end_param, ",");
1801 if (p_param == NULL || strlen(p_param) == 0 || !isdigit(*p_param))
1802 return -1;
1803
1804 port_id = strtoul(p_param, &end_param, 10);
1805 p_param = strtok(NULL, "\0");
1806 if (p_param != NULL)
1807 RTE_EDEV_LOG_DEBUG(
1808 "Extra parameters passed to eventdev telemetry command, ignoring");
1809
1810 ret = rte_event_port_links_get(dev_id, port_id, queues, priorities);
1811 if (ret < 0)
1812 return -1;
1813
1814 rte_tel_data_start_dict(d);
1815 for (i = 0; i < ret; i++) {
1816 char qid_name[32];
1817
1818 snprintf(qid_name, 31, "qid_%u", queues[i]);
1819 rte_tel_data_add_dict_uint(d, qid_name, priorities[i]);
1820 }
1821
1822 return 0;
1823}
1824
1825static int
1826eventdev_build_telemetry_data(int dev_id,

Callers

nothing calls this directly

Calls 7

isdigitFunction · 0.85
strtoulFunction · 0.85
strtokFunction · 0.85
rte_event_port_links_getFunction · 0.85
rte_tel_data_start_dictFunction · 0.85
snprintfFunction · 0.85

Tested by

no test coverage detected