| 213 | } |
| 214 | |
| 215 | void |
| 216 | fman_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(®s->rfrm_l) | |
| 223 | ((u64)in_be32(®s->rfrm_u)) << 32; |
| 224 | stats->ibytes = (u64)in_be32(®s->roct_l) | |
| 225 | ((u64)in_be32(®s->roct_u)) << 32; |
| 226 | stats->ierrors = (u64)in_be32(®s->rerr_l) | |
| 227 | ((u64)in_be32(®s->rerr_u)) << 32; |
| 228 | |
| 229 | /* read xmited packet count */ |
| 230 | stats->opackets = (u64)in_be32(®s->tfrm_l) | |
| 231 | ((u64)in_be32(®s->tfrm_u)) << 32; |
| 232 | stats->obytes = (u64)in_be32(®s->toct_l) | |
| 233 | ((u64)in_be32(®s->toct_u)) << 32; |
| 234 | stats->oerrors = (u64)in_be32(®s->terr_l) | |
| 235 | ((u64)in_be32(®s->terr_u)) << 32; |
| 236 | } |
| 237 | |
| 238 | void |
| 239 | fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n) |
no test coverage detected