[PATCH] IB CM: support CM redir

Changes to CM to support CM and port redirection (REJ reason 24).

Signed-off-by: John Kingman <kingman <at> storagegear.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

John Kingman and committed by
Roland Dreier
354ba39c 63aaf647

+4 -1
+3 -1
drivers/infiniband/core/cm.c
··· 173 173 if (IS_ERR(ah)) 174 174 return PTR_ERR(ah); 175 175 176 - m = ib_create_send_mad(mad_agent, 1, cm_id_priv->av.pkey_index, 176 + m = ib_create_send_mad(mad_agent, cm_id_priv->id.remote_cm_qpn, 177 + cm_id_priv->av.pkey_index, 177 178 ah, 0, sizeof(struct ib_mad_hdr), 178 179 sizeof(struct ib_mad)-sizeof(struct ib_mad_hdr), 179 180 GFP_ATOMIC); ··· 537 536 cm_id_priv->id.state = IB_CM_IDLE; 538 537 cm_id_priv->id.cm_handler = cm_handler; 539 538 cm_id_priv->id.context = context; 539 + cm_id_priv->id.remote_cm_qpn = 1; 540 540 ret = cm_alloc_id(cm_id_priv); 541 541 if (ret) 542 542 goto error;
+1
include/rdma/ib_cm.h
··· 290 290 enum ib_cm_lap_state lap_state; /* internal CM/debug use */ 291 291 __be32 local_id; 292 292 __be32 remote_id; 293 + u32 remote_cm_qpn; /* 1 unless redirected */ 293 294 }; 294 295 295 296 /**