Lines Matching refs:hw_resc

529 	struct bnxt_hw_resc *hw_resc = &bp->hw_resc;  in bnxt_hwrm_func_vf_resc_cfg()  local
542 vf_msix = hw_resc->max_nqs - bnxt_nq_rings_in_use(bp); in bnxt_hwrm_func_vf_resc_cfg()
545 vf_ring_grps = hw_resc->max_hw_ring_grps - bp->rx_nr_rings; in bnxt_hwrm_func_vf_resc_cfg()
550 vf_rx_rings = hw_resc->max_rx_rings - bp->rx_nr_rings * 2; in bnxt_hwrm_func_vf_resc_cfg()
552 vf_rx_rings = hw_resc->max_rx_rings - bp->rx_nr_rings; in bnxt_hwrm_func_vf_resc_cfg()
553 vf_tx_rings = hw_resc->max_tx_rings - bp->tx_nr_rings; in bnxt_hwrm_func_vf_resc_cfg()
554 vf_vnics = hw_resc->max_vnics - bp->nr_vnics; in bnxt_hwrm_func_vf_resc_cfg()
555 vf_rss = hw_resc->max_rsscos_ctxs - bp->rsscos_nr_ctxs; in bnxt_hwrm_func_vf_resc_cfg()
626 hw_resc->max_tx_rings -= le16_to_cpu(req->min_tx_rings) * n; in bnxt_hwrm_func_vf_resc_cfg()
627 hw_resc->max_rx_rings -= le16_to_cpu(req->min_rx_rings) * n; in bnxt_hwrm_func_vf_resc_cfg()
628 hw_resc->max_hw_ring_grps -= in bnxt_hwrm_func_vf_resc_cfg()
630 hw_resc->max_cp_rings -= le16_to_cpu(req->min_cmpl_rings) * n; in bnxt_hwrm_func_vf_resc_cfg()
631 hw_resc->max_rsscos_ctxs -= in bnxt_hwrm_func_vf_resc_cfg()
633 hw_resc->max_stat_ctxs -= le16_to_cpu(req->min_stat_ctx) * n; in bnxt_hwrm_func_vf_resc_cfg()
634 hw_resc->max_vnics -= le16_to_cpu(req->min_vnics) * n; in bnxt_hwrm_func_vf_resc_cfg()
636 hw_resc->max_nqs -= vf_msix; in bnxt_hwrm_func_vf_resc_cfg()
650 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_func_cfg() local
666 vf_rx_rings = (hw_resc->max_rx_rings - bp->rx_nr_rings * 2) / in bnxt_hwrm_func_cfg()
669 vf_rx_rings = (hw_resc->max_rx_rings - bp->rx_nr_rings) / in bnxt_hwrm_func_cfg()
671 vf_ring_grps = (hw_resc->max_hw_ring_grps - bp->rx_nr_rings) / num_vfs; in bnxt_hwrm_func_cfg()
672 vf_tx_rings = (hw_resc->max_tx_rings - bp->tx_nr_rings) / num_vfs; in bnxt_hwrm_func_cfg()
673 vf_vnics = (hw_resc->max_vnics - bp->nr_vnics) / num_vfs; in bnxt_hwrm_func_cfg()
720 hw_resc->max_tx_rings -= total_vf_tx_rings; in bnxt_hwrm_func_cfg()
721 hw_resc->max_rx_rings -= vf_rx_rings * num_vfs; in bnxt_hwrm_func_cfg()
722 hw_resc->max_hw_ring_grps -= vf_ring_grps * num_vfs; in bnxt_hwrm_func_cfg()
723 hw_resc->max_cp_rings -= vf_cp_rings * num_vfs; in bnxt_hwrm_func_cfg()
724 hw_resc->max_rsscos_ctxs -= num_vfs; in bnxt_hwrm_func_cfg()
725 hw_resc->max_stat_ctxs -= vf_stat_ctx * num_vfs; in bnxt_hwrm_func_cfg()
726 hw_resc->max_vnics -= vf_vnics * num_vfs; in bnxt_hwrm_func_cfg()
769 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_sriov_enable() local
789 if (hw_resc->max_rx_rings - bp->rx_nr_rings * 2 >= in bnxt_sriov_enable()
793 if (hw_resc->max_rx_rings - bp->rx_nr_rings >= in bnxt_sriov_enable()
797 if (hw_resc->max_vnics - bp->nr_vnics < min_rx_rings || in bnxt_sriov_enable()
801 if (hw_resc->max_tx_rings - bp->tx_nr_rings >= min_tx_rings && in bnxt_sriov_enable()
805 if (hw_resc->max_rsscos_ctxs - bp->rsscos_nr_ctxs >= in bnxt_sriov_enable()