| 64 | } |
| 65 | |
| 66 | static int |
| 67 | sfc_mae_counter_registry_init(struct sfc_mae_counter_registry *registry, |
| 68 | uint32_t nb_action_counters_max, |
| 69 | uint32_t nb_conntrack_counters_max) |
| 70 | { |
| 71 | int ret; |
| 72 | |
| 73 | ret = sfc_mae_counters_init(®istry->action_counters, |
| 74 | nb_action_counters_max); |
| 75 | if (ret != 0) |
| 76 | return ret; |
| 77 | |
| 78 | registry->action_counters.type = EFX_COUNTER_TYPE_ACTION; |
| 79 | |
| 80 | ret = sfc_mae_counters_init(®istry->conntrack_counters, |
| 81 | nb_conntrack_counters_max); |
| 82 | if (ret != 0) |
| 83 | return ret; |
| 84 | |
| 85 | registry->conntrack_counters.type = EFX_COUNTER_TYPE_CONNTRACK; |
| 86 | |
| 87 | return 0; |
| 88 | } |
| 89 | |
| 90 | static void |
| 91 | sfc_mae_counter_registry_fini(struct sfc_mae_counter_registry *registry) |
no test coverage detected