Lines Matching refs:qm_info
1331 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_qm_info_free() local
1333 kfree(qm_info->qm_pq_params); in qed_qm_info_free()
1334 qm_info->qm_pq_params = NULL; in qed_qm_info_free()
1335 kfree(qm_info->qm_vport_params); in qed_qm_info_free()
1336 qm_info->qm_vport_params = NULL; in qed_qm_info_free()
1337 kfree(qm_info->qm_port_params); in qed_qm_info_free()
1338 qm_info->qm_port_params = NULL; in qed_qm_info_free()
1339 kfree(qm_info->wfq_data); in qed_qm_info_free()
1340 qm_info->wfq_data = NULL; in qed_qm_info_free()
1533 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_params() local
1537 qm_info->start_pq = (u16)RESC_START(p_hwfn, QED_PQ); in qed_init_qm_params()
1538 qm_info->start_vport = (u8)RESC_START(p_hwfn, QED_VPORT); in qed_init_qm_params()
1541 qm_info->vport_rl_en = true; in qed_init_qm_params()
1542 qm_info->vport_wfq_en = true; in qed_init_qm_params()
1548 qm_info->max_phys_tcs_per_port = four_port ? NUM_PHYS_TCS_4PORT_K2 : in qed_init_qm_params()
1554 if (!qm_info->ooo_tc) in qed_init_qm_params()
1555 qm_info->ooo_tc = four_port ? DCBX_TCP_OOO_K2_4PORT_TC : in qed_init_qm_params()
1562 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_vport_params() local
1567 qm_info->qm_vport_params[i].wfq = 1; in qed_init_qm_vport_params()
1584 &p_hwfn->qm_info.qm_port_params[i]; in qed_init_qm_port_params()
1603 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_reset_params() local
1605 qm_info->num_pqs = 0; in qed_init_qm_reset_params()
1606 qm_info->num_vports = 0; in qed_init_qm_reset_params()
1607 qm_info->num_pf_rls = 0; in qed_init_qm_reset_params()
1608 qm_info->num_vf_pqs = 0; in qed_init_qm_reset_params()
1609 qm_info->first_vf_pq = 0; in qed_init_qm_reset_params()
1610 qm_info->first_mcos_pq = 0; in qed_init_qm_reset_params()
1611 qm_info->first_rl_pq = 0; in qed_init_qm_reset_params()
1616 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_advance_vport() local
1618 qm_info->num_vports++; in qed_init_qm_advance_vport()
1620 if (qm_info->num_vports > qed_init_qm_get_num_vports(p_hwfn)) in qed_init_qm_advance_vport()
1623 qm_info->num_vports, qed_init_qm_get_num_vports(p_hwfn)); in qed_init_qm_advance_vport()
1661 struct qed_qm_info *qm_info, in qed_init_qm_pq() argument
1664 u16 pq_idx = qm_info->num_pqs, max_pq = qed_init_qm_get_num_pqs(p_hwfn); in qed_init_qm_pq()
1671 qm_info->qm_pq_params[pq_idx].port_id = p_hwfn->port_id; in qed_init_qm_pq()
1672 qm_info->qm_pq_params[pq_idx].vport_id = qm_info->start_vport + in qed_init_qm_pq()
1673 qm_info->num_vports; in qed_init_qm_pq()
1674 qm_info->qm_pq_params[pq_idx].tc_id = tc; in qed_init_qm_pq()
1675 qm_info->qm_pq_params[pq_idx].wrr_group = PQ_INIT_DEFAULT_WRR_GROUP; in qed_init_qm_pq()
1676 qm_info->qm_pq_params[pq_idx].rl_valid = in qed_init_qm_pq()
1680 qm_info->num_pqs++; in qed_init_qm_pq()
1682 qm_info->num_vports++; in qed_init_qm_pq()
1685 qm_info->num_pf_rls++; in qed_init_qm_pq()
1687 if (qm_info->num_vports > qed_init_qm_get_num_vports(p_hwfn)) in qed_init_qm_pq()
1690 qm_info->num_vports, qed_init_qm_get_num_vports(p_hwfn)); in qed_init_qm_pq()
1692 if (qm_info->num_pf_rls > qed_init_qm_get_num_pf_rls(p_hwfn)) in qed_init_qm_pq()
1695 qm_info->num_pf_rls, qed_init_qm_get_num_pf_rls(p_hwfn)); in qed_init_qm_pq()
1702 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_get_idx_from_flags() local
1718 return &qm_info->first_rl_pq; in qed_init_qm_get_idx_from_flags()
1720 return &qm_info->first_mcos_pq; in qed_init_qm_get_idx_from_flags()
1722 return &qm_info->pure_lb_pq; in qed_init_qm_get_idx_from_flags()
1724 return &qm_info->ooo_pq; in qed_init_qm_get_idx_from_flags()
1726 return &qm_info->pure_ack_pq; in qed_init_qm_get_idx_from_flags()
1728 return &qm_info->first_ofld_pq; in qed_init_qm_get_idx_from_flags()
1730 return &qm_info->first_llt_pq; in qed_init_qm_get_idx_from_flags()
1732 return &qm_info->first_vf_pq; in qed_init_qm_get_idx_from_flags()
1738 return &qm_info->start_pq; in qed_init_qm_get_idx_from_flags()
1747 *base_pq_idx = p_hwfn->qm_info.start_pq + pq_val; in qed_init_qm_set_idx()
1765 return p_hwfn->qm_info.start_pq; in qed_get_cm_pq_idx_mcos()
1781 return p_hwfn->qm_info.start_pq; in qed_get_cm_pq_idx_vf()
1815 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_lb_pq() local
1820 qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_LB, qm_info->num_pqs); in qed_init_qm_lb_pq()
1821 qed_init_qm_pq(p_hwfn, qm_info, PURE_LB_TC, PQ_INIT_SHARE_VPORT); in qed_init_qm_lb_pq()
1826 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_ooo_pq() local
1831 qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_OOO, qm_info->num_pqs); in qed_init_qm_ooo_pq()
1832 qed_init_qm_pq(p_hwfn, qm_info, qm_info->ooo_tc, PQ_INIT_SHARE_VPORT); in qed_init_qm_ooo_pq()
1837 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_pure_ack_pq() local
1842 qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_ACK, qm_info->num_pqs); in qed_init_qm_pure_ack_pq()
1843 qed_init_qm_pq(p_hwfn, qm_info, qed_get_offload_tc(p_hwfn), in qed_init_qm_pure_ack_pq()
1850 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_mtc_pqs() local
1855 qed_init_qm_pq(p_hwfn, qm_info, in qed_init_qm_mtc_pqs()
1863 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_offload_pq() local
1868 qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_OFLD, qm_info->num_pqs); in qed_init_qm_offload_pq()
1874 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_low_latency_pq() local
1879 qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_LLT, qm_info->num_pqs); in qed_init_qm_low_latency_pq()
1885 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_mcos_pqs() local
1891 qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_MCOS, qm_info->num_pqs); in qed_init_qm_mcos_pqs()
1893 qed_init_qm_pq(p_hwfn, qm_info, tc_idx, PQ_INIT_SHARE_VPORT); in qed_init_qm_mcos_pqs()
1898 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_vf_pqs() local
1904 qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_VFS, qm_info->num_pqs); in qed_init_qm_vf_pqs()
1905 qm_info->num_vf_pqs = num_vfs; in qed_init_qm_vf_pqs()
1908 qm_info, PQ_INIT_DEFAULT_TC, PQ_INIT_VF_RL); in qed_init_qm_vf_pqs()
1914 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_init_qm_rl_pqs() local
1919 qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_RLS, qm_info->num_pqs); in qed_init_qm_rl_pqs()
1921 qed_init_qm_pq(p_hwfn, qm_info, qed_get_offload_tc(p_hwfn), in qed_init_qm_rl_pqs()
1980 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_dp_init_qm_params() local
1990 qm_info->start_pq, in qed_dp_init_qm_params()
1991 qm_info->start_vport, in qed_dp_init_qm_params()
1992 qm_info->pure_lb_pq, in qed_dp_init_qm_params()
1993 qm_info->first_ofld_pq, in qed_dp_init_qm_params()
1994 qm_info->first_llt_pq, in qed_dp_init_qm_params()
1995 qm_info->pure_ack_pq); in qed_dp_init_qm_params()
1999 qm_info->ooo_pq, in qed_dp_init_qm_params()
2000 qm_info->first_vf_pq, in qed_dp_init_qm_params()
2001 qm_info->num_pqs, in qed_dp_init_qm_params()
2002 qm_info->num_vf_pqs, in qed_dp_init_qm_params()
2003 qm_info->num_vports, qm_info->max_phys_tcs_per_port); in qed_dp_init_qm_params()
2007 qm_info->pf_rl_en, in qed_dp_init_qm_params()
2008 qm_info->pf_wfq_en, in qed_dp_init_qm_params()
2009 qm_info->vport_rl_en, in qed_dp_init_qm_params()
2010 qm_info->vport_wfq_en, in qed_dp_init_qm_params()
2011 qm_info->pf_wfq, in qed_dp_init_qm_params()
2012 qm_info->pf_rl, in qed_dp_init_qm_params()
2013 qm_info->num_pf_rls, qed_get_pq_flags(p_hwfn)); in qed_dp_init_qm_params()
2017 port = &(qm_info->qm_port_params[i]); in qed_dp_init_qm_params()
2029 for (i = 0; i < qm_info->num_vports; i++) { in qed_dp_init_qm_params()
2030 vport = &(qm_info->qm_vport_params[i]); in qed_dp_init_qm_params()
2034 qm_info->start_vport + i, vport->wfq); in qed_dp_init_qm_params()
2043 for (i = 0; i < qm_info->num_pqs; i++) { in qed_dp_init_qm_params()
2044 pq = &(qm_info->qm_pq_params[i]); in qed_dp_init_qm_params()
2048 qm_info->start_pq + i, in qed_dp_init_qm_params()
2086 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_qm_reconf() local
2096 qm_info->start_pq, qm_info->num_pqs); in qed_qm_reconf()
2113 qm_info->start_pq, qm_info->num_pqs); in qed_qm_reconf()
2123 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_alloc_qm_data() local
2130 qm_info->qm_pq_params = kcalloc(qed_init_qm_get_num_pqs(p_hwfn), in qed_alloc_qm_data()
2131 sizeof(*qm_info->qm_pq_params), in qed_alloc_qm_data()
2133 if (!qm_info->qm_pq_params) in qed_alloc_qm_data()
2136 qm_info->qm_vport_params = kcalloc(qed_init_qm_get_num_vports(p_hwfn), in qed_alloc_qm_data()
2137 sizeof(*qm_info->qm_vport_params), in qed_alloc_qm_data()
2139 if (!qm_info->qm_vport_params) in qed_alloc_qm_data()
2142 qm_info->qm_port_params = kcalloc(p_hwfn->cdev->num_ports_in_engine, in qed_alloc_qm_data()
2143 sizeof(*qm_info->qm_port_params), in qed_alloc_qm_data()
2145 if (!qm_info->qm_port_params) in qed_alloc_qm_data()
2148 qm_info->wfq_data = kcalloc(qed_init_qm_get_num_vports(p_hwfn), in qed_alloc_qm_data()
2149 sizeof(*qm_info->wfq_data), in qed_alloc_qm_data()
2151 if (!qm_info->wfq_data) in qed_alloc_qm_data()
2656 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_hw_init_common() local
2679 qm_info->pf_rl_en = true; in qed_hw_init_common()
2681 qm_info->pf_wfq_en = true; in qed_hw_init_common()
2685 params->max_phys_tcs_per_port = qm_info->max_phys_tcs_per_port; in qed_hw_init_common()
2686 params->pf_rl_en = qm_info->pf_rl_en; in qed_hw_init_common()
2687 params->pf_wfq_en = qm_info->pf_wfq_en; in qed_hw_init_common()
2688 params->global_rl_en = qm_info->vport_rl_en; in qed_hw_init_common()
2689 params->vport_wfq_en = qm_info->vport_wfq_en; in qed_hw_init_common()
2690 params->port_params = qm_info->qm_port_params; in qed_hw_init_common()
2906 p_hwfn->qm_info.pf_wfq = p_info->bandwidth_min; in qed_hw_init_pf()
2909 p_hwfn->qm_info.pf_rl = 100000; in qed_hw_init_pf()
5031 vport_params = p_hwfn->qm_info.qm_vport_params; in qed_configure_wfq_for_all_vports()
5033 for (i = 0; i < p_hwfn->qm_info.num_vports; i++) { in qed_configure_wfq_for_all_vports()
5034 u32 wfq_speed = p_hwfn->qm_info.wfq_data[i].min_speed; in qed_configure_wfq_for_all_vports()
5050 for (i = 0; i < p_hwfn->qm_info.num_vports; i++) in qed_init_wfq_default_param()
5051 p_hwfn->qm_info.qm_vport_params[i].wfq = 1; in qed_init_wfq_default_param()
5061 vport_params = p_hwfn->qm_info.qm_vport_params; in qed_disable_wfq_for_all_vports()
5063 for (i = 0; i < p_hwfn->qm_info.num_vports; i++) { in qed_disable_wfq_for_all_vports()
5084 num_vports = p_hwfn->qm_info.num_vports; in qed_init_wfq_param()
5096 p_hwfn->qm_info.wfq_data[i].configured) { in qed_init_wfq_param()
5098 tmp_speed = p_hwfn->qm_info.wfq_data[i].min_speed; in qed_init_wfq_param()
5139 p_hwfn->qm_info.wfq_data[vport_id].min_speed = req_rate; in qed_init_wfq_param()
5140 p_hwfn->qm_info.wfq_data[vport_id].configured = true; in qed_init_wfq_param()
5143 if (p_hwfn->qm_info.wfq_data[i].configured) in qed_init_wfq_param()
5146 p_hwfn->qm_info.wfq_data[i].min_speed = left_rate_per_vp; in qed_init_wfq_param()
5161 p_hwfn->qm_info.wfq_data[vp_id].min_speed = rate; in __qed_configure_vport_wfq()
5162 p_hwfn->qm_info.wfq_data[vp_id].configured = true; in __qed_configure_vport_wfq()
5187 for (i = 0; i < p_hwfn->qm_info.num_vports; i++) { in __qed_configure_vp_wfq_on_link_change()
5190 if (!p_hwfn->qm_info.wfq_data[i].configured) in __qed_configure_vp_wfq_on_link_change()
5193 rate = p_hwfn->qm_info.wfq_data[i].min_speed; in __qed_configure_vp_wfq_on_link_change()
5282 p_hwfn->qm_info.pf_rl = p_link->speed; in __qed_configure_pf_max_bandwidth()
5289 p_hwfn->qm_info.pf_rl = 100000; in __qed_configure_pf_max_bandwidth()
5292 p_hwfn->qm_info.pf_rl); in __qed_configure_pf_max_bandwidth()
5343 p_hwfn->qm_info.pf_wfq = min_bw; in __qed_configure_pf_min_bandwidth()
5412 memset(p_hwfn->qm_info.wfq_data, 0, in qed_clean_wfq_db()
5413 sizeof(*p_hwfn->qm_info.wfq_data) * p_hwfn->qm_info.num_vports); in qed_clean_wfq_db()