diff options
author | Bart Van Assche <bvanassche@acm.org> | 2018-12-18 00:20:39 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-12-19 23:07:25 +0300 |
commit | 882981f4a4112b44376ba21aa4d82dbdd5d8f148 (patch) | |
tree | 11ac43baaa3e84fc4fa8d182976c5f9b7773d1f6 /drivers/infiniband/ulp/srp/ib_srp.h | |
parent | 513d5647116b2aaeb6d99471f70ab9c9f3f65663 (diff) | |
download | linux-882981f4a4112b44376ba21aa4d82dbdd5d8f148.tar.xz |
RDMA/srp: Add support for immediate data
Request permission to send immediate data during login. If the SRP
target grants this request, send the payload of write requests <= 8 KB
as immediate data.
Cc: Sergey Gorenko <sergeygo@mellanox.com>
Cc: Max Gurtovoy <maxg@mellanox.com>
Cc: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/srp/ib_srp.h')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index 9a271ae6573b..b2861cd2087a 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h @@ -69,6 +69,15 @@ enum { SRP_MAX_PAGES_PER_MR = 512, SRP_MAX_ADD_CDB_LEN = 16, + + SRP_MAX_IMM_SGE = 2, + SRP_MAX_SGE = SRP_MAX_IMM_SGE + 1, + /* + * Choose the immediate data offset such that a 32 byte CDB still fits. + */ + SRP_IMM_DATA_OFFSET = sizeof(struct srp_cmd) + + SRP_MAX_ADD_CDB_LEN + + sizeof(struct srp_imm_buf), }; enum srp_target_state { @@ -152,6 +161,7 @@ struct srp_rdma_ch { }; uint32_t max_it_iu_len; uint32_t max_ti_iu_len; + bool use_imm_data; /* Everything above this point is used in the hot path of * command processing. Try to keep them packed into cachelines. @@ -263,6 +273,8 @@ struct srp_iu { void *buf; size_t size; enum dma_data_direction direction; + u32 num_sge; + struct ib_sge sge[SRP_MAX_SGE]; struct ib_cqe cqe; }; |