Skip to content

Commit ff3f19a

Browse files
RDS: IB: include faddr in connection log
Also use pr_* for it. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
1 parent bb78976 commit ff3f19a

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

net/rds/ib_cm.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,18 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_even
113113
}
114114

115115
if (conn->c_version < RDS_PROTOCOL(3, 1)) {
116-
printk(KERN_NOTICE "RDS/IB: Connection to %pI4 version %u.%u failed,"
117-
" no longer supported\n",
118-
&conn->c_faddr,
119-
RDS_PROTOCOL_MAJOR(conn->c_version),
120-
RDS_PROTOCOL_MINOR(conn->c_version));
116+
pr_notice("RDS/IB: Connection <%pI4,%pI4> version %u.%u no longer supported\n",
117+
&conn->c_laddr, &conn->c_faddr,
118+
RDS_PROTOCOL_MAJOR(conn->c_version),
119+
RDS_PROTOCOL_MINOR(conn->c_version));
121120
rds_conn_destroy(conn);
122121
return;
123122
} else {
124-
printk(KERN_NOTICE "RDS/IB: connected to %pI4 version %u.%u%s\n",
125-
&conn->c_faddr,
126-
RDS_PROTOCOL_MAJOR(conn->c_version),
127-
RDS_PROTOCOL_MINOR(conn->c_version),
128-
ic->i_flowctl ? ", flow control" : "");
123+
pr_notice("RDS/IB: connected <%pI4,%pI4> version %u.%u%s\n",
124+
&conn->c_laddr, &conn->c_faddr,
125+
RDS_PROTOCOL_MAJOR(conn->c_version),
126+
RDS_PROTOCOL_MINOR(conn->c_version),
127+
ic->i_flowctl ? ", flow control" : "");
129128
}
130129

131130
/*

net/rds/ib_recv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,8 @@ void rds_ib_recv_cqe_handler(struct rds_ib_connection *ic,
980980
} else {
981981
/* We expect errors as the qp is drained during shutdown */
982982
if (rds_conn_up(conn) || rds_conn_connecting(conn))
983-
rds_ib_conn_error(conn, "recv completion on %pI4 had status %u (%s), disconnecting and reconnecting\n",
984-
&conn->c_faddr,
983+
rds_ib_conn_error(conn, "recv completion on <%pI4,%pI4> had status %u (%s), disconnecting and reconnecting\n",
984+
&conn->c_laddr, &conn->c_faddr,
985985
wc->status,
986986
ib_wc_status_msg(wc->status));
987987
}

net/rds/ib_send.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ void rds_ib_send_cqe_handler(struct rds_ib_connection *ic, struct ib_wc *wc)
300300

301301
/* We expect errors as the qp is drained during shutdown */
302302
if (wc->status != IB_WC_SUCCESS && rds_conn_up(conn)) {
303-
rds_ib_conn_error(conn, "send completion on %pI4 had status %u (%s), disconnecting and reconnecting\n",
304-
&conn->c_faddr, wc->status,
303+
rds_ib_conn_error(conn, "send completion on <%pI4,%pI4> had status %u (%s), disconnecting and reconnecting\n",
304+
&conn->c_laddr, &conn->c_faddr, wc->status,
305305
ib_wc_status_msg(wc->status));
306306
}
307307
}

0 commit comments

Comments
 (0)