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

Function fman_if_stats_get

dpdk/drivers/bus/dpaa/base/fman/fman_hw.c:215–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215void
216fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats)
217{
218 struct __fman_if *m = container_of(p, struct __fman_if, __if);
219 struct memac_regs *regs = m->ccsr_map;
220
221 /* read recved packet count */
222 stats->ipackets = (u64)in_be32(&regs->rfrm_l) |
223 ((u64)in_be32(&regs->rfrm_u)) << 32;
224 stats->ibytes = (u64)in_be32(&regs->roct_l) |
225 ((u64)in_be32(&regs->roct_u)) << 32;
226 stats->ierrors = (u64)in_be32(&regs->rerr_l) |
227 ((u64)in_be32(&regs->rerr_u)) << 32;
228
229 /* read xmited packet count */
230 stats->opackets = (u64)in_be32(&regs->tfrm_l) |
231 ((u64)in_be32(&regs->tfrm_u)) << 32;
232 stats->obytes = (u64)in_be32(&regs->toct_l) |
233 ((u64)in_be32(&regs->toct_u)) << 32;
234 stats->oerrors = (u64)in_be32(&regs->terr_l) |
235 ((u64)in_be32(&regs->terr_u)) << 32;
236}
237
238void
239fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n)

Callers 1

dpaa_eth_stats_getFunction · 0.85

Calls 1

in_be32Function · 0.85

Tested by

no test coverage detected