Skip to content

Commit 61dce74

Browse files
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 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]> Reviewed-by: Mukesh Kacker <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]>
1 parent e47c44f commit 61dce74

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
@@ -309,7 +309,8 @@ int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
309309
"ADDR_CHANGE: calling rds_conn_drop <%u.%u.%u.%u,%u.%u.%u.%u,%d>\n",
310310
NIPQUAD(conn->c_laddr), NIPQUAD(conn->c_faddr),
311311
conn->c_tos);
312-
rds_conn_drop(conn, DR_IB_ADDR_CHANGE);
312+
if (!rds_conn_self_loopback_passive(conn))
313+
rds_conn_drop(conn, DR_IB_ADDR_CHANGE);
313314
}
314315
break;
315316

net/rds/rds.h

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

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

0 commit comments

Comments
 (0)