@@ -449,7 +449,7 @@ struct ib_uverbs_wc {
__u32 vendor_err;
__u32 byte_len;
union {
- __u32 imm_data;
+ __be32 imm_data;
__u32 invalidate_rkey;
} ex;
__u32 qp_num;
@@ -562,12 +562,12 @@ int ibv_cmd_create_cq_ex(struct ibv_context *context,
int ibv_cmd_poll_cq(struct ibv_cq *ibcq, int ne, struct ibv_wc *wc)
{
struct ibv_poll_cq cmd;
- struct ibv_poll_cq_resp *resp;
+ struct ib_uverbs_poll_cq_resp *resp;
int i;
int rsize;
int ret;
- rsize = sizeof *resp + ne * sizeof(struct ibv_kern_wc);
+ rsize = sizeof *resp + ne * sizeof(struct ib_uverbs_wc);
resp = malloc(rsize);
if (!resp)
return -1;
@@ -589,7 +589,7 @@ int ibv_cmd_poll_cq(struct ibv_cq *ibcq, int ne, struct ibv_wc *wc)
wc[i].opcode = resp->wc[i].opcode;
wc[i].vendor_err = resp->wc[i].vendor_err;
wc[i].byte_len = resp->wc[i].byte_len;
- wc[i].imm_data = resp->wc[i].imm_data;
+ wc[i].imm_data = resp->wc[i].ex.imm_data;
wc[i].qp_num = resp->wc[i].qp_num;
wc[i].src_qp = resp->wc[i].src_qp;
wc[i].wc_flags = resp->wc[i].wc_flags;
@@ -240,24 +240,6 @@ struct ibv_create_cq_ex {
__u32 reserved;
};
-struct ibv_kern_wc {
- __u64 wr_id;
- __u32 status;
- __u32 opcode;
- __u32 vendor_err;
- __u32 byte_len;
- __be32 imm_data;
- __u32 qp_num;
- __u32 src_qp;
- __u32 wc_flags;
- __u16 pkey_index;
- __u16 slid;
- __u8 sl;
- __u8 dlid_path_bits;
- __u8 port_num;
- __u8 reserved;
-};
-
struct ibv_poll_cq {
__u32 command;
__u16 in_words;
@@ -267,12 +249,6 @@ struct ibv_poll_cq {
__u32 ne;
};
-struct ibv_poll_cq_resp {
- __u32 count;
- __u32 reserved;
- struct ibv_kern_wc wc[0];
-};
-
struct ibv_req_notify_cq {
__u32 command;
__u16 in_words;