Commit c966ea12 authored by Jason Gunthorpe's avatar Jason Gunthorpe

RDMA: Mark imm_data as be32 in the verbs uapi header

This matches what the userspace copy of this header has been doing
for a while. imm_data is an opaque 4 byte array carried over the network,
and invalidate_rkey is in CPU byte order.
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent a6753c4d
...@@ -1196,7 +1196,7 @@ static int copy_wc_to_user(struct ib_device *ib_dev, void __user *dest, ...@@ -1196,7 +1196,7 @@ static int copy_wc_to_user(struct ib_device *ib_dev, void __user *dest,
tmp.opcode = wc->opcode; tmp.opcode = wc->opcode;
tmp.vendor_err = wc->vendor_err; tmp.vendor_err = wc->vendor_err;
tmp.byte_len = wc->byte_len; tmp.byte_len = wc->byte_len;
tmp.ex.imm_data = (__u32 __force) wc->ex.imm_data; tmp.ex.imm_data = wc->ex.imm_data;
tmp.qp_num = wc->qp->qp_num; tmp.qp_num = wc->qp->qp_num;
tmp.src_qp = wc->src_qp; tmp.src_qp = wc->src_qp;
tmp.wc_flags = wc->wc_flags; tmp.wc_flags = wc->wc_flags;
......
...@@ -101,8 +101,7 @@ void rvt_cq_enter(struct rvt_cq *cq, struct ib_wc *entry, bool solicited) ...@@ -101,8 +101,7 @@ void rvt_cq_enter(struct rvt_cq *cq, struct ib_wc *entry, bool solicited)
wc->uqueue[head].opcode = entry->opcode; wc->uqueue[head].opcode = entry->opcode;
wc->uqueue[head].vendor_err = entry->vendor_err; wc->uqueue[head].vendor_err = entry->vendor_err;
wc->uqueue[head].byte_len = entry->byte_len; wc->uqueue[head].byte_len = entry->byte_len;
wc->uqueue[head].ex.imm_data = wc->uqueue[head].ex.imm_data = entry->ex.imm_data;
(__u32 __force)entry->ex.imm_data;
wc->uqueue[head].qp_num = entry->qp->qp_num; wc->uqueue[head].qp_num = entry->qp->qp_num;
wc->uqueue[head].src_qp = entry->src_qp; wc->uqueue[head].src_qp = entry->src_qp;
wc->uqueue[head].wc_flags = entry->wc_flags; wc->uqueue[head].wc_flags = entry->wc_flags;
......
...@@ -863,8 +863,7 @@ static enum resp_states do_complete(struct rxe_qp *qp, ...@@ -863,8 +863,7 @@ static enum resp_states do_complete(struct rxe_qp *qp,
if (pkt->mask & RXE_IMMDT_MASK) { if (pkt->mask & RXE_IMMDT_MASK) {
uwc->wc_flags |= IB_WC_WITH_IMM; uwc->wc_flags |= IB_WC_WITH_IMM;
uwc->ex.imm_data = uwc->ex.imm_data = immdt_imm(pkt);
(__u32 __force)immdt_imm(pkt);
} }
if (pkt->mask & RXE_IETH_MASK) { if (pkt->mask & RXE_IETH_MASK) {
......
...@@ -449,7 +449,7 @@ struct ib_uverbs_wc { ...@@ -449,7 +449,7 @@ struct ib_uverbs_wc {
__u32 vendor_err; __u32 vendor_err;
__u32 byte_len; __u32 byte_len;
union { union {
__u32 imm_data; __be32 imm_data;
__u32 invalidate_rkey; __u32 invalidate_rkey;
} ex; } ex;
__u32 qp_num; __u32 qp_num;
...@@ -765,7 +765,7 @@ struct ib_uverbs_send_wr { ...@@ -765,7 +765,7 @@ struct ib_uverbs_send_wr {
__u32 opcode; __u32 opcode;
__u32 send_flags; __u32 send_flags;
union { union {
__u32 imm_data; __be32 imm_data;
__u32 invalidate_rkey; __u32 invalidate_rkey;
} ex; } ex;
union { union {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment