aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2013-05-01 09:25:27 -0400
committerRoland Dreier <roland@purestorage.com>2013-05-01 20:34:14 -0400
commit8d8399deb0434df6efb3a54a0efeac677e310fc1 (patch)
tree20623c0b993f1eda9d179e21e24fd49495ce7e45 /drivers/infiniband
parent450d1e40d597dd71843457c73d372c4b4f2a83eb (diff)
IB/iser: Add support for iser CM REQ additional info
Annex A12 of the IBTA spec defines additional information that needs to be provided through the CM exchange relating to usage of ZBVA (Zero Based VAs) and Send With Invalidate over an iSER connection. Currently, the initiator sets both to not supported, but does provide the header so that existing iSER targets can be patched to start looking on the private data carried by the CM. This is a preparation step to enable iSER with HW drivers for which FMRs are not supported, such as mlx4 VF instances or new HW devices which might support only FRWR (Fast Registration Work-Requests) along the details of the IB_DEVICE_MEM_MGT_EXTENSIONS device capability. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.h9
-rw-r--r--drivers/infiniband/ulp/iser/iser_verbs.c7
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index 1a570886cc03..06f578cde75b 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -140,6 +140,15 @@ struct iser_hdr {
140 __be64 read_va; 140 __be64 read_va;
141} __attribute__((packed)); 141} __attribute__((packed));
142 142
143
144#define ISER_ZBVA_NOT_SUPPORTED 0x80
145#define ISER_SEND_W_INV_NOT_SUPPORTED 0x40
146
147struct iser_cm_hdr {
148 u8 flags;
149 u8 rsvd[3];
150} __packed;
151
143/* Constant PDU lengths calculations */ 152/* Constant PDU lengths calculations */
144#define ISER_HEADERS_LEN (sizeof(struct iser_hdr) + sizeof(struct iscsi_hdr)) 153#define ISER_HEADERS_LEN (sizeof(struct iser_hdr) + sizeof(struct iscsi_hdr))
145 154
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 13838ad3ce76..5278916c3103 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -499,6 +499,7 @@ static int iser_route_handler(struct rdma_cm_id *cma_id)
499{ 499{
500 struct rdma_conn_param conn_param; 500 struct rdma_conn_param conn_param;
501 int ret; 501 int ret;
502 struct iser_cm_hdr req_hdr;
502 503
503 ret = iser_create_ib_conn_res((struct iser_conn *)cma_id->context); 504 ret = iser_create_ib_conn_res((struct iser_conn *)cma_id->context);
504 if (ret) 505 if (ret)
@@ -510,6 +511,12 @@ static int iser_route_handler(struct rdma_cm_id *cma_id)
510 conn_param.retry_count = 7; 511 conn_param.retry_count = 7;
511 conn_param.rnr_retry_count = 6; 512 conn_param.rnr_retry_count = 6;
512 513
514 memset(&req_hdr, 0, sizeof(req_hdr));
515 req_hdr.flags = (ISER_ZBVA_NOT_SUPPORTED |
516 ISER_SEND_W_INV_NOT_SUPPORTED);
517 conn_param.private_data = (void *)&req_hdr;
518 conn_param.private_data_len = sizeof(struct iser_cm_hdr);
519
513 ret = rdma_connect(cma_id, &conn_param); 520 ret = rdma_connect(cma_id, &conn_param);
514 if (ret) { 521 if (ret) {
515 iser_err("failure connecting: %d\n", ret); 522 iser_err("failure connecting: %d\n", ret);