Lines Matching refs:hw_resc
7270 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_get_rings() local
7290 hw_resc->resv_tx_rings = le16_to_cpu(resp->alloc_tx_rings); in bnxt_hwrm_get_rings()
7294 hw_resc->resv_rx_rings = le16_to_cpu(resp->alloc_rx_rings); in bnxt_hwrm_get_rings()
7295 hw_resc->resv_hw_ring_grps = in bnxt_hwrm_get_rings()
7297 hw_resc->resv_vnics = le16_to_cpu(resp->alloc_vnics); in bnxt_hwrm_get_rings()
7298 hw_resc->resv_rsscos_ctxs = le16_to_cpu(resp->alloc_rsscos_ctx); in bnxt_hwrm_get_rings()
7301 hw_resc->resv_irqs = cp; in bnxt_hwrm_get_rings()
7303 int rx = hw_resc->resv_rx_rings; in bnxt_hwrm_get_rings()
7304 int tx = hw_resc->resv_tx_rings; in bnxt_hwrm_get_rings()
7314 hw_resc->resv_rx_rings = rx; in bnxt_hwrm_get_rings()
7315 hw_resc->resv_tx_rings = tx; in bnxt_hwrm_get_rings()
7317 hw_resc->resv_irqs = le16_to_cpu(resp->alloc_msix); in bnxt_hwrm_get_rings()
7318 hw_resc->resv_hw_ring_grps = rx; in bnxt_hwrm_get_rings()
7320 hw_resc->resv_cp_rings = cp; in bnxt_hwrm_get_rings()
7321 hw_resc->resv_stat_ctxs = stats; in bnxt_hwrm_get_rings()
7459 bp->hw_resc.resv_tx_rings = hwr->tx; in bnxt_hwrm_reserve_pf_rings()
7471 bp->hw_resc.resv_tx_rings = hwr->tx; in bnxt_hwrm_reserve_vf_rings()
7538 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_check_rss_tbl_no_rmgr() local
7541 if (hw_resc->resv_rx_rings != bp->rx_nr_rings) { in bnxt_check_rss_tbl_no_rmgr()
7542 hw_resc->resv_rx_rings = bp->rx_nr_rings; in bnxt_check_rss_tbl_no_rmgr()
7561 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_need_reserve_rings() local
7575 if (hw_resc->resv_tx_rings != bp->tx_nr_rings && in bnxt_need_reserve_rings()
7587 if (hw_resc->resv_rx_rings != rx || hw_resc->resv_cp_rings != cp || in bnxt_need_reserve_rings()
7588 hw_resc->resv_vnics != vnic || hw_resc->resv_stat_ctxs != stat || in bnxt_need_reserve_rings()
7589 (hw_resc->resv_hw_ring_grps != grp && in bnxt_need_reserve_rings()
7593 hw_resc->resv_irqs != nq) in bnxt_need_reserve_rings()
7600 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_copy_reserved_rings() local
7602 hwr->tx = hw_resc->resv_tx_rings; in bnxt_copy_reserved_rings()
7604 hwr->rx = hw_resc->resv_rx_rings; in bnxt_copy_reserved_rings()
7605 hwr->cp = hw_resc->resv_irqs; in bnxt_copy_reserved_rings()
7607 hwr->cp_p5 = hw_resc->resv_cp_rings; in bnxt_copy_reserved_rings()
7608 hwr->grp = hw_resc->resv_hw_ring_grps; in bnxt_copy_reserved_rings()
7609 hwr->vnic = hw_resc->resv_vnics; in bnxt_copy_reserved_rings()
7610 hwr->stat = hw_resc->resv_stat_ctxs; in bnxt_copy_reserved_rings()
7611 hwr->rss_ctx = hw_resc->resv_rsscos_ctxs; in bnxt_copy_reserved_rings()
7661 old_rx_rings = bp->hw_resc.resv_rx_rings; in __bnxt_reserve_rings()
7716 if (old_rx_rings != bp->hw_resc.resv_rx_rings && in __bnxt_reserve_rings()
7722 struct bnxt_hw_resc *hw_resc; in __bnxt_reserve_rings() local
7724 hw_resc = &bp->hw_resc; in __bnxt_reserve_rings()
7725 resv_msix = hw_resc->resv_irqs - bp->cp_nr_rings; in __bnxt_reserve_rings()
7728 resv_ctx = hw_resc->resv_stat_ctxs - bp->cp_nr_rings; in __bnxt_reserve_rings()
8997 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_func_resc_qcaps() local
9010 hw_resc->max_tx_sch_inputs = le16_to_cpu(resp->max_tx_scheduler_inputs); in bnxt_hwrm_func_resc_qcaps()
9014 hw_resc->min_rsscos_ctxs = le16_to_cpu(resp->min_rsscos_ctx); in bnxt_hwrm_func_resc_qcaps()
9015 hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx); in bnxt_hwrm_func_resc_qcaps()
9016 hw_resc->min_cp_rings = le16_to_cpu(resp->min_cmpl_rings); in bnxt_hwrm_func_resc_qcaps()
9017 hw_resc->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings); in bnxt_hwrm_func_resc_qcaps()
9018 hw_resc->min_tx_rings = le16_to_cpu(resp->min_tx_rings); in bnxt_hwrm_func_resc_qcaps()
9019 hw_resc->max_tx_rings = le16_to_cpu(resp->max_tx_rings); in bnxt_hwrm_func_resc_qcaps()
9020 hw_resc->min_rx_rings = le16_to_cpu(resp->min_rx_rings); in bnxt_hwrm_func_resc_qcaps()
9021 hw_resc->max_rx_rings = le16_to_cpu(resp->max_rx_rings); in bnxt_hwrm_func_resc_qcaps()
9022 hw_resc->min_hw_ring_grps = le16_to_cpu(resp->min_hw_ring_grps); in bnxt_hwrm_func_resc_qcaps()
9023 hw_resc->max_hw_ring_grps = le16_to_cpu(resp->max_hw_ring_grps); in bnxt_hwrm_func_resc_qcaps()
9024 hw_resc->min_l2_ctxs = le16_to_cpu(resp->min_l2_ctxs); in bnxt_hwrm_func_resc_qcaps()
9025 hw_resc->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs); in bnxt_hwrm_func_resc_qcaps()
9026 hw_resc->min_vnics = le16_to_cpu(resp->min_vnics); in bnxt_hwrm_func_resc_qcaps()
9027 hw_resc->max_vnics = le16_to_cpu(resp->max_vnics); in bnxt_hwrm_func_resc_qcaps()
9028 hw_resc->min_stat_ctxs = le16_to_cpu(resp->min_stat_ctx); in bnxt_hwrm_func_resc_qcaps()
9029 hw_resc->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx); in bnxt_hwrm_func_resc_qcaps()
9034 hw_resc->max_nqs = max_msix; in bnxt_hwrm_func_resc_qcaps()
9035 hw_resc->max_hw_ring_grps = hw_resc->max_rx_rings; in bnxt_hwrm_func_resc_qcaps()
9123 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in __bnxt_hwrm_func_qcaps() local
9188 hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx); in __bnxt_hwrm_func_qcaps()
9189 hw_resc->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings); in __bnxt_hwrm_func_qcaps()
9190 hw_resc->max_tx_rings = le16_to_cpu(resp->max_tx_rings); in __bnxt_hwrm_func_qcaps()
9191 hw_resc->max_rx_rings = le16_to_cpu(resp->max_rx_rings); in __bnxt_hwrm_func_qcaps()
9192 hw_resc->max_hw_ring_grps = le32_to_cpu(resp->max_hw_ring_grps); in __bnxt_hwrm_func_qcaps()
9193 if (!hw_resc->max_hw_ring_grps) in __bnxt_hwrm_func_qcaps()
9194 hw_resc->max_hw_ring_grps = hw_resc->max_tx_rings; in __bnxt_hwrm_func_qcaps()
9195 hw_resc->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs); in __bnxt_hwrm_func_qcaps()
9196 hw_resc->max_vnics = le16_to_cpu(resp->max_vnics); in __bnxt_hwrm_func_qcaps()
9197 hw_resc->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx); in __bnxt_hwrm_func_qcaps()
9199 hw_resc->max_encap_records = le32_to_cpu(resp->max_encap_records); in __bnxt_hwrm_func_qcaps()
9200 hw_resc->max_decap_records = le32_to_cpu(resp->max_decap_records); in __bnxt_hwrm_func_qcaps()
9201 hw_resc->max_tx_em_flows = le32_to_cpu(resp->max_tx_em_flows); in __bnxt_hwrm_func_qcaps()
9202 hw_resc->max_tx_wm_flows = le32_to_cpu(resp->max_tx_wm_flows); in __bnxt_hwrm_func_qcaps()
9203 hw_resc->max_rx_em_flows = le32_to_cpu(resp->max_rx_em_flows); in __bnxt_hwrm_func_qcaps()
9204 hw_resc->max_rx_wm_flows = le32_to_cpu(resp->max_rx_wm_flows); in __bnxt_hwrm_func_qcaps()
10669 return bp->hw_resc.max_rsscos_ctxs; in bnxt_get_max_func_rss_ctxs()
10674 return bp->hw_resc.max_vnics; in bnxt_get_max_func_vnics()
10679 return bp->hw_resc.max_stat_ctxs; in bnxt_get_max_func_stat_ctxs()
10684 return bp->hw_resc.max_cp_rings; in bnxt_get_max_func_cp_rings()
10689 unsigned int cp = bp->hw_resc.max_cp_rings; in bnxt_get_max_func_cp_rings_for_en()
10699 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_get_max_func_irqs() local
10702 return min_t(unsigned int, hw_resc->max_irqs, hw_resc->max_nqs); in bnxt_get_max_func_irqs()
10704 return min_t(unsigned int, hw_resc->max_irqs, hw_resc->max_cp_rings); in bnxt_get_max_func_irqs()
10709 bp->hw_resc.max_irqs = max_irqs; in bnxt_set_max_func_irqs()
11650 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_clear_reservations() local
11655 hw_resc->resv_cp_rings = 0; in bnxt_clear_reservations()
11656 hw_resc->resv_stat_ctxs = 0; in bnxt_clear_reservations()
11657 hw_resc->resv_irqs = 0; in bnxt_clear_reservations()
11658 hw_resc->resv_tx_rings = 0; in bnxt_clear_reservations()
11659 hw_resc->resv_rx_rings = 0; in bnxt_clear_reservations()
11660 hw_resc->resv_hw_ring_grps = 0; in bnxt_clear_reservations()
11661 hw_resc->resv_vnics = 0; in bnxt_clear_reservations()
11662 hw_resc->resv_rsscos_ctxs = 0; in bnxt_clear_reservations()
12782 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_can_reserve_rings() local
12787 if (hw_resc->min_tx_rings || hw_resc->resv_tx_rings) in bnxt_can_reserve_rings()
12851 if (hwr.vnic <= bp->hw_resc.resv_vnics && in bnxt_rfs_capable()
12852 hwr.rss_ctx <= bp->hw_resc.resv_rsscos_ctxs) in bnxt_rfs_capable()
12856 if (hwr.vnic <= bp->hw_resc.resv_vnics && in bnxt_rfs_capable()
12857 hwr.rss_ctx <= bp->hw_resc.resv_rsscos_ctxs) in bnxt_rfs_capable()
15380 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in _bnxt_get_max_rings() local
15383 *max_tx = hw_resc->max_tx_rings; in _bnxt_get_max_rings()
15384 *max_rx = hw_resc->max_rx_rings; in _bnxt_get_max_rings()
15388 hw_resc->max_stat_ctxs - in _bnxt_get_max_rings()
15392 max_ring_grps = hw_resc->max_hw_ring_grps; in _bnxt_get_max_rings()
15700 struct bnxt_hw_resc *hw_resc; in bnxt_init_one() local
15864 hw_resc = &bp->hw_resc; in bnxt_init_one()
15865 bp->max_fltr = hw_resc->max_rx_em_flows + hw_resc->max_rx_wm_flows + in bnxt_init_one()