Lines Matching refs:p_cid

152 					struct qed_queue_cid *p_cid)  in qed_eth_queue_qid_usage_add()  argument
155 u16 queue_id = p_cid->rel.queue_id; in qed_eth_queue_qid_usage_add()
177 p_cid->qid_usage_idx = first; in qed_eth_queue_qid_usage_add()
185 struct qed_queue_cid *p_cid) in qed_eth_queue_qid_usage_del() argument
189 clear_bit(p_cid->qid_usage_idx, in qed_eth_queue_qid_usage_del()
190 p_hwfn->p_l2_info->pp_qid_usage[p_cid->rel.queue_id]); in qed_eth_queue_qid_usage_del()
196 struct qed_queue_cid *p_cid) in qed_eth_queue_cid_release() argument
198 bool b_legacy_vf = !!(p_cid->vf_legacy & QED_QCID_LEGACY_VF_CID); in qed_eth_queue_cid_release()
201 _qed_cxt_release_cid(p_hwfn, p_cid->cid, p_cid->vfid); in qed_eth_queue_cid_release()
204 if (p_cid->vfid == QED_QUEUE_CID_SELF) in qed_eth_queue_cid_release()
205 qed_eth_queue_qid_usage_del(p_hwfn, p_cid); in qed_eth_queue_cid_release()
207 vfree(p_cid); in qed_eth_queue_cid_release()
221 struct qed_queue_cid *p_cid; in _qed_eth_queue_to_cid() local
224 p_cid = vzalloc(sizeof(*p_cid)); in _qed_eth_queue_to_cid()
225 if (!p_cid) in _qed_eth_queue_to_cid()
228 p_cid->opaque_fid = opaque_fid; in _qed_eth_queue_to_cid()
229 p_cid->cid = cid; in _qed_eth_queue_to_cid()
230 p_cid->p_owner = p_hwfn; in _qed_eth_queue_to_cid()
233 p_cid->rel.vport_id = p_params->vport_id; in _qed_eth_queue_to_cid()
234 p_cid->rel.queue_id = p_params->queue_id; in _qed_eth_queue_to_cid()
235 p_cid->rel.stats_id = p_params->stats_id; in _qed_eth_queue_to_cid()
236 p_cid->sb_igu_id = p_params->p_sb->igu_sb_id; in _qed_eth_queue_to_cid()
237 p_cid->b_is_rx = b_is_rx; in _qed_eth_queue_to_cid()
238 p_cid->sb_idx = p_params->sb_idx; in _qed_eth_queue_to_cid()
242 p_cid->vfid = p_vf_params->vfid; in _qed_eth_queue_to_cid()
243 p_cid->vf_qid = p_vf_params->vf_qid; in _qed_eth_queue_to_cid()
244 p_cid->vf_legacy = p_vf_params->vf_legacy; in _qed_eth_queue_to_cid()
246 p_cid->vfid = QED_QUEUE_CID_SELF; in _qed_eth_queue_to_cid()
251 p_cid->abs = p_cid->rel; in _qed_eth_queue_to_cid()
259 rc = qed_fw_vport(p_hwfn, p_cid->rel.vport_id, &p_cid->abs.vport_id); in _qed_eth_queue_to_cid()
263 rc = qed_fw_l2_queue(p_hwfn, p_cid->rel.queue_id, &p_cid->abs.queue_id); in _qed_eth_queue_to_cid()
270 if (p_cid->vfid == QED_QUEUE_CID_SELF) { in _qed_eth_queue_to_cid()
271 rc = qed_fw_vport(p_hwfn, p_cid->rel.stats_id, in _qed_eth_queue_to_cid()
272 &p_cid->abs.stats_id); in _qed_eth_queue_to_cid()
276 p_cid->abs.stats_id = p_cid->rel.stats_id; in _qed_eth_queue_to_cid()
284 if (!qed_eth_queue_qid_usage_add(p_hwfn, p_cid)) in _qed_eth_queue_to_cid()
287 p_cid->qid_usage_idx = p_vf_params->qid_usage_idx; in _qed_eth_queue_to_cid()
293 p_cid->opaque_fid, in _qed_eth_queue_to_cid()
294 p_cid->cid, in _qed_eth_queue_to_cid()
295 p_cid->rel.vport_id, in _qed_eth_queue_to_cid()
296 p_cid->abs.vport_id, in _qed_eth_queue_to_cid()
297 p_cid->rel.queue_id, in _qed_eth_queue_to_cid()
298 p_cid->qid_usage_idx, in _qed_eth_queue_to_cid()
299 p_cid->abs.queue_id, in _qed_eth_queue_to_cid()
300 p_cid->rel.stats_id, in _qed_eth_queue_to_cid()
301 p_cid->abs.stats_id, p_cid->sb_igu_id, p_cid->sb_idx); in _qed_eth_queue_to_cid()
303 return p_cid; in _qed_eth_queue_to_cid()
306 vfree(p_cid); in _qed_eth_queue_to_cid()
317 struct qed_queue_cid *p_cid; in qed_eth_queue_to_cid() local
347 p_cid = _qed_eth_queue_to_cid(p_hwfn, opaque_fid, cid, in qed_eth_queue_to_cid()
349 if (!p_cid && IS_PF(p_hwfn->cdev) && !b_legacy_vf) in qed_eth_queue_to_cid()
352 return p_cid; in qed_eth_queue_to_cid()
852 struct qed_queue_cid *p_cid, in qed_eth_rxq_start_ramrod() argument
864 p_cid->opaque_fid, p_cid->cid, in qed_eth_rxq_start_ramrod()
865 p_cid->abs.queue_id, p_cid->abs.vport_id, p_cid->sb_igu_id); in qed_eth_rxq_start_ramrod()
869 init_data.cid = p_cid->cid; in qed_eth_rxq_start_ramrod()
870 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_rxq_start_ramrod()
881 p_ramrod->sb_id = cpu_to_le16(p_cid->sb_igu_id); in qed_eth_rxq_start_ramrod()
882 p_ramrod->sb_index = p_cid->sb_idx; in qed_eth_rxq_start_ramrod()
883 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_rxq_start_ramrod()
884 p_ramrod->stats_counter_id = p_cid->abs.stats_id; in qed_eth_rxq_start_ramrod()
885 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_rxq_start_ramrod()
895 if (p_cid->vfid != QED_QUEUE_CID_SELF) { in qed_eth_rxq_start_ramrod()
896 bool b_legacy_vf = !!(p_cid->vf_legacy & in qed_eth_rxq_start_ramrod()
899 p_ramrod->vf_rx_prod_index = p_cid->vf_qid; in qed_eth_rxq_start_ramrod()
902 b_legacy_vf ? " [legacy]" : "", p_cid->vf_qid); in qed_eth_rxq_start_ramrod()
911 struct qed_queue_cid *p_cid, in qed_eth_pf_rx_queue_start() argument
921 MSTORM_ETH_PF_PRODS_OFFSET(p_cid->abs.queue_id); in qed_eth_pf_rx_queue_start()
927 return qed_eth_rxq_start_ramrod(p_hwfn, p_cid, in qed_eth_pf_rx_queue_start()
943 struct qed_queue_cid *p_cid; in qed_eth_rx_queue_start() local
947 p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, true, p_params); in qed_eth_rx_queue_start()
948 if (!p_cid) in qed_eth_rx_queue_start()
952 rc = qed_eth_pf_rx_queue_start(p_hwfn, p_cid, in qed_eth_rx_queue_start()
958 rc = qed_vf_pf_rxq_start(p_hwfn, p_cid, in qed_eth_rx_queue_start()
967 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_rx_queue_start()
969 p_ret_params->p_handle = (void *)p_cid; in qed_eth_rx_queue_start()
985 struct qed_queue_cid *p_cid; in qed_sp_eth_rx_queues_update() local
994 p_cid = ((struct qed_queue_cid **)pp_rxq_handles)[i]; in qed_sp_eth_rx_queues_update()
997 init_data.cid = p_cid->cid; in qed_sp_eth_rx_queues_update()
998 init_data.opaque_fid = p_cid->opaque_fid; in qed_sp_eth_rx_queues_update()
1007 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_sp_eth_rx_queues_update()
1009 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_sp_eth_rx_queues_update()
1023 struct qed_queue_cid *p_cid, in qed_eth_pf_rx_queue_stop() argument
1032 init_data.cid = p_cid->cid; in qed_eth_pf_rx_queue_stop()
1033 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_pf_rx_queue_stop()
1043 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_pf_rx_queue_stop()
1044 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_pf_rx_queue_stop()
1049 p_ramrod->complete_cqe_flg = ((p_cid->vfid == QED_QUEUE_CID_SELF) && in qed_eth_pf_rx_queue_stop()
1052 p_ramrod->complete_event_flg = (p_cid->vfid != QED_QUEUE_CID_SELF) || in qed_eth_pf_rx_queue_stop()
1062 struct qed_queue_cid *p_cid = (struct qed_queue_cid *)p_rxq; in qed_eth_rx_queue_stop() local
1066 rc = qed_eth_pf_rx_queue_stop(p_hwfn, p_cid, in qed_eth_rx_queue_stop()
1070 rc = qed_vf_pf_rxq_stop(p_hwfn, p_cid, cqe_completion); in qed_eth_rx_queue_stop()
1073 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_rx_queue_stop()
1079 struct qed_queue_cid *p_cid, in qed_eth_txq_start_ramrod() argument
1089 init_data.cid = p_cid->cid; in qed_eth_txq_start_ramrod()
1090 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_txq_start_ramrod()
1100 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_txq_start_ramrod()
1102 p_ramrod->sb_id = cpu_to_le16(p_cid->sb_igu_id); in qed_eth_txq_start_ramrod()
1103 p_ramrod->sb_index = p_cid->sb_idx; in qed_eth_txq_start_ramrod()
1104 p_ramrod->stats_counter_id = p_cid->abs.stats_id; in qed_eth_txq_start_ramrod()
1106 p_ramrod->queue_zone_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_txq_start_ramrod()
1107 p_ramrod->same_as_last_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_txq_start_ramrod()
1119 struct qed_queue_cid *p_cid, in qed_eth_pf_tx_queue_start() argument
1127 rc = qed_eth_txq_start_ramrod(p_hwfn, p_cid, in qed_eth_pf_tx_queue_start()
1135 qed_db_addr(p_cid->cid, DQ_DEMS_LEGACY); in qed_eth_pf_tx_queue_start()
1149 struct qed_queue_cid *p_cid; in qed_eth_tx_queue_start() local
1152 p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, false, p_params); in qed_eth_tx_queue_start()
1153 if (!p_cid) in qed_eth_tx_queue_start()
1157 rc = qed_eth_pf_tx_queue_start(p_hwfn, p_cid, tc, in qed_eth_tx_queue_start()
1161 rc = qed_vf_pf_txq_start(p_hwfn, p_cid, in qed_eth_tx_queue_start()
1166 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_tx_queue_start()
1168 p_ret_params->p_handle = (void *)p_cid; in qed_eth_tx_queue_start()
1174 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
1181 init_data.cid = p_cid->cid; in qed_eth_pf_tx_queue_stop()
1182 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_pf_tx_queue_stop()
1196 struct qed_queue_cid *p_cid = (struct qed_queue_cid *)p_handle; in qed_eth_tx_queue_stop() local
1200 rc = qed_eth_pf_tx_queue_stop(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1202 rc = qed_vf_pf_txq_stop(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1205 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
2090 struct qed_queue_cid *p_cid, u16 *p_rx_coal) in qed_get_rxq_coalesce() argument
2098 p_cid->sb_igu_id * sizeof(u64), in qed_get_rxq_coalesce()
2108 USTORM_ETH_QUEUE_ZONE_OFFSET(p_cid->abs.queue_id); in qed_get_rxq_coalesce()
2123 struct qed_queue_cid *p_cid, u16 *p_tx_coal) in qed_get_txq_coalesce() argument
2131 p_cid->sb_igu_id * sizeof(u64), in qed_get_txq_coalesce()
2141 XSTORM_ETH_QUEUE_ZONE_OFFSET(p_cid->abs.queue_id); in qed_get_txq_coalesce()
2156 struct qed_queue_cid *p_cid = handle; in qed_get_queue_coalesce() local
2161 rc = qed_vf_pf_get_coalesce(p_hwfn, p_coal, p_cid); in qed_get_queue_coalesce()
2172 if (p_cid->b_is_rx) { in qed_get_queue_coalesce()
2173 rc = qed_get_rxq_coalesce(p_hwfn, p_ptt, p_cid, p_coal); in qed_get_queue_coalesce()
2177 rc = qed_get_txq_coalesce(p_hwfn, p_ptt, p_cid, p_coal); in qed_get_queue_coalesce()
2852 struct qed_queue_cid *p_cid = handle; in qed_get_coalesce() local
2856 p_hwfn = p_cid->p_owner; in qed_get_coalesce()