aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_uc.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-04-17 00:09:32 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:09:32 -0400
commit0f39cf3d54e67a705773fd0ec56ca3dcd3e9272f (patch)
tree83f19f0014d0e880fb245906105e903dd6d733d5 /drivers/infiniband/hw/ipath/ipath_uc.c
parente7eacd36865ae0707f5efae8e4dda421ffcd1b66 (diff)
IB/core: Add support for "send with invalidate" work requests
Add a new IB_WR_SEND_WITH_INV send opcode that can be used to mark a "send with invalidate" work request as defined in the iWARP verbs and the InfiniBand base memory management extensions. Also put "imm_data" and a new "invalidate_rkey" member in a new "ex" union in struct ib_send_wr. The invalidate_rkey member can be used to pass in an R_Key/STag to be invalidated. Add this new union to struct ib_uverbs_send_wr. Add code to copy the invalidate_rkey field in ib_uverbs_post_send(). Fix up low-level drivers to deal with the change to struct ib_send_wr, and just remove the imm_data initialization from net/sunrpc/xprtrdma/, since that code never does any send with immediate operations. Also, move the existing IB_DEVICE_SEND_W_INV flag to a new bit, since the iWARP drivers currently in the tree set the bit. The amso1100 driver at least will silently fail to honor the IB_SEND_INVALIDATE bit if passed in as part of userspace send requests (since it does not implement kernel bypass work request queueing). Remove the flag from all existing drivers that set it until we know which ones are OK. The values chosen for the new flag is not consecutive to avoid clashing with flags defined in the XRC patches, which are not merged yet but which are already in use and are likely to be merged soon. This resurrects a patch sent long ago by Mikkel Hagen <mhagen@iol.unh.edu>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_uc.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_uc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_uc.c b/drivers/infiniband/hw/ipath/ipath_uc.c
index 2dd8de20d221..bfe8926b5514 100644
--- a/drivers/infiniband/hw/ipath/ipath_uc.c
+++ b/drivers/infiniband/hw/ipath/ipath_uc.c
@@ -94,7 +94,7 @@ int ipath_make_uc_req(struct ipath_qp *qp)
94 qp->s_state = 94 qp->s_state =
95 OP(SEND_ONLY_WITH_IMMEDIATE); 95 OP(SEND_ONLY_WITH_IMMEDIATE);
96 /* Immediate data comes after the BTH */ 96 /* Immediate data comes after the BTH */
97 ohdr->u.imm_data = wqe->wr.imm_data; 97 ohdr->u.imm_data = wqe->wr.ex.imm_data;
98 hwords += 1; 98 hwords += 1;
99 } 99 }
100 if (wqe->wr.send_flags & IB_SEND_SOLICITED) 100 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
@@ -123,7 +123,7 @@ int ipath_make_uc_req(struct ipath_qp *qp)
123 qp->s_state = 123 qp->s_state =
124 OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE); 124 OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE);
125 /* Immediate data comes after the RETH */ 125 /* Immediate data comes after the RETH */
126 ohdr->u.rc.imm_data = wqe->wr.imm_data; 126 ohdr->u.rc.imm_data = wqe->wr.ex.imm_data;
127 hwords += 1; 127 hwords += 1;
128 if (wqe->wr.send_flags & IB_SEND_SOLICITED) 128 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
129 bth0 |= 1 << 23; 129 bth0 |= 1 << 23;
@@ -152,7 +152,7 @@ int ipath_make_uc_req(struct ipath_qp *qp)
152 else { 152 else {
153 qp->s_state = OP(SEND_LAST_WITH_IMMEDIATE); 153 qp->s_state = OP(SEND_LAST_WITH_IMMEDIATE);
154 /* Immediate data comes after the BTH */ 154 /* Immediate data comes after the BTH */
155 ohdr->u.imm_data = wqe->wr.imm_data; 155 ohdr->u.imm_data = wqe->wr.ex.imm_data;
156 hwords += 1; 156 hwords += 1;
157 } 157 }
158 if (wqe->wr.send_flags & IB_SEND_SOLICITED) 158 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
@@ -177,7 +177,7 @@ int ipath_make_uc_req(struct ipath_qp *qp)
177 qp->s_state = 177 qp->s_state =
178 OP(RDMA_WRITE_LAST_WITH_IMMEDIATE); 178 OP(RDMA_WRITE_LAST_WITH_IMMEDIATE);
179 /* Immediate data comes after the BTH */ 179 /* Immediate data comes after the BTH */
180 ohdr->u.imm_data = wqe->wr.imm_data; 180 ohdr->u.imm_data = wqe->wr.ex.imm_data;
181 hwords += 1; 181 hwords += 1;
182 if (wqe->wr.send_flags & IB_SEND_SOLICITED) 182 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
183 bth0 |= 1 << 23; 183 bth0 |= 1 << 23;