Skip to content

Commit 64c8a27

Browse files
SantoshShilimkarSomasundaram Krishnasamy
authored andcommitted
RDS: avoid duplicate connection drop for self loopback
For self-IB loopback is special mode and the c_passive conn is just a place holder to stick the the second QP. Orabug: 22347191 Signed-off-by: Santosh Shilimkar <[email protected]> Reviewed-by: Mukesh Kacker <[email protected]> Tested-by: Michael Nowak <[email protected]> Tested-by: Rafael Alejandro Peralez <[email protected]> Tested-by: Liwen Huang <[email protected]> Tested-by: Hong Liu <[email protected]> Orabug: 27364391 (cherry picked from commit 61dce74) cherry-pick-repo=linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent 0740274 commit 64c8a27

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

net/rds/rdma_transport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
307307
"ADDR_CHANGE: calling rds_conn_drop <%pI4,%pI4,%d>\n",
308308
&conn->c_laddr, &conn->c_faddr,
309309
conn->c_tos);
310-
rds_conn_drop(conn, DR_IB_ADDR_CHANGE);
310+
if (!rds_conn_self_loopback_passive(conn))
311+
rds_conn_drop(conn, DR_IB_ADDR_CHANGE);
311312
}
312313
break;
313314

net/rds/rds.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,15 @@ rds_conn_connecting(struct rds_connection *conn)
888888
return atomic_read(&conn->c_state) == RDS_CONN_CONNECTING;
889889
}
890890

891+
static inline bool
892+
rds_conn_self_loopback_passive(struct rds_connection *conn)
893+
{
894+
if (conn->c_laddr == conn->c_faddr && !conn->c_passive)
895+
return true;
896+
else
897+
return false;
898+
}
899+
891900
/* message.c */
892901
struct rds_message *rds_message_alloc(unsigned int nents, gfp_t gfp);
893902
struct scatterlist *rds_message_alloc_sgs(struct rds_message *rm, int nents);

0 commit comments

Comments
 (0)