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

Function handle_port_xstats

dpdk/lib/eventdev/rte_eventdev.c:1917–1949  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1915}
1916
1917static int
1918handle_port_xstats(const char *cmd __rte_unused,
1919 const char *params,
1920 struct rte_tel_data *d)
1921{
1922 int dev_id;
1923 int port_queue_id = 0;
1924 enum rte_event_dev_xstats_mode mode;
1925 char *end_param;
1926 const char *p_param;
1927
1928 if (params == NULL || strlen(params) == 0 || !isdigit(*params))
1929 return -1;
1930
1931 /* Get dev ID from parameter string */
1932 dev_id = strtoul(params, &end_param, 10);
1933 RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
1934
1935 p_param = strtok(end_param, ",");
1936 mode = RTE_EVENT_DEV_XSTATS_PORT;
1937
1938 if (p_param == NULL || strlen(p_param) == 0 || !isdigit(*p_param))
1939 return -1;
1940
1941 port_queue_id = strtoul(p_param, &end_param, 10);
1942
1943 p_param = strtok(NULL, "\0");
1944 if (p_param != NULL)
1945 RTE_EDEV_LOG_DEBUG(
1946 "Extra parameters passed to eventdev telemetry command, ignoring");
1947
1948 return eventdev_build_telemetry_data(dev_id, mode, port_queue_id, d);
1949}
1950
1951static int
1952handle_queue_xstats(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