| 720 | } |
| 721 | |
| 722 | static 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 | |
| 740 | error: |
| 741 | bnxt_free_prev_ring_stats(bp); |
| 742 | return -ENOMEM; |
| 743 | } |
| 744 | |
| 745 | static int bnxt_start_nic(struct bnxt *bp) |
| 746 | { |
no test coverage detected