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

Function get_port_stat

dpdk/drivers/event/sw/sw_evdev_xstats.c:69–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69static uint64_t
70get_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
92static uint64_t
93get_port_bucket_stat(const struct sw_evdev *sw, uint16_t obj_idx,

Callers

nothing calls this directly

Calls 2

rte_event_ring_countFunction · 0.85

Tested by

no test coverage detected