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

Function handle_queue_xstats

dpdk/lib/eventdev/rte_eventdev.c:1951–1983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1949}
1950
1951static int
1952handle_queue_xstats(const char *cmd __rte_unused,
1953 const char *params,
1954 struct rte_tel_data *d)
1955{
1956 int dev_id;
1957 int port_queue_id = 0;
1958 enum rte_event_dev_xstats_mode mode;
1959 char *end_param;
1960 const char *p_param;
1961
1962 if (params == NULL || strlen(params) == 0 || !isdigit(*params))
1963 return -1;
1964
1965 /* Get dev ID from parameter string */
1966 dev_id = strtoul(params, &end_param, 10);
1967 RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
1968
1969 p_param = strtok(end_param, ",");
1970 mode = RTE_EVENT_DEV_XSTATS_QUEUE;
1971
1972 if (p_param == NULL || strlen(p_param) == 0 || !isdigit(*p_param))
1973 return -1;
1974
1975 port_queue_id = strtoul(p_param, &end_param, 10);
1976
1977 p_param = strtok(NULL, "\0");
1978 if (p_param != NULL)
1979 RTE_EDEV_LOG_DEBUG(
1980 "Extra parameters passed to eventdev telemetry command, ignoring");
1981
1982 return eventdev_build_telemetry_data(dev_id, mode, port_queue_id, d);
1983}
1984
1985static int
1986handle_dev_dump(const char *cmd __rte_unused,

Callers

nothing calls this directly

Calls 4

isdigitFunction · 0.85
strtoulFunction · 0.85
strtokFunction · 0.85

Tested by

no test coverage detected