diff options
author | Amir Vadai <amirv@mellanox.co.il> | 2008-07-22 17:14:23 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-07-22 17:14:23 -0400 |
commit | 38ca83a588662f0af684ba2567dd910a564268ab (patch) | |
tree | b5983ebd94a89f924e06e3bbd1c174533144682e /drivers/infiniband/core | |
parent | dd5bdff83b19d9174126e0398b47117c3a80e22d (diff) |
RDMA/cma: Add RDMA_CM_EVENT_TIMEWAIT_EXIT event
Consumers that want to re-use their QPs in new connections need to
know when the QP has exited the timewait state. Report the timewait
event through the rdma_cm.
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
Acked-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 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 79792c92e6fb..e980ff3335db 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -920,7 +920,10 @@ static int cma_ib_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) | |||
920 | struct rdma_cm_event event; | 920 | struct rdma_cm_event event; |
921 | int ret = 0; | 921 | int ret = 0; |
922 | 922 | ||
923 | if (cma_disable_callback(id_priv, CMA_CONNECT)) | 923 | if ((ib_event->event != IB_CM_TIMEWAIT_EXIT && |
924 | cma_disable_callback(id_priv, CMA_CONNECT)) || | ||
925 | (ib_event->event == IB_CM_TIMEWAIT_EXIT && | ||
926 | cma_disable_callback(id_priv, CMA_DISCONNECT))) | ||
924 | return 0; | 927 | return 0; |
925 | 928 | ||
926 | memset(&event, 0, sizeof event); | 929 | memset(&event, 0, sizeof event); |
@@ -956,6 +959,8 @@ static int cma_ib_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) | |||
956 | event.event = RDMA_CM_EVENT_DISCONNECTED; | 959 | event.event = RDMA_CM_EVENT_DISCONNECTED; |
957 | break; | 960 | break; |
958 | case IB_CM_TIMEWAIT_EXIT: | 961 | case IB_CM_TIMEWAIT_EXIT: |
962 | event.event = RDMA_CM_EVENT_TIMEWAIT_EXIT; | ||
963 | break; | ||
959 | case IB_CM_MRA_RECEIVED: | 964 | case IB_CM_MRA_RECEIVED: |
960 | /* ignore event */ | 965 | /* ignore event */ |
961 | goto out; | 966 | goto out; |