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()
839 struct qed_queue_cid *p_cid, in qed_eth_rxq_start_ramrod() argument
851 p_cid->opaque_fid, p_cid->cid, in qed_eth_rxq_start_ramrod()
852 p_cid->abs.queue_id, p_cid->abs.vport_id, p_cid->sb_igu_id); in qed_eth_rxq_start_ramrod()
856 init_data.cid = p_cid->cid; in qed_eth_rxq_start_ramrod()
857 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_rxq_start_ramrod()
868 p_ramrod->sb_id = cpu_to_le16(p_cid->sb_igu_id); in qed_eth_rxq_start_ramrod()
869 p_ramrod->sb_index = p_cid->sb_idx; in qed_eth_rxq_start_ramrod()
870 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_rxq_start_ramrod()
871 p_ramrod->stats_counter_id = p_cid->abs.stats_id; in qed_eth_rxq_start_ramrod()
872 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_rxq_start_ramrod()
882 if (p_cid->vfid != QED_QUEUE_CID_SELF) { in qed_eth_rxq_start_ramrod()
883 bool b_legacy_vf = !!(p_cid->vf_legacy & in qed_eth_rxq_start_ramrod()
886 p_ramrod->vf_rx_prod_index = p_cid->vf_qid; in qed_eth_rxq_start_ramrod()
889 b_legacy_vf ? " [legacy]" : "", p_cid->vf_qid); in qed_eth_rxq_start_ramrod()
898 struct qed_queue_cid *p_cid, in qed_eth_pf_rx_queue_start() argument
908 MSTORM_ETH_PF_PRODS_OFFSET(p_cid->abs.queue_id); in qed_eth_pf_rx_queue_start()
914 return qed_eth_rxq_start_ramrod(p_hwfn, p_cid, in qed_eth_pf_rx_queue_start()
930 struct qed_queue_cid *p_cid; in qed_eth_rx_queue_start() local
934 p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, true, p_params); in qed_eth_rx_queue_start()
935 if (!p_cid) in qed_eth_rx_queue_start()
939 rc = qed_eth_pf_rx_queue_start(p_hwfn, p_cid, in qed_eth_rx_queue_start()
945 rc = qed_vf_pf_rxq_start(p_hwfn, p_cid, in qed_eth_rx_queue_start()
954 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_rx_queue_start()
956 p_ret_params->p_handle = (void *)p_cid; in qed_eth_rx_queue_start()
972 struct qed_queue_cid *p_cid; in qed_sp_eth_rx_queues_update() local
981 p_cid = ((struct qed_queue_cid **)pp_rxq_handles)[i]; in qed_sp_eth_rx_queues_update()
984 init_data.cid = p_cid->cid; in qed_sp_eth_rx_queues_update()
985 init_data.opaque_fid = p_cid->opaque_fid; in qed_sp_eth_rx_queues_update()
994 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_sp_eth_rx_queues_update()
996 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_sp_eth_rx_queues_update()
1010 struct qed_queue_cid *p_cid, in qed_eth_pf_rx_queue_stop() argument
1019 init_data.cid = p_cid->cid; in qed_eth_pf_rx_queue_stop()
1020 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_pf_rx_queue_stop()
1030 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_pf_rx_queue_stop()
1031 p_ramrod->rx_queue_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_pf_rx_queue_stop()
1036 p_ramrod->complete_cqe_flg = ((p_cid->vfid == QED_QUEUE_CID_SELF) && in qed_eth_pf_rx_queue_stop()
1039 p_ramrod->complete_event_flg = (p_cid->vfid != QED_QUEUE_CID_SELF) || in qed_eth_pf_rx_queue_stop()
1049 struct qed_queue_cid *p_cid = (struct qed_queue_cid *)p_rxq; in qed_eth_rx_queue_stop() local
1053 rc = qed_eth_pf_rx_queue_stop(p_hwfn, p_cid, in qed_eth_rx_queue_stop()
1057 rc = qed_vf_pf_rxq_stop(p_hwfn, p_cid, cqe_completion); in qed_eth_rx_queue_stop()
1060 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_rx_queue_stop()
1066 struct qed_queue_cid *p_cid, in qed_eth_txq_start_ramrod() argument
1076 init_data.cid = p_cid->cid; in qed_eth_txq_start_ramrod()
1077 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_txq_start_ramrod()
1087 p_ramrod->vport_id = p_cid->abs.vport_id; in qed_eth_txq_start_ramrod()
1089 p_ramrod->sb_id = cpu_to_le16(p_cid->sb_igu_id); in qed_eth_txq_start_ramrod()
1090 p_ramrod->sb_index = p_cid->sb_idx; in qed_eth_txq_start_ramrod()
1091 p_ramrod->stats_counter_id = p_cid->abs.stats_id; in qed_eth_txq_start_ramrod()
1093 p_ramrod->queue_zone_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_txq_start_ramrod()
1094 p_ramrod->same_as_last_id = cpu_to_le16(p_cid->abs.queue_id); in qed_eth_txq_start_ramrod()
1106 struct qed_queue_cid *p_cid, in qed_eth_pf_tx_queue_start() argument
1114 rc = qed_eth_txq_start_ramrod(p_hwfn, p_cid, in qed_eth_pf_tx_queue_start()
1122 qed_db_addr(p_cid->cid, DQ_DEMS_LEGACY); in qed_eth_pf_tx_queue_start()
1136 struct qed_queue_cid *p_cid; in qed_eth_tx_queue_start() local
1139 p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, false, p_params); in qed_eth_tx_queue_start()
1140 if (!p_cid) in qed_eth_tx_queue_start()
1144 rc = qed_eth_pf_tx_queue_start(p_hwfn, p_cid, tc, in qed_eth_tx_queue_start()
1148 rc = qed_vf_pf_txq_start(p_hwfn, p_cid, in qed_eth_tx_queue_start()
1153 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_tx_queue_start()
1155 p_ret_params->p_handle = (void *)p_cid; in qed_eth_tx_queue_start()
1161 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
1168 init_data.cid = p_cid->cid; in qed_eth_pf_tx_queue_stop()
1169 init_data.opaque_fid = p_cid->opaque_fid; in qed_eth_pf_tx_queue_stop()
1183 struct qed_queue_cid *p_cid = (struct qed_queue_cid *)p_handle; in qed_eth_tx_queue_stop() local
1187 rc = qed_eth_pf_tx_queue_stop(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1189 rc = qed_vf_pf_txq_stop(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1192 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
2083 struct qed_queue_cid *p_cid, u16 *p_rx_coal) in qed_get_rxq_coalesce() argument
2091 p_cid->sb_igu_id * sizeof(u64), in qed_get_rxq_coalesce()
2102 USTORM_ETH_QUEUE_ZONE_OFFSET(p_cid->abs.queue_id); in qed_get_rxq_coalesce()
2117 struct qed_queue_cid *p_cid, u16 *p_tx_coal) in qed_get_txq_coalesce() argument
2125 p_cid->sb_igu_id * sizeof(u64), in qed_get_txq_coalesce()
2136 XSTORM_ETH_QUEUE_ZONE_OFFSET(p_cid->abs.queue_id); in qed_get_txq_coalesce()
2151 struct qed_queue_cid *p_cid = handle; in qed_get_queue_coalesce() local
2156 rc = qed_vf_pf_get_coalesce(p_hwfn, p_coal, p_cid); in qed_get_queue_coalesce()
2167 if (p_cid->b_is_rx) { in qed_get_queue_coalesce()
2168 rc = qed_get_rxq_coalesce(p_hwfn, p_ptt, p_cid, p_coal); in qed_get_queue_coalesce()
2172 rc = qed_get_txq_coalesce(p_hwfn, p_ptt, p_cid, p_coal); in qed_get_queue_coalesce()
2849 struct qed_queue_cid *p_cid = handle; in qed_get_coalesce() local
2853 p_hwfn = p_cid->p_owner; in qed_get_coalesce()