isert: Add support for rdma_cm private data as required by Annex A12 of the IB spec

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5860 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Yan Burman
2014-11-16 13:22:58 +00:00
parent 2cfd09c8de
commit 679f7487db
2 changed files with 13 additions and 0 deletions

View File

@@ -23,5 +23,13 @@ struct isert_hdr {
#define ISER_HDRS_SZ (sizeof(struct isert_hdr) + sizeof(struct iscsi_hdr))
#define ISER_ZBVA_NOT_SUPPORTED 0x80
#define ISER_SEND_W_INV_NOT_SUPPORTED 0x40
struct isert_cm_hdr {
u8 flags;
u8 rsvd[3];
} __packed;
#endif

View File

@@ -1187,6 +1187,7 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id,
struct isert_connection *isert_conn;
struct rdma_conn_param *ini_conn_param;
struct rdma_conn_param tgt_conn_param;
struct isert_cm_hdr cm_hdr = { 0 };
int err;
TRACE_ENTRY();
@@ -1235,6 +1236,10 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id,
if (tgt_conn_param.initiator_depth > ini_conn_param->initiator_depth)
tgt_conn_param.initiator_depth = ini_conn_param->initiator_depth;
tgt_conn_param.private_data_len = sizeof(cm_hdr);
tgt_conn_param.private_data = &cm_hdr;
cm_hdr.flags = ISER_ZBVA_NOT_SUPPORTED | ISER_SEND_W_INV_NOT_SUPPORTED;
err = rdma_accept(cm_id, &tgt_conn_param);
if (unlikely(err)) {
pr_err("Failed to accept conn request, err:%d\n", err);