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

Function eventdev_xstats

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

Source from the content-addressed store, hash-verified

2050}
2051
2052static unsigned int
2053eventdev_xstats(void)
2054{
2055 unsigned int count = 0;
2056 int i, j;
2057
2058 for (i = 0; i < rte_event_dev_count(); i++) {
2059
2060 if (eventdev_var[i].dump_xstats) {
2061 ++count;
2062 int ret = rte_event_dev_dump(i, stdout);
2063
2064 if (ret)
2065 rte_panic("dump failed with err=%d\n", ret);
2066 }
2067
2068 if (eventdev_var[i].shw_device_xstats == 1) {
2069 ++count;
2070 xstats_display(i, RTE_EVENT_DEV_XSTATS_DEVICE, 0);
2071
2072 if (eventdev_var[i].reset_xstats == 1)
2073 xstats_reset(i, RTE_EVENT_DEV_XSTATS_DEVICE, 0);
2074 }
2075
2076 if (eventdev_var[i].shw_all_ports == 1) {
2077 ++count;
2078 for (j = 0; j < MAX_PORTS_QUEUES; j++) {
2079 xstats_display(i, RTE_EVENT_DEV_XSTATS_PORT, j);
2080
2081 if (eventdev_var[i].reset_xstats == 1)
2082 xstats_reset(i, RTE_EVENT_DEV_XSTATS_PORT, j);
2083 }
2084 } else {
2085 if (eventdev_var[i].num_ports > 0)
2086 ++count;
2087 for (j = 0; j < eventdev_var[i].num_ports; j++) {
2088 xstats_display(i, RTE_EVENT_DEV_XSTATS_PORT,
2089 eventdev_var[i].ports[j]);
2090
2091 if (eventdev_var[i].reset_xstats == 1)
2092 xstats_reset(i, RTE_EVENT_DEV_XSTATS_PORT,
2093 eventdev_var[i].ports[j]);
2094 }
2095 }
2096
2097 if (eventdev_var[i].shw_all_queues == 1) {
2098 ++count;
2099 for (j = 0; j < MAX_PORTS_QUEUES; j++) {
2100 xstats_display(i, RTE_EVENT_DEV_XSTATS_QUEUE, j);
2101
2102 if (eventdev_var[i].reset_xstats == 1)
2103 xstats_reset(i, RTE_EVENT_DEV_XSTATS_QUEUE, j);
2104 }
2105 } else {
2106 if (eventdev_var[i].num_queues > 0)
2107 ++count;
2108 for (j = 0; j < eventdev_var[i].num_queues; j++) {
2109 xstats_display(i, RTE_EVENT_DEV_XSTATS_QUEUE,

Callers 1

mainFunction · 0.85

Calls 4

rte_event_dev_countFunction · 0.85
rte_event_dev_dumpFunction · 0.85
xstats_displayFunction · 0.85
xstats_resetFunction · 0.85

Tested by

no test coverage detected