aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srp/ib_srp.h
diff options
context:
space:
mode:
authorDavid Dillow <dillowda@ornl.gov>2011-01-16 13:57:10 -0500
committerDavid Dillow <dillowda@ornl.gov>2011-03-15 19:37:23 -0400
commitc07d424d6118d528ef71b22b7424bfc359c307a5 (patch)
tree1d61da8aea0fa80c2c7bc13b03d15ddb470bcfa6 /drivers/infiniband/ulp/srp/ib_srp.h
parent8f26c9ff9cd0317ad867bce972f69e0c6c2cbe3c (diff)
IB/srp: add support for indirect tables that don't fit in SRP_CMD
This allows us to guarantee the ability to submit up to 8 MB requests based on the current value of SCSI_MAX_SG_CHAIN_SEGMENTS. While FMR will usually condense the requests into 8 SG entries, it is imperative that the target support external tables in case the FMR mapping fails or is not supported. We add a safety valve to allow targets without the needed support to reap the benefits of the large tables, but fail in a manner that lets the user know that the data didn't make it to the device. The user must add "allow_ext_sg=1" to the target parameters to indicate that the target has the needed support. If indirect_sg_entries is not specified in the modules options, then the sg_tablesize for the target will default to cmd_sg_entries unless overridden by the target options. Signed-off-by: David Dillow <dillowda@ornl.gov>
Diffstat (limited to 'drivers/infiniband/ulp/srp/ib_srp.h')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h
index b43b5e7acbde..cf696218eeeb 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.h
+++ b/drivers/infiniband/ulp/srp/ib_srp.h
@@ -117,6 +117,8 @@ struct srp_request {
117 struct srp_iu *cmd; 117 struct srp_iu *cmd;
118 struct ib_pool_fmr **fmr_list; 118 struct ib_pool_fmr **fmr_list;
119 u64 *map_page; 119 u64 *map_page;
120 struct srp_direct_buf *indirect_desc;
121 dma_addr_t indirect_dma_addr;
120 short nfmr; 122 short nfmr;
121 short index; 123 short index;
122}; 124};
@@ -137,6 +139,8 @@ struct srp_target_port {
137 enum srp_target_state state; 139 enum srp_target_state state;
138 unsigned int max_iu_len; 140 unsigned int max_iu_len;
139 unsigned int cmd_sg_cnt; 141 unsigned int cmd_sg_cnt;
142 unsigned int indirect_size;
143 bool allow_ext_sg;
140 144
141 /* Everything above this point is used in the hot path of 145 /* Everything above this point is used in the hot path of
142 * command processing. Try to keep them packed into cachelines. 146 * command processing. Try to keep them packed into cachelines.
@@ -151,6 +155,7 @@ struct srp_target_port {
151 struct Scsi_Host *scsi_host; 155 struct Scsi_Host *scsi_host;
152 char target_name[32]; 156 char target_name[32];
153 unsigned int scsi_id; 157 unsigned int scsi_id;
158 unsigned int sg_tablesize;
154 159
155 struct ib_sa_path_rec path; 160 struct ib_sa_path_rec path;
156 __be16 orig_dgid[8]; 161 __be16 orig_dgid[8];