Lines Matching refs:hw_resc
6170 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_get_rings() local
6190 hw_resc->resv_tx_rings = le16_to_cpu(resp->alloc_tx_rings); in bnxt_hwrm_get_rings()
6194 hw_resc->resv_rx_rings = le16_to_cpu(resp->alloc_rx_rings); in bnxt_hwrm_get_rings()
6195 hw_resc->resv_hw_ring_grps = in bnxt_hwrm_get_rings()
6197 hw_resc->resv_vnics = le16_to_cpu(resp->alloc_vnics); in bnxt_hwrm_get_rings()
6200 hw_resc->resv_irqs = cp; in bnxt_hwrm_get_rings()
6202 int rx = hw_resc->resv_rx_rings; in bnxt_hwrm_get_rings()
6203 int tx = hw_resc->resv_tx_rings; in bnxt_hwrm_get_rings()
6211 hw_resc->resv_rx_rings = rx; in bnxt_hwrm_get_rings()
6212 hw_resc->resv_tx_rings = tx; in bnxt_hwrm_get_rings()
6214 hw_resc->resv_irqs = le16_to_cpu(resp->alloc_msix); in bnxt_hwrm_get_rings()
6215 hw_resc->resv_hw_ring_grps = rx; in bnxt_hwrm_get_rings()
6217 hw_resc->resv_cp_rings = cp; in bnxt_hwrm_get_rings()
6218 hw_resc->resv_stat_ctxs = stats; in bnxt_hwrm_get_rings()
6368 bp->hw_resc.resv_tx_rings = tx_rings; in bnxt_hwrm_reserve_pf_rings()
6381 bp->hw_resc.resv_tx_rings = tx_rings; in bnxt_hwrm_reserve_vf_rings()
6453 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_check_rss_tbl_no_rmgr() local
6456 if (hw_resc->resv_rx_rings != bp->rx_nr_rings) { in bnxt_check_rss_tbl_no_rmgr()
6457 hw_resc->resv_rx_rings = bp->rx_nr_rings; in bnxt_check_rss_tbl_no_rmgr()
6465 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_need_reserve_rings() local
6471 if (hw_resc->resv_tx_rings != bp->tx_nr_rings && in bnxt_need_reserve_rings()
6489 if (hw_resc->resv_rx_rings != rx || hw_resc->resv_cp_rings != cp || in bnxt_need_reserve_rings()
6490 hw_resc->resv_vnics != vnic || hw_resc->resv_stat_ctxs != stat || in bnxt_need_reserve_rings()
6491 (hw_resc->resv_hw_ring_grps != grp && in bnxt_need_reserve_rings()
6495 hw_resc->resv_irqs != nq) in bnxt_need_reserve_rings()
6502 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in __bnxt_reserve_rings() local
6526 tx = hw_resc->resv_tx_rings; in __bnxt_reserve_rings()
6528 rx = hw_resc->resv_rx_rings; in __bnxt_reserve_rings()
6529 cp = hw_resc->resv_irqs; in __bnxt_reserve_rings()
6530 grp = hw_resc->resv_hw_ring_grps; in __bnxt_reserve_rings()
6531 vnic = hw_resc->resv_vnics; in __bnxt_reserve_rings()
6532 stat = hw_resc->resv_stat_ctxs; in __bnxt_reserve_rings()
7569 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_hwrm_func_resc_qcaps() local
7582 hw_resc->max_tx_sch_inputs = le16_to_cpu(resp->max_tx_scheduler_inputs); in bnxt_hwrm_func_resc_qcaps()
7586 hw_resc->min_rsscos_ctxs = le16_to_cpu(resp->min_rsscos_ctx); in bnxt_hwrm_func_resc_qcaps()
7587 hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx); in bnxt_hwrm_func_resc_qcaps()
7588 hw_resc->min_cp_rings = le16_to_cpu(resp->min_cmpl_rings); in bnxt_hwrm_func_resc_qcaps()
7589 hw_resc->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings); in bnxt_hwrm_func_resc_qcaps()
7590 hw_resc->min_tx_rings = le16_to_cpu(resp->min_tx_rings); in bnxt_hwrm_func_resc_qcaps()
7591 hw_resc->max_tx_rings = le16_to_cpu(resp->max_tx_rings); in bnxt_hwrm_func_resc_qcaps()
7592 hw_resc->min_rx_rings = le16_to_cpu(resp->min_rx_rings); in bnxt_hwrm_func_resc_qcaps()
7593 hw_resc->max_rx_rings = le16_to_cpu(resp->max_rx_rings); in bnxt_hwrm_func_resc_qcaps()
7594 hw_resc->min_hw_ring_grps = le16_to_cpu(resp->min_hw_ring_grps); in bnxt_hwrm_func_resc_qcaps()
7595 hw_resc->max_hw_ring_grps = le16_to_cpu(resp->max_hw_ring_grps); in bnxt_hwrm_func_resc_qcaps()
7596 hw_resc->min_l2_ctxs = le16_to_cpu(resp->min_l2_ctxs); in bnxt_hwrm_func_resc_qcaps()
7597 hw_resc->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs); in bnxt_hwrm_func_resc_qcaps()
7598 hw_resc->min_vnics = le16_to_cpu(resp->min_vnics); in bnxt_hwrm_func_resc_qcaps()
7599 hw_resc->max_vnics = le16_to_cpu(resp->max_vnics); in bnxt_hwrm_func_resc_qcaps()
7600 hw_resc->min_stat_ctxs = le16_to_cpu(resp->min_stat_ctx); in bnxt_hwrm_func_resc_qcaps()
7601 hw_resc->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx); in bnxt_hwrm_func_resc_qcaps()
7606 hw_resc->max_nqs = max_msix; in bnxt_hwrm_func_resc_qcaps()
7607 hw_resc->max_hw_ring_grps = hw_resc->max_rx_rings; in bnxt_hwrm_func_resc_qcaps()
7691 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in __bnxt_hwrm_func_qcaps() local
7746 hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx); in __bnxt_hwrm_func_qcaps()
7747 hw_resc->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings); in __bnxt_hwrm_func_qcaps()
7748 hw_resc->max_tx_rings = le16_to_cpu(resp->max_tx_rings); in __bnxt_hwrm_func_qcaps()
7749 hw_resc->max_rx_rings = le16_to_cpu(resp->max_rx_rings); in __bnxt_hwrm_func_qcaps()
7750 hw_resc->max_hw_ring_grps = le32_to_cpu(resp->max_hw_ring_grps); in __bnxt_hwrm_func_qcaps()
7751 if (!hw_resc->max_hw_ring_grps) in __bnxt_hwrm_func_qcaps()
7752 hw_resc->max_hw_ring_grps = hw_resc->max_tx_rings; in __bnxt_hwrm_func_qcaps()
7753 hw_resc->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs); in __bnxt_hwrm_func_qcaps()
7754 hw_resc->max_vnics = le16_to_cpu(resp->max_vnics); in __bnxt_hwrm_func_qcaps()
7755 hw_resc->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx); in __bnxt_hwrm_func_qcaps()
9058 return bp->hw_resc.max_rsscos_ctxs; in bnxt_get_max_func_rss_ctxs()
9063 return bp->hw_resc.max_vnics; in bnxt_get_max_func_vnics()
9069 return bp->hw_resc.max_stat_ctxs; in bnxt_get_max_func_stat_ctxs()
9074 return bp->hw_resc.max_cp_rings; in bnxt_get_max_func_cp_rings()
9079 unsigned int cp = bp->hw_resc.max_cp_rings; in bnxt_get_max_func_cp_rings_for_en()
9089 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_get_max_func_irqs() local
9092 return min_t(unsigned int, hw_resc->max_irqs, hw_resc->max_nqs); in bnxt_get_max_func_irqs()
9094 return min_t(unsigned int, hw_resc->max_irqs, hw_resc->max_cp_rings); in bnxt_get_max_func_irqs()
9099 bp->hw_resc.max_irqs = max_irqs; in bnxt_set_max_func_irqs()
10029 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_clear_reservations() local
10034 hw_resc->resv_cp_rings = 0; in bnxt_clear_reservations()
10035 hw_resc->resv_stat_ctxs = 0; in bnxt_clear_reservations()
10036 hw_resc->resv_irqs = 0; in bnxt_clear_reservations()
10037 hw_resc->resv_tx_rings = 0; in bnxt_clear_reservations()
10038 hw_resc->resv_rx_rings = 0; in bnxt_clear_reservations()
10039 hw_resc->resv_hw_ring_grps = 0; in bnxt_clear_reservations()
10040 hw_resc->resv_vnics = 0; in bnxt_clear_reservations()
11145 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in bnxt_can_reserve_rings() local
11150 if (hw_resc->min_tx_rings || hw_resc->resv_tx_rings) in bnxt_can_reserve_rings()
11207 if (vnics == bp->hw_resc.resv_vnics) in bnxt_rfs_capable()
11211 if (vnics <= bp->hw_resc.resv_vnics) in bnxt_rfs_capable()
13275 struct bnxt_hw_resc *hw_resc = &bp->hw_resc; in _bnxt_get_max_rings() local
13278 *max_tx = hw_resc->max_tx_rings; in _bnxt_get_max_rings()
13279 *max_rx = hw_resc->max_rx_rings; in _bnxt_get_max_rings()
13283 hw_resc->max_stat_ctxs - bnxt_get_ulp_stat_ctxs(bp)); in _bnxt_get_max_rings()
13286 max_ring_grps = hw_resc->max_hw_ring_grps; in _bnxt_get_max_rings()