Lines Matching refs:vsi

89 irdma_sc_suspend_resume_qps(struct irdma_sc_vsi *vsi, u8 op)  in irdma_sc_suspend_resume_qps()  argument
95 mutex_lock(&vsi->qos[i].qos_mutex); in irdma_sc_suspend_resume_qps()
96 qp = irdma_get_qp_from_list(&vsi->qos[i].qplist, qp); in irdma_sc_suspend_resume_qps()
99 if (!qp->dev->ws_add(vsi, i)) { in irdma_sc_suspend_resume_qps()
101 vsi->qos[qp->user_pri].qs_handle; in irdma_sc_suspend_resume_qps()
110 atomic_inc(&vsi->qp_suspend_reqs); in irdma_sc_suspend_resume_qps()
112 qp = irdma_get_qp_from_list(&vsi->qos[i].qplist, qp); in irdma_sc_suspend_resume_qps()
114 mutex_unlock(&vsi->qos[i].qos_mutex); in irdma_sc_suspend_resume_qps()
119 irdma_set_qos_info(struct irdma_sc_vsi *vsi, struct irdma_l2params *l2p) in irdma_set_qos_info() argument
123 vsi->qos_rel_bw = l2p->vsi_rel_bw; in irdma_set_qos_info()
124 vsi->qos_prio_type = l2p->vsi_prio_type; in irdma_set_qos_info()
125 vsi->dscp_mode = l2p->dscp_mode; in irdma_set_qos_info()
127 irdma_memcpy(vsi->dscp_map, l2p->dscp_map, sizeof(vsi->dscp_map)); in irdma_set_qos_info()
132 vsi->tc_print_warning[i] = true; in irdma_set_qos_info()
134 if (vsi->dev->hw_attrs.uk_attrs.hw_rev == IRDMA_GEN_1) in irdma_set_qos_info()
135 vsi->qos[i].qs_handle = l2p->qs_handle_list[i]; in irdma_set_qos_info()
136 if (vsi->dev->hw_attrs.uk_attrs.hw_rev == IRDMA_GEN_2) in irdma_set_qos_info()
137 irdma_init_config_check(&vsi->cfg_check[i], in irdma_set_qos_info()
140 vsi->qos[i].traffic_class = l2p->up2tc[i]; in irdma_set_qos_info()
141 vsi->qos[i].rel_bw = in irdma_set_qos_info()
142 l2p->tc_info[vsi->qos[i].traffic_class].rel_bw; in irdma_set_qos_info()
143 vsi->qos[i].prio_type = in irdma_set_qos_info()
144 l2p->tc_info[vsi->qos[i].traffic_class].prio_type; in irdma_set_qos_info()
145 vsi->qos[i].valid = false; in irdma_set_qos_info()
155 irdma_change_l2params(struct irdma_sc_vsi *vsi, in irdma_change_l2params() argument
159 vsi->tc_change_pending = false; in irdma_change_l2params()
160 irdma_set_qos_info(vsi, l2params); in irdma_change_l2params()
161 irdma_sc_suspend_resume_qps(vsi, IRDMA_OP_RESUME); in irdma_change_l2params()
164 vsi->mtu = l2params->mtu; in irdma_change_l2params()
165 if (vsi->ieq) in irdma_change_l2params()
166 irdma_reinitialize_ieq(vsi); in irdma_change_l2params()
177 struct irdma_sc_vsi *vsi = qp->vsi; in irdma_qp_rem_qos() local
183 mutex_lock(&vsi->qos[qp->user_pri].qos_mutex); in irdma_qp_rem_qos()
188 mutex_unlock(&vsi->qos[qp->user_pri].qos_mutex); in irdma_qp_rem_qos()
198 struct irdma_sc_vsi *vsi = qp->vsi; in irdma_qp_add_qos() local
204 mutex_lock(&vsi->qos[qp->user_pri].qos_mutex); in irdma_qp_add_qos()
206 list_add(&qp->list, &vsi->qos[qp->user_pri].qplist); in irdma_qp_add_qos()
208 qp->qs_handle = vsi->qos[qp->user_pri].qs_handle; in irdma_qp_add_qos()
210 mutex_unlock(&vsi->qos[qp->user_pri].qos_mutex); in irdma_qp_add_qos()
365 struct irdma_sc_vsi *vsi = info->vsi; in irdma_sc_manage_qhash_table_entry() local
387 vsi->qos[info->user_pri].qs_handle); in irdma_sc_manage_qhash_table_entry()
445 qp->vsi = info->vsi; in irdma_sc_qp_init()
446 qp->ieq_qp = info->vsi->exception_lan_q; in irdma_sc_qp_init()
496 qp->qs_handle = qp->vsi->qos[qp->user_pri].qs_handle; in irdma_sc_qp_init()
1932 irdma_null_ws_add(struct irdma_sc_vsi *vsi, u8 user_pri) in irdma_null_ws_add() argument
1938 irdma_null_ws_remove(struct irdma_sc_vsi *vsi, u8 user_pri) in irdma_null_ws_remove() argument
1944 irdma_null_ws_reset(struct irdma_sc_vsi *vsi) in irdma_null_ws_reset() argument
1955 irdma_sc_vsi_init(struct irdma_sc_vsi *vsi, in irdma_sc_vsi_init() argument
1960 vsi->dev = info->dev; in irdma_sc_vsi_init()
1961 vsi->back_vsi = info->back_vsi; in irdma_sc_vsi_init()
1962 vsi->register_qset = info->register_qset; in irdma_sc_vsi_init()
1963 vsi->unregister_qset = info->unregister_qset; in irdma_sc_vsi_init()
1964 vsi->mtu = info->params->mtu; in irdma_sc_vsi_init()
1965 vsi->exception_lan_q = info->exception_lan_q; in irdma_sc_vsi_init()
1966 vsi->vsi_idx = info->pf_data_vsi_num; in irdma_sc_vsi_init()
1968 irdma_set_qos_info(vsi, info->params); in irdma_sc_vsi_init()
1970 mutex_init(&vsi->qos[i].qos_mutex); in irdma_sc_vsi_init()
1971 INIT_LIST_HEAD(&vsi->qos[i].qplist); in irdma_sc_vsi_init()
1973 if (vsi->register_qset) { in irdma_sc_vsi_init()
1974 vsi->dev->ws_add = irdma_ws_add; in irdma_sc_vsi_init()
1975 vsi->dev->ws_remove = irdma_ws_remove; in irdma_sc_vsi_init()
1976 vsi->dev->ws_reset = irdma_ws_reset; in irdma_sc_vsi_init()
1978 vsi->dev->ws_add = irdma_null_ws_add; in irdma_sc_vsi_init()
1979 vsi->dev->ws_remove = irdma_null_ws_remove; in irdma_sc_vsi_init()
1980 vsi->dev->ws_reset = irdma_null_ws_reset; in irdma_sc_vsi_init()
1988 static u16 irdma_get_stats_idx(struct irdma_sc_vsi *vsi){ in irdma_get_stats_idx() argument
1990 struct irdma_sc_dev *dev = vsi->dev; in irdma_get_stats_idx()
1993 if (!irdma_cqp_stats_inst_cmd(vsi, IRDMA_OP_STATS_ALLOCATE, in irdma_get_stats_idx()
2007 irdma_vsi_stats_init(struct irdma_sc_vsi *vsi, in irdma_vsi_stats_init() argument
2012 vsi->pestat = info->pestat; in irdma_vsi_stats_init()
2013 vsi->pestat->hw = vsi->dev->hw; in irdma_vsi_stats_init()
2014 vsi->pestat->vsi = vsi; in irdma_vsi_stats_init()
2016 stats_buff_mem = &vsi->pestat->gather_info.stats_buff_mem; in irdma_vsi_stats_init()
2018 stats_buff_mem->va = irdma_allocate_dma_mem(vsi->pestat->hw, in irdma_vsi_stats_init()
2024 vsi->pestat->gather_info.gather_stats_va = stats_buff_mem->va; in irdma_vsi_stats_init()
2025 vsi->pestat->gather_info.last_gather_stats_va = in irdma_vsi_stats_init()
2029 irdma_hw_stats_start_timer(vsi); in irdma_vsi_stats_init()
2032 vsi->stats_idx = info->fcn_id; in irdma_vsi_stats_init()
2034 u16 stats_idx = irdma_get_stats_idx(vsi); in irdma_vsi_stats_init()
2037 vsi->stats_inst_alloc = true; in irdma_vsi_stats_init()
2038 vsi->stats_idx = stats_idx; in irdma_vsi_stats_init()
2039 vsi->pestat->gather_info.use_stats_inst = true; in irdma_vsi_stats_init()
2040 vsi->pestat->gather_info.stats_inst_index = stats_idx; in irdma_vsi_stats_init()
2052 irdma_vsi_stats_free(struct irdma_sc_vsi *vsi) in irdma_vsi_stats_free() argument
2055 struct irdma_sc_dev *dev = vsi->dev; in irdma_vsi_stats_free()
2058 if (vsi->stats_inst_alloc) { in irdma_vsi_stats_free()
2059 stats_info.stats_idx = vsi->stats_idx; in irdma_vsi_stats_free()
2060 irdma_cqp_stats_inst_cmd(vsi, IRDMA_OP_STATS_FREE, in irdma_vsi_stats_free()
2065 if (!vsi->pestat) in irdma_vsi_stats_free()
2068 irdma_hw_stats_stop_timer(vsi); in irdma_vsi_stats_free()
2069 irdma_free_dma_mem(vsi->pestat->hw, in irdma_vsi_stats_free()
2070 &vsi->pestat->gather_info.stats_buff_mem); in irdma_vsi_stats_free()
2239 FIELD_PREP(IRDMA_CQPSQ_WS_VSI, info->vsi) | in irdma_sc_manage_ws_node()
2568 cq->vsi = info->vsi; in irdma_sc_cq_init()
2623 FIELD_PREP(IRDMA_CQPSQ_VSIIDX, cq->vsi->vsi_idx)); in irdma_sc_cq_create()
2753 FIELD_PREP(IRDMA_CQPSQ_VSIIDX, cq->vsi->vsi_idx)); in irdma_sc_cq_modify()
3751 ceq->vsi = info->vsi; in irdma_sc_ceq_init()
3784 FIELD_PREP(IRDMA_CQPSQ_VSIIDX, ceq->vsi->vsi_idx)); in irdma_sc_ceq_create()
3847 dev->ccq->vsi = ceq->vsi; in irdma_sc_cceq_create()
4326 cq->vsi = info->vsi; in irdma_sc_ccq_init()
5434 sc_vsi_update_stats(struct irdma_sc_vsi *vsi) in sc_vsi_update_stats() argument
5436 struct irdma_dev_hw_stats *hw_stats = &vsi->pestat->hw_stats; in sc_vsi_update_stats()
5438 vsi->pestat->gather_info.gather_stats_va; in sc_vsi_update_stats()
5440 vsi->pestat->gather_info.last_gather_stats_va; in sc_vsi_update_stats()
5441 const struct irdma_hw_stat_map *map = vsi->dev->hw_stats_map; in sc_vsi_update_stats()
5442 u16 max_stat_idx = vsi->dev->hw_attrs.max_stat_idx; in sc_vsi_update_stats()