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

Function bnxt_alloc_prev_ring_stats

dpdk/drivers/net/bnxt/bnxt_ethdev.c:722–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720}
721
722static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
723{
724 bp->prev_rx_ring_stats = rte_zmalloc("bnxt_prev_rx_ring_stats",
725 sizeof(struct bnxt_ring_stats) *
726 bp->rx_cp_nr_rings,
727 0);
728 if (bp->prev_rx_ring_stats == NULL)
729 return -ENOMEM;
730
731 bp->prev_tx_ring_stats = rte_zmalloc("bnxt_prev_tx_ring_stats",
732 sizeof(struct bnxt_ring_stats) *
733 bp->tx_cp_nr_rings,
734 0);
735 if (bp->tx_cp_nr_rings > 0 && bp->prev_tx_ring_stats == NULL)
736 goto error;
737
738 return 0;
739
740error:
741 bnxt_free_prev_ring_stats(bp);
742 return -ENOMEM;
743}
744
745static int bnxt_start_nic(struct bnxt *bp)
746{

Callers 1

bnxt_dev_start_opFunction · 0.85

Calls 2

rte_zmallocFunction · 0.85

Tested by

no test coverage detected