| /linux/drivers/infiniband/hw/mthca/ |
| H A D | mthca_cq.c | 174 static inline struct mthca_cqe *cqe_sw(struct mthca_cqe *cqe) in cqe_sw() argument 176 return MTHCA_CQ_ENTRY_OWNER_HW & cqe->owner ? NULL : cqe; in cqe_sw() 181 return cqe_sw(get_cqe(cq, cq->cons_index & cq->ibcq.cqe)); in next_cqe_sw() 184 static inline void set_cqe_hw(struct mthca_cqe *cqe) in set_cqe_hw() argument 186 cqe->owner = MTHCA_CQ_ENTRY_OWNER_HW; in set_cqe_hw() 191 __be32 *cqe = cqe_ptr; in dump_cqe() local 193 (void) cqe; /* avoid warning if mthca_dbg compiled away... */ in dump_cqe() 194 mthca_dbg(dev, "CQE contents %08x %08x %08x %08x %08x %08x %08x %08x\n", in dump_cqe() 195 be32_to_cpu(cqe[0]), be32_to_cpu(cqe[1]), be32_to_cpu(cqe[2]), in dump_cqe() 196 be32_to_cpu(cqe[3]), be32_to_cpu(cqe[4]), be32_to_cpu(cqe[5]), in dump_cqe() [all …]
|
| /linux/drivers/infiniband/sw/siw/ |
| H A D | siw_cq.c | 44 * Reap one CQE from the CQ. Only used by kernel clients 46 * flush for user mapped CQE array as well. 50 struct siw_cqe *cqe; in siw_reap_cqe() local 55 cqe = &cq->queue[cq->cq_get % cq->num_cqe]; in siw_reap_cqe() 56 if (READ_ONCE(cqe->flags) & SIW_WQE_VALID) { in siw_reap_cqe() 58 wc->wr_id = cqe->id; in siw_reap_cqe() 59 wc->byte_len = cqe->bytes; in siw_reap_cqe() 62 * During CQ flush, also user land CQE's may get in siw_reap_cqe() 67 if (cqe->flags & SIW_WQE_REM_INVAL) { in siw_reap_cqe() 68 wc->ex.invalidate_rkey = cqe->inval_stag; in siw_reap_cqe() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | pci_hw.h | 116 static inline u32 mlxsw_pci_cqe_##name##_get(enum mlxsw_pci_cqe_v v, char *cqe) \ 121 return mlxsw_pci_cqe##v0##_##name##_get(cqe); \ 123 return mlxsw_pci_cqe##v1##_##name##_get(cqe); \ 125 return mlxsw_pci_cqe##v2##_##name##_get(cqe); \ 129 char *cqe, u32 val) \ 134 mlxsw_pci_cqe##v0##_##name##_set(cqe, val); \ 137 mlxsw_pci_cqe##v1##_##name##_set(cqe, val); \ 140 mlxsw_pci_cqe##v2##_##name##_set(cqe, val); \ 158 MLXSW_ITEM32(pci, cqe, system_port, 0x00, 0, 16); 169 MLXSW_ITEM32(pci, cqe, wqe_counter, 0x04, 16, 16); [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | io_uring_zerocopy_tx.c | 97 struct io_uring_cqe *cqe; in do_tx() local 157 ret = io_uring_wait_cqe(&ring, &cqe); in do_tx() 159 error(1, -ret, "wait cqe"); in do_tx() 161 if (cqe->user_data != NONZC_TAG && in do_tx() 162 cqe->user_data != ZC_TAG) in do_tx() 163 error(1, EINVAL, "invalid cqe->user_data"); in do_tx() 165 if (cqe->flags & IORING_CQE_F_NOTIF) { in do_tx() 166 if (cqe->flags & IORING_CQE_F_MORE) in do_tx() 175 if (cqe->flags & IORING_CQE_F_MORE) { in do_tx() 176 if (cqe in do_tx() [all...] |
| /linux/drivers/scsi/qedi/ |
| H A D | qedi_fw.c | 31 union iscsi_cqe *cqe, in qedi_process_logout_resp() argument 42 cqe_logout_response = &cqe->cqe_common.iscsi_hdr.logout_response; in qedi_process_logout_resp() 50 resp_hdr->itt = build_itt(cqe->cqe_solicited.itid, conn->session->age); in qedi_process_logout_resp() 82 union iscsi_cqe *cqe, in qedi_process_text_resp() argument 97 cqe_text_response = &cqe->cqe_common.iscsi_hdr.text_response; in qedi_process_text_resp() 109 resp_hdr_ptr->itt = build_itt(cqe->cqe_solicited.itid, in qedi_process_text_resp() 178 union iscsi_cqe *cqe, in qedi_process_tmf_resp() argument 190 cqe_tmp_response = &cqe->cqe_common.iscsi_hdr.tmf_response; in qedi_process_tmf_resp() 214 resp_hdr_ptr->itt = build_itt(cqe->cqe_solicited.itid, in qedi_process_tmf_resp() 258 union iscsi_cqe *cqe, in qedi_process_login_resp() argument [all …]
|
| /linux/include/trace/events/ |
| H A D | io_uring.h | 124 __entry->user_data = req->cqe.user_data; 161 __entry->user_data = req->cqe.user_data; 202 __entry->data = req->cqe.user_data; 246 * io_uring_cqring_wait - called before start waiting for an available CQE 251 * Allows to track waiting for CQE, so that we can e.g. troubleshoot 302 __entry->user_data = req->cqe.user_data; 319 * @cqe: pointer to the filled in CQE being posted 323 TP_PROTO(struct io_ring_ctx *ctx, void *req, struct io_uring_cqe *cqe), 325 TP_ARGS(ctx, req, cqe), 340 __entry->user_data = cqe->user_data; [all …]
|
| /linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
| H A D | otx2_txrx.c | 42 struct nix_cqe_rx_s *cqe, 107 struct nix_cqe_tx_s *cqe, in otx2_xdp_snd_pkt_handler() argument 110 struct nix_send_comp_s *snd_comp = &cqe->comp; in otx2_xdp_snd_pkt_handler() 128 struct nix_cqe_tx_s *cqe, in otx2_snd_pkt_handler() argument 131 struct nix_send_comp_s *snd_comp = &cqe->comp; in otx2_snd_pkt_handler() 225 struct nix_cqe_rx_s *cqe, struct sk_buff *skb) in otx2_set_rxhash() argument 241 hash = cqe->hdr.flow_tag; in otx2_set_rxhash() 246 static void otx2_free_rcv_seg(struct otx2_nic *pfvf, struct nix_cqe_rx_s *cqe, in otx2_free_rcv_seg() argument 249 struct nix_rx_sg_s *sg = &cqe->sg; in otx2_free_rcv_seg() 255 end = start + ((cqe->parse.desc_sizem1 + 1) * 16); in otx2_free_rcv_seg() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx4/ |
| H A D | en_rx.c | 594 * the (IPv4 | IPv6) bits are set in cqe->status. 596 static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, void *va, in check_csum() argument 602 /* CQE csum doesn't cover padding octets in short ethernet in check_csum() 614 hw_checksum = csum_unfold((__force __sum16)cqe->checksum); in check_csum() 616 if (cqe->vlan_my_qpn & cpu_to_be32(MLX4_CQE_CVLAN_PRESENT_MASK) && in check_csum() 623 if (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV6)) in check_csum() 637 struct mlx4_cqe *cqe; member 651 mlx4_en_get_cqe_ts(_ctx->cqe)); in mlx4_en_xdp_rx_timestamp() 659 struct mlx4_cqe *cqe = _ctx->cqe; in mlx4_en_xdp_rx_hash() local 666 *hash = be32_to_cpu(cqe->immed_rss_invalid); in mlx4_en_xdp_rx_hash() [all …]
|
| /linux/drivers/scsi/bnx2i/ |
| H A D | bnx2i_hwi.c | 1125 /* Invalidate all EQ CQE index, req only for 57710 */ in bnx2i_alloc_qp_resc() 1239 * initialization. Firmware completes this handshake with a CQE carrying 1332 * @cqe: pointer to newly DMA'ed CQE entry for processing 1334 * process SCSI CMD Response CQE & complete the request to SCSI-ML 1338 struct cqe *cqe) in bnx2i_process_scsi_cmd_resp() argument 1348 resp_cqe = (struct bnx2i_cmd_response *)cqe; in bnx2i_process_scsi_cmd_resp() 1383 resp_cqe = (struct bnx2i_cmd_response *)cqe; in bnx2i_process_scsi_cmd_resp() 1429 * @cqe: pointer to newly DMA'ed CQE entry for processing 1431 * process Login Response CQE & complete it to open-iscsi user daemon 1435 struct cqe *cqe) in bnx2i_process_login_resp() argument [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/ |
| H A D | send.c | 379 struct mlx5_cqe64 *cqe) in hws_send_engine_dump_error_cqe() argument 381 u8 wqe_opcode = cqe ? be32_to_cpu(cqe->sop_drop_qpn) >> 24 : 0; in hws_send_engine_dump_error_cqe() 383 u32 opcode = cqe ? get_cqe_opcode(cqe) : 0; in hws_send_engine_dump_error_cqe() 388 * want to pollute dmesg. Print only the first bad cqe per engine, in hws_send_engine_dump_error_cqe() 418 if (!cqe) { in hws_send_engine_dump_error_cqe() 419 mlx5hws_err(ctx, " rule 0x%08llx: no CQE\n", in hws_send_engine_dump_error_cqe() 424 mlx5hws_err(ctx, " rule 0x%08llx: cqe->opcode = %d %s\n", in hws_send_engine_dump_error_cqe() 430 struct mlx5_err_cqe *err_cqe = (struct mlx5_err_cqe *)cqe; in hws_send_engine_dump_error_cqe() 455 " rule 0x%08llx: cqe->byte_cnt = 0x%08x\n", in hws_send_engine_dump_error_cqe() 456 HWS_PTR_TO_ID(rule), be32_to_cpu(cqe->byte_cnt)); in hws_send_engine_dump_error_cqe() [all …]
|
| /linux/drivers/net/ethernet/huawei/hinic/ |
| H A D | hinic_hw_qp.c | 324 cqe_size = wq->q_depth * sizeof(*rq->cqe); in alloc_rq_cqe() 325 rq->cqe = vzalloc(cqe_size); in alloc_rq_cqe() 326 if (!rq->cqe) in alloc_rq_cqe() 335 rq->cqe[i] = dma_alloc_coherent(&pdev->dev, in alloc_rq_cqe() 336 sizeof(*rq->cqe[i]), in alloc_rq_cqe() 338 if (!rq->cqe[i]) in alloc_rq_cqe() 346 dma_free_coherent(&pdev->dev, sizeof(*rq->cqe[j]), rq->cqe[j], in alloc_rq_cqe() 352 vfree(rq->cqe); in alloc_rq_cqe() 368 dma_free_coherent(&pdev->dev, sizeof(*rq->cqe[i]), rq->cqe[i], in free_rq_cqe() 372 vfree(rq->cqe); in free_rq_cqe() [all …]
|
| /linux/io_uring/ |
| H A D | cmd_net.c | 76 struct io_uring_cqe cqe[2]; in io_process_timestamp_skb() local 91 cqe->user_data = 0; in io_process_timestamp_skb() 92 cqe->res = tskey; in io_process_timestamp_skb() 93 cqe->flags = IORING_CQE_F_MORE | ctx_cqe32_flags(cmd_to_io_kiocb(cmd)->ctx); in io_process_timestamp_skb() 94 cqe->flags |= tstype << IORING_TIMESTAMP_TYPE_SHIFT; in io_process_timestamp_skb() 96 cqe->flags |= IORING_CQE_F_TSTAMP_HW; in io_process_timestamp_skb() 98 iots = (struct io_timespec *)&cqe[1]; in io_process_timestamp_skb() 101 return io_uring_cmd_post_mshot_cqe32(cmd, issue_flags, cqe); in io_process_timestamp_skb()
|
| H A D | io_uring.h | 233 * ->submitter_task may be NULL and we can still post a CQE, in io_lockdep_assert_cq_locked() 300 bool is_cqe32 = req->cqe.flags & IORING_CQE_F_32; in io_fill_cqe_req() 301 struct io_uring_cqe *cqe; in io_fill_cqe_req() local 307 if (unlikely(!io_get_cqe(ctx, &cqe, is_cqe32))) in io_fill_cqe_req() 310 memcpy(cqe, &req->cqe, sizeof(*cqe)); in io_fill_cqe_req() 312 memcpy(cqe->big_cqe, &req->big_cqe, sizeof(*cqe)); in io_fill_cqe_req() 317 trace_call__io_uring_complete(req->ctx, req, cqe); in io_fill_cqe_req() 332 req->cqe.res = res; in io_req_set_res() 333 req->cqe.flags = cflags; in io_req_set_res() 346 req->cqe.res = res; in io_req_set_res32() [all …]
|
| H A D | poll.c | 124 u32 index = hash_long(req->cqe.user_data, table->hash_bits); in io_poll_req_insert() 237 * require, which is either spurious wakeup or multishot CQE is served. 239 * req->cqe.res. IOU_POLL_REMOVE_POLL_USE_RES indicates to remove multishot 240 * poll and that the result is stored in req->cqe. 259 * cqe.res contains only events of the first wake up in io_poll_check_events() 264 req->cqe.res = 0; in io_poll_check_events() 267 req->cqe.res = 0; in io_poll_check_events() 280 if (!req->cqe.res) { in io_poll_check_events() 284 req->cqe.res = vfs_poll(req->file, &pt) & events; in io_poll_check_events() 291 if (unlikely(!req->cqe.res)) { in io_poll_check_events() [all …]
|
| /linux/tools/testing/selftests/ublk/ |
| H A D | batch.c | 319 const struct io_uring_cqe *cqe) in ublk_compl_batch_fetch() argument 321 unsigned short buf_idx = user_data_to_tag(cqe->user_data); in ublk_compl_batch_fetch() 323 unsigned end = start + cqe->res; in ublk_compl_batch_fetch() 327 if (cqe->res < 0) in ublk_compl_batch_fetch() 331 ublk_err("%s: fetch duplicated ios offset %u count %u\n", __func__, start, cqe->res); in ublk_compl_batch_fetch() 408 const struct io_uring_cqe *cqe, in ublk_batch_compl_commit_cmd() argument 411 unsigned short buf_idx = user_data_to_tag(cqe->user_data); in ublk_batch_compl_commit_cmd() 414 ublk_assert(cqe->res == 0); in ublk_batch_compl_commit_cmd() 416 int nr_elem = user_data_to_tgt_data(cqe->user_data); in ublk_batch_compl_commit_cmd() 418 ublk_assert(cqe->res == t->commit_buf_elem_size * nr_elem); in ublk_batch_compl_commit_cmd() [all …]
|
| H A D | fault_inject.c | 103 const struct io_uring_cqe *cqe) 105 unsigned tag = user_data_to_tag(cqe->user_data); 108 if (cqe->res != -ETIME) 109 ublk_err("%s: unexpected cqe res %d\n", __func__, cqe->res); 114 ublk_err("%s: io not complete after 1 cqe\n", __func__); 61 ublk_fault_inject_tgt_io_done(struct ublk_thread * t,struct ublk_queue * q,const struct io_uring_cqe * cqe) ublk_fault_inject_tgt_io_done() argument
|
| H A D | null.c | 95 const struct io_uring_cqe *cqe) in ublk_null_io_done() 97 unsigned tag = user_data_to_tag(cqe->user_data); in ublk_null_io_done() 98 unsigned op = user_data_to_op(cqe->user_data); in ublk_null_io_done() 101 if (cqe->res < 0 || op != ublk_cmd_op_nr(UBLK_U_IO_UNREGISTER_IO_BUF)) { in ublk_null_io_done() 103 io->result = cqe->res; in ublk_null_io_done() 104 if (cqe->res < 0) in ublk_null_io_done() 106 __func__, op, cqe->user_data); in ublk_null_io_done() 93 ublk_null_io_done(struct ublk_thread * t,struct ublk_queue * q,const struct io_uring_cqe * cqe) ublk_null_io_done() argument
|
| H A D | file_backed.c | 169 const struct io_uring_cqe *cqe) in ublk_loop_memset_file() 171 unsigned tag = user_data_to_tag(cqe->user_data); in ublk_loop_memset_file() 172 unsigned op = user_data_to_op(cqe->user_data); in ublk_loop_memset_file() 175 if (cqe->res < 0) { in ublk_loop_memset_file() 176 io->result = cqe->res; in ublk_loop_memset_file() 178 __func__, op, cqe->user_data); in ublk_loop_tgt_init() 180 __s32 data_len = user_data_to_tgt_data(cqe->user_data) in ublk_loop_tgt_init() 181 ? ublk_integrity_data_len(q, cqe->res) in ublk_loop_tgt_init() 182 : cqe->res; in ublk_loop_tgt_init() 131 ublk_loop_io_done(struct ublk_thread * t,struct ublk_queue * q,const struct io_uring_cqe * cqe) ublk_loop_io_done() argument
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
| H A D | macsec.h | 32 static inline bool mlx5e_macsec_is_rx_flow(struct mlx5_cqe64 *cqe) in mlx5e_macsec_is_rx_flow() argument 34 return MLX5_MACSEC_METADATA_MARKER(be32_to_cpu(cqe->ft_metadata)); in mlx5e_macsec_is_rx_flow() 38 struct mlx5_cqe64 *cqe); 46 static inline bool mlx5e_macsec_is_rx_flow(struct mlx5_cqe64 *cqe) { return false; } in mlx5e_macsec_is_rx_flow() argument 49 struct mlx5_cqe64 *cqe) in mlx5e_macsec_offload_handle_rx_skb() argument
|
| H A D | psp_rxtx.h | 83 static inline bool mlx5e_psp_is_rx_flow(struct mlx5_cqe64 *cqe) in mlx5e_psp_is_rx_flow() argument 85 return MLX5_PSP_METADATA_MARKER(be32_to_cpu(cqe->ft_metadata)); in mlx5e_psp_is_rx_flow() 89 struct mlx5_cqe64 *cqe); 108 static inline bool mlx5e_psp_is_rx_flow(struct mlx5_cqe64 *cqe) in mlx5e_psp_is_rx_flow() argument 115 struct mlx5_cqe64 *cqe) in mlx5e_psp_offload_handle_rx_skb() argument
|
| /linux/include/linux/mlx5/ |
| H A D | device.h | 910 static inline u8 mlx5_get_cqe_format(struct mlx5_cqe64 *cqe) in mlx5_get_cqe_format() argument 912 return (cqe->op_own >> 2) & 0x3; in mlx5_get_cqe_format() 915 static inline u8 get_cqe_opcode(struct mlx5_cqe64 *cqe) in get_cqe_opcode() argument 917 return cqe->op_own >> 4; in get_cqe_opcode() 920 static inline u8 get_cqe_enhanced_num_mini_cqes(struct mlx5_cqe64 *cqe) in get_cqe_enhanced_num_mini_cqes() argument 923 return get_cqe_opcode(cqe) + 1; in get_cqe_enhanced_num_mini_cqes() 926 static inline u8 get_cqe_lro_tcppsh(struct mlx5_cqe64 *cqe) in get_cqe_lro_tcppsh() argument 928 return (cqe->lro.tcppsh_abort_dupack >> 6) & 1; in get_cqe_lro_tcppsh() 931 static inline u8 get_cqe_l4_hdr_type(struct mlx5_cqe64 *cqe) in get_cqe_l4_hdr_type() argument 933 return (cqe->l4_l3_hdr_type >> 4) & 0x7; in get_cqe_l4_hdr_type() [all …]
|
| /linux/drivers/infiniband/ulp/iser/ |
| H A D | iscsi_iser.h | 231 * @cqe: completion handler 244 struct ib_cqe cqe; member 262 * @cqe: completion handler 271 struct ib_cqe cqe; member 283 * @cqe: completion handler 291 struct ib_cqe cqe; member 552 iser_rx(struct ib_cqe *cqe) in iser_rx() argument 554 return container_of(cqe, struct iser_rx_desc, cqe); in iser_rx() 558 iser_tx(struct ib_cqe *cqe) in iser_tx() argument 560 return container_of(cqe, struct iser_tx_desc, cqe); in iser_tx() [all …]
|
| /linux/include/uapi/linux/ |
| H A D | io_uring.h | 138 * in. The picked direct descriptor will be returned in cqe->res, or -ENFILE 168 /* don't post CQE if request succeeded */ 232 * Allow both 16b and 32b CQEs. If a 32b CQE is posted, it will have 233 * IORING_CQE_F_32 set in cqe->flags. 420 * the zerocopy usage in cqe.res 421 * for the IORING_CQE_F_NOTIF cqe. 430 * the starting buffer ID in cqe->flags as per 445 * cqe.res for IORING_CQE_F_NOTIF if 449 * bits of cqe.res should be treated as reserved! 471 * IORING_MSG_RING_CQE_SKIP Don't post a CQE to the target ring. Not [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/en/ |
| H A D | xdp.c | 193 _ctx->rq->clock, get_cqe_ts(_ctx->cqe)); in mlx5e_xdp_rx_timestamp() 248 const struct mlx5_cqe64 *cqe = _ctx->cqe; in mlx5e_xdp_rx_hash() local 254 *hash = be32_to_cpu(cqe->rss_hash_result); in mlx5e_xdp_rx_hash() 256 hash_type = cqe->rss_hash_type; in mlx5e_xdp_rx_hash() 270 const struct mlx5_cqe64 *cqe = _ctx->cqe; in mlx5e_xdp_rx_vlan_tag() local 272 if (!cqe_has_vlan(cqe)) in mlx5e_xdp_rx_vlan_tag() 276 *vlan_tci = be16_to_cpu(cqe->vlan_info); in mlx5e_xdp_rx_vlan_tag() 287 struct mlx5_cqe64 *cqe; member 296 ts = get_cqe_ts(priv->cqe); in mlx5e_xsk_fill_timestamp() 670 struct mlx5_cqe64 *cqe) in mlx5e_free_xdpsq_desc() argument [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
| H A D | aso.c | 11 /* data path - accessed per cqe */ 65 struct mlx5_cqe64 *cqe = mlx5_cqwq_get_wqe(&cq->wq, i); in mlx5_aso_alloc_cq() local 67 cqe->op_own = 0xf1; in mlx5_aso_alloc_cq() 394 struct mlx5_cqe64 *cqe; in mlx5_aso_poll_cq() local 396 cqe = mlx5_cqwq_get_cqe(&cq->wq); in mlx5_aso_poll_cq() 397 if (!cqe) in mlx5_aso_poll_cq() 405 if (unlikely(get_cqe_opcode(cqe) != MLX5_CQE_REQ)) { in mlx5_aso_poll_cq() 408 mlx5_core_err(cq->mdev, "Bad OP in ASOSQ CQE: 0x%x\n", in mlx5_aso_poll_cq() 409 get_cqe_opcode(cqe)); in mlx5_aso_poll_cq() 411 err_cqe = (struct mlx5_err_cqe *)cqe; in mlx5_aso_poll_cq()
|