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

Function sfc_mae_counters_init

dpdk/drivers/net/sfc/sfc_mae_counter.c:719–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717}
718
719int
720sfc_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
743void
744sfc_mae_counters_fini(struct sfc_mae_counter_records *counters)

Callers 1

Calls 2

rte_zmallocFunction · 0.85
rte_strerrorFunction · 0.85

Tested by

no test coverage detected