Lines Matching refs:hw_resc
6138 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_get_rings() local
6158 hw_resc->resv_tx_rings = le16_to_cpu(resp->alloc_tx_rings); in bnxt_hwrm_get_rings()
6162 hw_resc->resv_rx_rings = le16_to_cpu(resp->alloc_rx_rings); in bnxt_hwrm_get_rings()
6163 hw_resc->resv_hw_ring_grps = in bnxt_hwrm_get_rings()
6165 hw_resc->resv_vnics = le16_to_cpu(resp->alloc_vnics); in bnxt_hwrm_get_rings()
6168 hw_resc->resv_irqs = cp; in bnxt_hwrm_get_rings()
6170 int rx = hw_resc->resv_rx_rings; in bnxt_hwrm_get_rings()
6171 int tx = hw_resc->resv_tx_rings; in bnxt_hwrm_get_rings()
6179 hw_resc->resv_rx_rings = rx; in bnxt_hwrm_get_rings()
6180 hw_resc->resv_tx_rings = tx; in bnxt_hwrm_get_rings()
6182 hw_resc->resv_irqs = le16_to_cpu(resp->alloc_msix); in bnxt_hwrm_get_rings()
6183 hw_resc->resv_hw_ring_grps = rx; in bnxt_hwrm_get_rings()
6185 hw_resc->resv_cp_rings = cp; in bnxt_hwrm_get_rings()
6186 hw_resc->resv_stat_ctxs = stats; in bnxt_hwrm_get_rings()
6336 bp->hw_resc.resv_tx_rings = tx_rings; in bnxt_hwrm_reserve_pf_rings()
6349 bp->hw_resc.resv_tx_rings = tx_rings; in bnxt_hwrm_reserve_vf_rings()
6421 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_check_rss_tbl_no_rmgr() local
6424 if (hw_resc->resv_rx_rings != bp->rx_nr_rings) { in bnxt_check_rss_tbl_no_rmgr()
6425 hw_resc->resv_rx_rings = bp->rx_nr_rings; in bnxt_check_rss_tbl_no_rmgr()
6433 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_need_reserve_rings() local
6439 if (hw_resc->resv_tx_rings != bp->tx_nr_rings && in bnxt_need_reserve_rings()
6457 if (hw_resc->resv_rx_rings != rx || hw_resc->resv_cp_rings != cp || in bnxt_need_reserve_rings()
6458 hw_resc->resv_vnics != vnic || hw_resc->resv_stat_ctxs != stat || in bnxt_need_reserve_rings()
6459 (hw_resc->resv_hw_ring_grps != grp && in bnxt_need_reserve_rings()
6463 hw_resc->resv_irqs != nq) in bnxt_need_reserve_rings()
6470 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in __bnxt_reserve_rings() local
6494 tx = hw_resc->resv_tx_rings; in __bnxt_reserve_rings()
6496 rx = hw_resc->resv_rx_rings; in __bnxt_reserve_rings()
6497 cp = hw_resc->resv_irqs; in __bnxt_reserve_rings()
6498 grp = hw_resc->resv_hw_ring_grps; in __bnxt_reserve_rings()
6499 vnic = hw_resc->resv_vnics; in __bnxt_reserve_rings()
6500 stat = hw_resc->resv_stat_ctxs; in __bnxt_reserve_rings()
7534 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_func_resc_qcaps() local
7547 hw_resc->max_tx_sch_inputs = le16_to_cpu(resp->max_tx_scheduler_inputs); in bnxt_hwrm_func_resc_qcaps()
7551 hw_resc->min_rsscos_ctxs = le16_to_cpu(resp->min_rsscos_ctx); in bnxt_hwrm_func_resc_qcaps()
7552 hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx); in bnxt_hwrm_func_resc_qcaps()
7553 hw_resc->min_cp_rings = le16_to_cpu(resp->min_cmpl_rings); in bnxt_hwrm_func_resc_qcaps()
7554 hw_resc->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings); in bnxt_hwrm_func_resc_qcaps()
7555 hw_resc->min_tx_rings = le16_to_cpu(resp->min_tx_rings); in bnxt_hwrm_func_resc_qcaps()
7556 hw_resc->max_tx_rings = le16_to_cpu(resp->max_tx_rings); in bnxt_hwrm_func_resc_qcaps()
7557 hw_resc->min_rx_rings = le16_to_cpu(resp->min_rx_rings); in bnxt_hwrm_func_resc_qcaps()
7558 hw_resc->max_rx_rings = le16_to_cpu(resp->max_rx_rings); in bnxt_hwrm_func_resc_qcaps()
7559 hw_resc->min_hw_ring_grps = le16_to_cpu(resp->min_hw_ring_grps); in bnxt_hwrm_func_resc_qcaps()
7560 hw_resc->max_hw_ring_grps = le16_to_cpu(resp->max_hw_ring_grps); in bnxt_hwrm_func_resc_qcaps()
7561 hw_resc->min_l2_ctxs = le16_to_cpu(resp->min_l2_ctxs); in bnxt_hwrm_func_resc_qcaps()
7562 hw_resc->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs); in bnxt_hwrm_func_resc_qcaps()
7563 hw_resc->min_vnics = le16_to_cpu(resp->min_vnics); in bnxt_hwrm_func_resc_qcaps()
7564 hw_resc->max_vnics = le16_to_cpu(resp->max_vnics); in bnxt_hwrm_func_resc_qcaps()
7565 hw_resc->min_stat_ctxs = le16_to_cpu(resp->min_stat_ctx); in bnxt_hwrm_func_resc_qcaps()
7566 hw_resc->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx); in bnxt_hwrm_func_resc_qcaps()
7571 hw_resc->max_nqs = max_msix; in bnxt_hwrm_func_resc_qcaps()
7572 hw_resc->max_hw_ring_grps = hw_resc->max_rx_rings; in bnxt_hwrm_func_resc_qcaps()
7656 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in __bnxt_hwrm_func_qcaps() local
7711 hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx); in __bnxt_hwrm_func_qcaps()
7712 hw_resc->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings); in __bnxt_hwrm_func_qcaps()
7713 hw_resc->max_tx_rings = le16_to_cpu(resp->max_tx_rings); in __bnxt_hwrm_func_qcaps()
7714 hw_resc->max_rx_rings = le16_to_cpu(resp->max_rx_rings); in __bnxt_hwrm_func_qcaps()
7715 hw_resc->max_hw_ring_grps = le32_to_cpu(resp->max_hw_ring_grps); in __bnxt_hwrm_func_qcaps()
7716 if (!hw_resc->max_hw_ring_grps) in __bnxt_hwrm_func_qcaps()
7717 hw_resc->max_hw_ring_grps = hw_resc->max_tx_rings; in __bnxt_hwrm_func_qcaps()
7718 hw_resc->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs); in __bnxt_hwrm_func_qcaps()
7719 hw_resc->max_vnics = le16_to_cpu(resp->max_vnics); in __bnxt_hwrm_func_qcaps()
7720 hw_resc->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx); in __bnxt_hwrm_func_qcaps()
9021 return bp->hw_resc.max_rsscos_ctxs; in bnxt_get_max_func_rss_ctxs()
9026 return bp->hw_resc.max_vnics; in bnxt_get_max_func_vnics()
9032 return bp->hw_resc.max_stat_ctxs; in bnxt_get_max_func_stat_ctxs()
9037 return bp->hw_resc.max_cp_rings; in bnxt_get_max_func_cp_rings()
9042 unsigned int cp = bp->hw_resc.max_cp_rings; in bnxt_get_max_func_cp_rings_for_en()
9052 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_get_max_func_irqs() local
9055 return min_t(unsigned int, hw_resc->max_irqs, hw_resc->max_nqs); in bnxt_get_max_func_irqs()
9057 return min_t(unsigned int, hw_resc->max_irqs, hw_resc->max_cp_rings); in bnxt_get_max_func_irqs()
9062 bp->hw_resc.max_irqs = max_irqs; in bnxt_set_max_func_irqs()
9988 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_clear_reservations() local
9993 hw_resc->resv_cp_rings = 0; in bnxt_clear_reservations()
9994 hw_resc->resv_stat_ctxs = 0; in bnxt_clear_reservations()
9995 hw_resc->resv_irqs = 0; in bnxt_clear_reservations()
9996 hw_resc->resv_tx_rings = 0; in bnxt_clear_reservations()
9997 hw_resc->resv_rx_rings = 0; in bnxt_clear_reservations()
9998 hw_resc->resv_hw_ring_grps = 0; in bnxt_clear_reservations()
9999 hw_resc->resv_vnics = 0; in bnxt_clear_reservations()
11104 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_can_reserve_rings() local
11109 if (hw_resc->min_tx_rings || hw_resc->resv_tx_rings) in bnxt_can_reserve_rings()
11166 if (vnics == bp->hw_resc.resv_vnics) in bnxt_rfs_capable()
11170 if (vnics <= bp->hw_resc.resv_vnics) in bnxt_rfs_capable()
13224 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in _bnxt_get_max_rings() local
13227 *max_tx = hw_resc->max_tx_rings; in _bnxt_get_max_rings()
13228 *max_rx = hw_resc->max_rx_rings; in _bnxt_get_max_rings()
13232 hw_resc->max_stat_ctxs - bnxt_get_ulp_stat_ctxs(bp)); in _bnxt_get_max_rings()
13235 max_ring_grps = hw_resc->max_hw_ring_grps; in _bnxt_get_max_rings()