| 67 | } |
| 68 | |
| 69 | static uint64_t |
| 70 | get_port_stat(const struct sw_evdev *sw, uint16_t obj_idx, |
| 71 | enum xstats_type type, int extra_arg __rte_unused) |
| 72 | { |
| 73 | const struct sw_port *p = &sw->ports[obj_idx]; |
| 74 | |
| 75 | switch (type) { |
| 76 | case rx: return p->stats.rx_pkts; |
| 77 | case tx: return p->stats.tx_pkts; |
| 78 | case dropped: return p->stats.rx_dropped; |
| 79 | case inflight: return p->inflights; |
| 80 | case pkt_cycles: return p->avg_pkt_ticks; |
| 81 | case calls: return p->total_polls; |
| 82 | case credits: return p->inflight_credits; |
| 83 | case poll_return: return p->zero_polls; |
| 84 | case rx_used: return rte_event_ring_count(p->rx_worker_ring); |
| 85 | case rx_free: return rte_event_ring_free_count(p->rx_worker_ring); |
| 86 | case tx_used: return rte_event_ring_count(p->cq_worker_ring); |
| 87 | case tx_free: return rte_event_ring_free_count(p->cq_worker_ring); |
| 88 | default: return -1; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | static uint64_t |
| 93 | get_port_bucket_stat(const struct sw_evdev *sw, uint16_t obj_idx, |
nothing calls this directly
no test coverage detected