diff options
author | Steve Wise <swise@opengridcomputing.com> | 2006-12-15 16:50:17 -0600 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-01-07 20:15:58 -0800 |
commit | 881a045fc5b454b57c69e010acecd5830d87e242 (patch) | |
tree | 22cf7dd12b9cdd272e17cf819d4a137eddb2abbc /drivers/infiniband/core | |
parent | f0938401f2252bf39615c0815734650eab9053c8 (diff) | |
download | linux-881a045fc5b454b57c69e010acecd5830d87e242.tar.gz linux-881a045fc5b454b57c69e010acecd5830d87e242.tar.bz2 linux-881a045fc5b454b57c69e010acecd5830d87e242.zip |
RDMA/iwcm: iWARP connection timeouts shouldn't be reported as rejects
The iWARP CM should report timeouts as event RDMA_CM_EVENT_UNREACHABLE,
not event RDMA_CM_EVENT_REJECTED.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/cma.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 533193d4e5df..9e0ab048c878 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1088,10 +1088,21 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event) *sin = iw_event->local_addr; sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr; *sin = iw_event->remote_addr; - if (iw_event->status) - event.event = RDMA_CM_EVENT_REJECTED; - else + switch (iw_event->status) { + case 0: event.event = RDMA_CM_EVENT_ESTABLISHED; + break; + case -ECONNRESET: + case -ECONNREFUSED: + event.event = RDMA_CM_EVENT_REJECTED; + break; + case -ETIMEDOUT: + event.event = RDMA_CM_EVENT_UNREACHABLE; + break; + default: + event.event = RDMA_CM_EVENT_CONNECT_ERROR; + break; + } break; case IW_CM_EVENT_ESTABLISHED: event.event = RDMA_CM_EVENT_ESTABLISHED; |