IB: split struct ib_send_wr
This patch split up struct ib_send_wr so that all non-trivial verbs use their own structure which embedds struct ib_send_wr. This dramaticly shrinks the size of a WR for most common operations: sizeof(struct ib_send_wr) (old): 96 sizeof(struct ib_send_wr): 48 sizeof(struct ib_rdma_wr): 64 sizeof(struct ib_atomic_wr): 96 sizeof(struct ib_ud_wr): 88 sizeof(struct ib_fast_reg_wr): 88 sizeof(struct ib_bind_mw_wr): 96 sizeof(struct ib_sig_handover_wr): 80 And with Sagi's pending MR rework the fast registration WR will also be down to a reasonable size: sizeof(struct ib_fastreg_wr): 64 Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> [srp, srpt] Reviewed-by: Chuck Lever <chuck.lever@oracle.com> [sunrpc] Tested-by: Haggai Eran <haggaie@mellanox.com> Tested-by: Sagi Grimberg <sagig@mellanox.com> Tested-by: Steve Wise <swise@opengridcomputing.com>
Šī revīzija ir iekļauta:
@@ -217,7 +217,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
|
||||
u32 xdr_off, int write_len,
|
||||
struct svc_rdma_req_map *vec)
|
||||
{
|
||||
struct ib_send_wr write_wr;
|
||||
struct ib_rdma_wr write_wr;
|
||||
struct ib_sge *sge;
|
||||
int xdr_sge_no;
|
||||
int sge_no;
|
||||
@@ -282,17 +282,17 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
|
||||
/* Prepare WRITE WR */
|
||||
memset(&write_wr, 0, sizeof write_wr);
|
||||
ctxt->wr_op = IB_WR_RDMA_WRITE;
|
||||
write_wr.wr_id = (unsigned long)ctxt;
|
||||
write_wr.sg_list = &sge[0];
|
||||
write_wr.num_sge = sge_no;
|
||||
write_wr.opcode = IB_WR_RDMA_WRITE;
|
||||
write_wr.send_flags = IB_SEND_SIGNALED;
|
||||
write_wr.wr.rdma.rkey = rmr;
|
||||
write_wr.wr.rdma.remote_addr = to;
|
||||
write_wr.wr.wr_id = (unsigned long)ctxt;
|
||||
write_wr.wr.sg_list = &sge[0];
|
||||
write_wr.wr.num_sge = sge_no;
|
||||
write_wr.wr.opcode = IB_WR_RDMA_WRITE;
|
||||
write_wr.wr.send_flags = IB_SEND_SIGNALED;
|
||||
write_wr.rkey = rmr;
|
||||
write_wr.remote_addr = to;
|
||||
|
||||
/* Post It */
|
||||
atomic_inc(&rdma_stat_write);
|
||||
if (svc_rdma_send(xprt, &write_wr))
|
||||
if (svc_rdma_send(xprt, &write_wr.wr))
|
||||
goto err;
|
||||
return write_len - bc;
|
||||
err:
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user