Lines Matching refs:p_cid

128 					struct qed_queue_cid *p_cid)  in qed_eth_queue_qid_usage_add()  argument
131 u16 queue_id = p_cid->rel.queue_id; in qed_eth_queue_qid_usage_add()
153 p_cid->qid_usage_idx = first; in qed_eth_queue_qid_usage_add()
161 struct qed_queue_cid *p_cid) in qed_eth_queue_qid_usage_del() argument
165 clear_bit(p_cid->qid_usage_idx, in qed_eth_queue_qid_usage_del()
166 p_hwfn->p_l2_info->pp_qid_usage[p_cid->rel.queue_id]); in qed_eth_queue_qid_usage_del()
172 struct qed_queue_cid *p_cid) in qed_eth_queue_cid_release() argument
174 bool b_legacy_vf = !!(p_cid->vf_legacy & QED_QCID_LEGACY_VF_CID); in qed_eth_queue_cid_release()
177 _qed_cxt_release_cid(p_hwfn, p_cid->cid, p_cid->vfid); in qed_eth_queue_cid_release()
180 if (p_cid->vfid == QED_QUEUE_CID_SELF) in qed_eth_queue_cid_release()
181 qed_eth_queue_qid_usage_del(p_hwfn, p_cid); in qed_eth_queue_cid_release()
183 vfree(p_cid); in qed_eth_queue_cid_release()
197 struct qed_queue_cid *p_cid; in _qed_eth_queue_to_cid() local
200 p_cid = vzalloc(sizeof(*p_cid)); in _qed_eth_queue_to_cid()
201 if (!p_cid) in _qed_eth_queue_to_cid()
204 p_cid->opaque_fid = opaque_fid; in _qed_eth_queue_to_cid()
205 p_cid->cid = cid; in _qed_eth_queue_to_cid()
206 p_cid->p_owner = p_hwfn; in _qed_eth_queue_to_cid()
209 p_cid->rel.vport_id = p_params->vport_id; in _qed_eth_queue_to_cid()
210 p_cid->rel.queue_id = p_params->queue_id; in _qed_eth_queue_to_cid()
211 p_cid->rel.stats_id = p_params->stats_id; in _qed_eth_queue_to_cid()
212 p_cid->sb_igu_id = p_params->p_sb->igu_sb_id; in _qed_eth_queue_to_cid()
213 p_cid->b_is_rx = b_is_rx; in _qed_eth_queue_to_cid()
214 p_cid->sb_idx = p_params->sb_idx; in _qed_eth_queue_to_cid()
218 p_cid->vfid = p_vf_params->vfid; in _qed_eth_queue_to_cid()
219 p_cid->vf_qid = p_vf_params->vf_qid; in _qed_eth_queue_to_cid()
220 p_cid->vf_legacy = p_vf_params->vf_legacy; in _qed_eth_queue_to_cid()
222 p_cid->vfid = QED_QUEUE_CID_SELF; in _qed_eth_queue_to_cid()
227 p_cid->abs = p_cid->rel; in _qed_eth_queue_to_cid()
235 rc = qed_fw_vport(p_hwfn, p_cid->rel.vport_id, &p_cid->abs.vport_id); in _qed_eth_queue_to_cid()
239 rc = qed_fw_l2_queue(p_hwfn, p_cid->rel.queue_id, &p_cid->abs.queue_id); in _qed_eth_queue_to_cid()
246 if (p_cid->vfid == QED_QUEUE_CID_SELF) { in _qed_eth_queue_to_cid()
247 rc = qed_fw_vport(p_hwfn, p_cid->rel.stats_id, in _qed_eth_queue_to_cid()
248 &p_cid->abs.stats_id); in _qed_eth_queue_to_cid()
252 p_cid->abs.stats_id = p_cid->rel.stats_id; in _qed_eth_queue_to_cid()
260 if (!qed_eth_queue_qid_usage_add(p_hwfn, p_cid)) in _qed_eth_queue_to_cid()
263 p_cid->qid_usage_idx = p_vf_params->qid_usage_idx; in _qed_eth_queue_to_cid()
269 p_cid->opaque_fid, in _qed_eth_queue_to_cid()
270 p_cid->cid, in _qed_eth_queue_to_cid()
271 p_cid->rel.vport_id, in _qed_eth_queue_to_cid()
272 p_cid->abs.vport_id, in _qed_eth_queue_to_cid()
273 p_cid->rel.queue_id, in _qed_eth_queue_to_cid()
274 p_cid->qid_usage_idx, in _qed_eth_queue_to_cid()
275 p_cid->abs.queue_id, in _qed_eth_queue_to_cid()
276 p_cid->rel.stats_id, in _qed_eth_queue_to_cid()
277 p_cid->abs.stats_id, p_cid->sb_igu_id, p_cid->sb_idx); in _qed_eth_queue_to_cid()
279 return p_cid; in _qed_eth_queue_to_cid()
282 vfree(p_cid); in _qed_eth_queue_to_cid()
293 struct qed_queue_cid *p_cid; in qed_eth_queue_to_cid() local
323 p_cid = _qed_eth_queue_to_cid(p_hwfn, opaque_fid, cid, in qed_eth_queue_to_cid()
325 if (!p_cid && IS_PF(p_hwfn->cdev) && !b_legacy_vf) in qed_eth_queue_to_cid()
328 return p_cid; in qed_eth_queue_to_cid()
840 struct qed_queue_cid *p_cid, in qed_eth_rxq_start_ramrod() argument
852 p_cid->opaque_fid, p_cid->cid, in qed_eth_rxq_start_ramrod()
853 p_cid->abs.queue_id, p_cid->abs.vport_id, p_cid->sb_igu_id); in qed_eth_rxq_start_ramrod()
857 init_data.cid = p_cid->cid; in qed_eth_rxq_start_ramrod()
858 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_rxq_start_ramrod()
869 p_ramrod->sb_id = cpu_to_le16(p_cid->sb_igu_id); in qed_eth_rxq_start_ramrod()
870 p_ramrod->sb_index = p_cid->sb_idx; in qed_eth_rxq_start_ramrod()
871 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_rxq_start_ramrod()
872 p_ramrod->stats_counter_id = p_cid->abs.stats_id; in qed_eth_rxq_start_ramrod()
873 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_rxq_start_ramrod()
883 if (p_cid->vfid != QED_QUEUE_CID_SELF) { in qed_eth_rxq_start_ramrod()
884 bool b_legacy_vf = !!(p_cid->vf_legacy & in qed_eth_rxq_start_ramrod()
887 p_ramrod->vf_rx_prod_index = p_cid->vf_qid; in qed_eth_rxq_start_ramrod()
890 b_legacy_vf ? " [legacy]" : "", p_cid->vf_qid); in qed_eth_rxq_start_ramrod()
899 struct qed_queue_cid *p_cid, in qed_eth_pf_rx_queue_start() argument
910 MSTORM_ETH_PF_PRODS, p_cid->abs.queue_id); in qed_eth_pf_rx_queue_start()
916 return qed_eth_rxq_start_ramrod(p_hwfn, p_cid, in qed_eth_pf_rx_queue_start()
932 struct qed_queue_cid *p_cid; in qed_eth_rx_queue_start() local
936 p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, true, p_params); in qed_eth_rx_queue_start()
937 if (!p_cid) in qed_eth_rx_queue_start()
941 rc = qed_eth_pf_rx_queue_start(p_hwfn, p_cid, in qed_eth_rx_queue_start()
947 rc = qed_vf_pf_rxq_start(p_hwfn, p_cid, in qed_eth_rx_queue_start()
956 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_rx_queue_start()
958 p_ret_params->p_handle = (void *)p_cid; in qed_eth_rx_queue_start()
974 struct qed_queue_cid *p_cid; in qed_sp_eth_rx_queues_update() local
983 p_cid = ((struct qed_queue_cid **)pp_rxq_handles)[i]; in qed_sp_eth_rx_queues_update()
986 init_data.cid = p_cid->cid; in qed_sp_eth_rx_queues_update()
987 init_data.opaque_fid = p_cid->opaque_fid; in qed_sp_eth_rx_queues_update()
996 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_sp_eth_rx_queues_update()
998 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_sp_eth_rx_queues_update()
1012 struct qed_queue_cid *p_cid, in qed_eth_pf_rx_queue_stop() argument
1021 init_data.cid = p_cid->cid; in qed_eth_pf_rx_queue_stop()
1022 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_pf_rx_queue_stop()
1032 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_pf_rx_queue_stop()
1033 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_pf_rx_queue_stop()
1038 p_ramrod->complete_cqe_flg = ((p_cid->vfid == QED_QUEUE_CID_SELF) && in qed_eth_pf_rx_queue_stop()
1041 p_ramrod->complete_event_flg = (p_cid->vfid != QED_QUEUE_CID_SELF) || in qed_eth_pf_rx_queue_stop()
1051 struct qed_queue_cid *p_cid = (struct qed_queue_cid *)p_rxq; in qed_eth_rx_queue_stop() local
1055 rc = qed_eth_pf_rx_queue_stop(p_hwfn, p_cid, in qed_eth_rx_queue_stop()
1059 rc = qed_vf_pf_rxq_stop(p_hwfn, p_cid, cqe_completion); in qed_eth_rx_queue_stop()
1062 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_rx_queue_stop()
1068 struct qed_queue_cid *p_cid, in qed_eth_txq_start_ramrod() argument
1078 init_data.cid = p_cid->cid; in qed_eth_txq_start_ramrod()
1079 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_txq_start_ramrod()
1089 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_txq_start_ramrod()
1091 p_ramrod->sb_id = cpu_to_le16(p_cid->sb_igu_id); in qed_eth_txq_start_ramrod()
1092 p_ramrod->sb_index = p_cid->sb_idx; in qed_eth_txq_start_ramrod()
1093 p_ramrod->stats_counter_id = p_cid->abs.stats_id; in qed_eth_txq_start_ramrod()
1095 p_ramrod->queue_zone_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_txq_start_ramrod()
1096 p_ramrod->same_as_last_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_txq_start_ramrod()
1108 struct qed_queue_cid *p_cid, in qed_eth_pf_tx_queue_start() argument
1115 rc = qed_eth_txq_start_ramrod(p_hwfn, p_cid, in qed_eth_pf_tx_queue_start()
1123 qed_db_addr(p_cid->cid, DQ_DEMS_LEGACY); in qed_eth_pf_tx_queue_start()
1137 struct qed_queue_cid *p_cid; in qed_eth_tx_queue_start() local
1140 p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, false, p_params); in qed_eth_tx_queue_start()
1141 if (!p_cid) in qed_eth_tx_queue_start()
1145 rc = qed_eth_pf_tx_queue_start(p_hwfn, p_cid, tc, in qed_eth_tx_queue_start()
1149 rc = qed_vf_pf_txq_start(p_hwfn, p_cid, in qed_eth_tx_queue_start()
1154 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_tx_queue_start()
1156 p_ret_params->p_handle = (void *)p_cid; in qed_eth_tx_queue_start()
1162 qed_eth_pf_tx_queue_stop(struct qed_hwfn *p_hwfn, struct qed_queue_cid *p_cid) in qed_eth_pf_tx_queue_stop() argument
1169 init_data.cid = p_cid->cid; in qed_eth_pf_tx_queue_stop()
1170 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_pf_tx_queue_stop()
1184 struct qed_queue_cid *p_cid = (struct qed_queue_cid *)p_handle; in qed_eth_tx_queue_stop() local
1188 rc = qed_eth_pf_tx_queue_stop(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1190 rc = qed_vf_pf_txq_stop(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1193 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
2093 struct qed_queue_cid *p_cid, u16 *p_rx_coal) in qed_get_rxq_coalesce() argument
2101 p_cid->sb_igu_id * sizeof(u64), in qed_get_rxq_coalesce()
2112 USTORM_ETH_QUEUE_ZONE_GTT_OFFSET(p_cid->abs.queue_id); in qed_get_rxq_coalesce()
2127 struct qed_queue_cid *p_cid, u16 *p_tx_coal) in qed_get_txq_coalesce() argument
2135 p_cid->sb_igu_id * sizeof(u64), in qed_get_txq_coalesce()
2146 XSTORM_ETH_QUEUE_ZONE_GTT_OFFSET(p_cid->abs.queue_id); in qed_get_txq_coalesce()
2161 struct qed_queue_cid *p_cid = handle; in qed_get_queue_coalesce() local
2166 rc = qed_vf_pf_get_coalesce(p_hwfn, p_coal, p_cid); in qed_get_queue_coalesce()
2177 if (p_cid->b_is_rx) { in qed_get_queue_coalesce()
2178 rc = qed_get_rxq_coalesce(p_hwfn, p_ptt, p_cid, p_coal); in qed_get_queue_coalesce()
2182 rc = qed_get_txq_coalesce(p_hwfn, p_ptt, p_cid, p_coal); in qed_get_queue_coalesce()
2840 struct qed_queue_cid *p_cid = handle; in qed_get_coalesce() local
2844 p_hwfn = p_cid->p_owner; in qed_get_coalesce()