diff options
author | Sean Hefty <sean.hefty@intel.com> | 2013-05-29 10:09:08 -0700 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-06-20 13:08:01 -0700 |
commit | c8dea2f9f078395ebac7c92aeb919f02ff3fca88 (patch) | |
tree | b58838819bc28a904549e96e5a58127aea39b0fb /drivers/infiniband/core | |
parent | 8d36eb01da5d371feffa280e501377b5c450f5a5 (diff) | |
download | op-kernel-dev-c8dea2f9f078395ebac7c92aeb919f02ff3fca88.zip op-kernel-dev-c8dea2f9f078395ebac7c92aeb919f02ff3fca88.tar.gz |
RDMA/cma: Allow enabling reuseaddr in any state
The rdma_cm only allows setting reuseaddr if the corresponding
rdma_cm_id is in the idle state. Allow setting this value in other
states. This brings the behavior more inline with sockets.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/cma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 34fbc2f..fde428b 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -2097,7 +2097,7 @@ int rdma_set_reuseaddr(struct rdma_cm_id *id, int reuse) id_priv = container_of(id, struct rdma_id_private, id); spin_lock_irqsave(&id_priv->lock, flags); - if (id_priv->state == RDMA_CM_IDLE) { + if (reuse || id_priv->state == RDMA_CM_IDLE) { id_priv->reuseaddr = reuse; ret = 0; } else { |