| 717 | } |
| 718 | |
| 719 | int |
| 720 | sfc_mae_counters_init(struct sfc_mae_counter_records *counters, |
| 721 | uint32_t nb_counters_max) |
| 722 | { |
| 723 | int rc; |
| 724 | |
| 725 | SFC_GENERIC_LOG(DEBUG, "%s: entry", __func__); |
| 726 | |
| 727 | counters->mae_counters = rte_zmalloc("sfc_mae_counters", |
| 728 | sizeof(*counters->mae_counters) * nb_counters_max, 0); |
| 729 | if (counters->mae_counters == NULL) { |
| 730 | rc = ENOMEM; |
| 731 | SFC_GENERIC_LOG(ERR, "%s: failed: %s", __func__, |
| 732 | rte_strerror(rc)); |
| 733 | return rc; |
| 734 | } |
| 735 | |
| 736 | counters->n_mae_counters = nb_counters_max; |
| 737 | |
| 738 | SFC_GENERIC_LOG(DEBUG, "%s: done", __func__); |
| 739 | |
| 740 | return 0; |
| 741 | } |
| 742 | |
| 743 | void |
| 744 | sfc_mae_counters_fini(struct sfc_mae_counter_records *counters) |
no test coverage detected