Lines Matching refs:hw_resc
5647 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_get_rings() local
5663 hw_resc->resv_tx_rings = le16_to_cpu(resp->alloc_tx_rings); in bnxt_hwrm_get_rings()
5667 hw_resc->resv_rx_rings = le16_to_cpu(resp->alloc_rx_rings); in bnxt_hwrm_get_rings()
5668 hw_resc->resv_hw_ring_grps = in bnxt_hwrm_get_rings()
5670 hw_resc->resv_vnics = le16_to_cpu(resp->alloc_vnics); in bnxt_hwrm_get_rings()
5673 hw_resc->resv_irqs = cp; in bnxt_hwrm_get_rings()
5675 int rx = hw_resc->resv_rx_rings; in bnxt_hwrm_get_rings()
5676 int tx = hw_resc->resv_tx_rings; in bnxt_hwrm_get_rings()
5684 hw_resc->resv_rx_rings = rx; in bnxt_hwrm_get_rings()
5685 hw_resc->resv_tx_rings = tx; in bnxt_hwrm_get_rings()
5687 hw_resc->resv_irqs = le16_to_cpu(resp->alloc_msix); in bnxt_hwrm_get_rings()
5688 hw_resc->resv_hw_ring_grps = rx; in bnxt_hwrm_get_rings()
5690 hw_resc->resv_cp_rings = cp; in bnxt_hwrm_get_rings()
5691 hw_resc->resv_stat_ctxs = stats; in bnxt_hwrm_get_rings()
5827 bp->hw_resc.resv_tx_rings = tx_rings; in bnxt_hwrm_reserve_pf_rings()
5841 bp->hw_resc.resv_tx_rings = tx_rings; in bnxt_hwrm_reserve_vf_rings()
5908 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_need_reserve_rings() local
5917 if (hw_resc->resv_tx_rings != bp->tx_nr_rings) in bnxt_need_reserve_rings()
5926 (hw_resc->resv_rx_rings != rx || hw_resc->resv_cp_rings != cp || in bnxt_need_reserve_rings()
5927 hw_resc->resv_vnics != vnic || hw_resc->resv_stat_ctxs != stat || in bnxt_need_reserve_rings()
5928 (hw_resc->resv_hw_ring_grps != grp && in bnxt_need_reserve_rings()
5932 hw_resc->resv_irqs != nq) in bnxt_need_reserve_rings()
5939 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in __bnxt_reserve_rings() local
5963 tx = hw_resc->resv_tx_rings; in __bnxt_reserve_rings()
5965 rx = hw_resc->resv_rx_rings; in __bnxt_reserve_rings()
5966 cp = hw_resc->resv_irqs; in __bnxt_reserve_rings()
5967 grp = hw_resc->resv_hw_ring_grps; in __bnxt_reserve_rings()
5968 vnic = hw_resc->resv_vnics; in __bnxt_reserve_rings()
5969 stat = hw_resc->resv_stat_ctxs; in __bnxt_reserve_rings()
6870 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_func_resc_qcaps() local
6882 hw_resc->max_tx_sch_inputs = le16_to_cpu(resp->max_tx_scheduler_inputs); in bnxt_hwrm_func_resc_qcaps()
6886 hw_resc->min_rsscos_ctxs = le16_to_cpu(resp->min_rsscos_ctx); in bnxt_hwrm_func_resc_qcaps()
6887 hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx); in bnxt_hwrm_func_resc_qcaps()
6888 hw_resc->min_cp_rings = le16_to_cpu(resp->min_cmpl_rings); in bnxt_hwrm_func_resc_qcaps()
6889 hw_resc->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings); in bnxt_hwrm_func_resc_qcaps()
6890 hw_resc->min_tx_rings = le16_to_cpu(resp->min_tx_rings); in bnxt_hwrm_func_resc_qcaps()
6891 hw_resc->max_tx_rings = le16_to_cpu(resp->max_tx_rings); in bnxt_hwrm_func_resc_qcaps()
6892 hw_resc->min_rx_rings = le16_to_cpu(resp->min_rx_rings); in bnxt_hwrm_func_resc_qcaps()
6893 hw_resc->max_rx_rings = le16_to_cpu(resp->max_rx_rings); in bnxt_hwrm_func_resc_qcaps()
6894 hw_resc->min_hw_ring_grps = le16_to_cpu(resp->min_hw_ring_grps); in bnxt_hwrm_func_resc_qcaps()
6895 hw_resc->max_hw_ring_grps = le16_to_cpu(resp->max_hw_ring_grps); in bnxt_hwrm_func_resc_qcaps()
6896 hw_resc->min_l2_ctxs = le16_to_cpu(resp->min_l2_ctxs); in bnxt_hwrm_func_resc_qcaps()
6897 hw_resc->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs); in bnxt_hwrm_func_resc_qcaps()
6898 hw_resc->min_vnics = le16_to_cpu(resp->min_vnics); in bnxt_hwrm_func_resc_qcaps()
6899 hw_resc->max_vnics = le16_to_cpu(resp->max_vnics); in bnxt_hwrm_func_resc_qcaps()
6900 hw_resc->min_stat_ctxs = le16_to_cpu(resp->min_stat_ctx); in bnxt_hwrm_func_resc_qcaps()
6901 hw_resc->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx); in bnxt_hwrm_func_resc_qcaps()
6906 hw_resc->max_nqs = max_msix; in bnxt_hwrm_func_resc_qcaps()
6907 hw_resc->max_hw_ring_grps = hw_resc->max_rx_rings; in bnxt_hwrm_func_resc_qcaps()
6928 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in __bnxt_hwrm_func_qcaps() local
6957 hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx); in __bnxt_hwrm_func_qcaps()
6958 hw_resc->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings); in __bnxt_hwrm_func_qcaps()
6959 hw_resc->max_tx_rings = le16_to_cpu(resp->max_tx_rings); in __bnxt_hwrm_func_qcaps()
6960 hw_resc->max_rx_rings = le16_to_cpu(resp->max_rx_rings); in __bnxt_hwrm_func_qcaps()
6961 hw_resc->max_hw_ring_grps = le32_to_cpu(resp->max_hw_ring_grps); in __bnxt_hwrm_func_qcaps()
6962 if (!hw_resc->max_hw_ring_grps) in __bnxt_hwrm_func_qcaps()
6963 hw_resc->max_hw_ring_grps = hw_resc->max_tx_rings; in __bnxt_hwrm_func_qcaps()
6964 hw_resc->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs); in __bnxt_hwrm_func_qcaps()
6965 hw_resc->max_vnics = le16_to_cpu(resp->max_vnics); in __bnxt_hwrm_func_qcaps()
6966 hw_resc->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx); in __bnxt_hwrm_func_qcaps()
7931 return bp->hw_resc.max_rsscos_ctxs; in bnxt_get_max_func_rss_ctxs()
7936 return bp->hw_resc.max_vnics; in bnxt_get_max_func_vnics()
7942 return bp->hw_resc.max_stat_ctxs; in bnxt_get_max_func_stat_ctxs()
7947 return bp->hw_resc.max_cp_rings; in bnxt_get_max_func_cp_rings()
7952 unsigned int cp = bp->hw_resc.max_cp_rings; in bnxt_get_max_func_cp_rings_for_en()
7962 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_get_max_func_irqs() local
7965 return min_t(unsigned int, hw_resc->max_irqs, hw_resc->max_nqs); in bnxt_get_max_func_irqs()
7967 return min_t(unsigned int, hw_resc->max_irqs, hw_resc->max_cp_rings); in bnxt_get_max_func_irqs()
7972 bp->hw_resc.max_irqs = max_irqs; in bnxt_set_max_func_irqs()
8779 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_if_change() local
8782 hw_resc->resv_cp_rings = 0; in bnxt_hwrm_if_change()
8783 hw_resc->resv_stat_ctxs = 0; in bnxt_hwrm_if_change()
8784 hw_resc->resv_irqs = 0; in bnxt_hwrm_if_change()
8785 hw_resc->resv_tx_rings = 0; in bnxt_hwrm_if_change()
8786 hw_resc->resv_rx_rings = 0; in bnxt_hwrm_if_change()
8787 hw_resc->resv_hw_ring_grps = 0; in bnxt_hwrm_if_change()
8788 hw_resc->resv_vnics = 0; in bnxt_hwrm_if_change()
9672 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_can_reserve_rings() local
9677 if (hw_resc->min_tx_rings || hw_resc->resv_tx_rings) in bnxt_can_reserve_rings()
9731 if (vnics == bp->hw_resc.resv_vnics) in bnxt_rfs_capable()
9735 if (vnics <= bp->hw_resc.resv_vnics) in bnxt_rfs_capable()
11412 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in _bnxt_get_max_rings() local
11415 *max_tx = hw_resc->max_tx_rings; in _bnxt_get_max_rings()
11416 *max_rx = hw_resc->max_rx_rings; in _bnxt_get_max_rings()
11420 hw_resc->max_stat_ctxs - bnxt_get_ulp_stat_ctxs(bp)); in _bnxt_get_max_rings()
11423 max_ring_grps = hw_resc->max_hw_ring_grps; in _bnxt_get_max_rings()