diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-05-18 06:40:33 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-05-18 13:44:23 -0400 |
commit | 3c88f3dcff7bfd5059b704bdede2bfe972c0cec9 (patch) | |
tree | 81190d3801b2e9bc02ddc4d23dd3e55901fe6fcf /net/rds/ib_cm.c | |
parent | 76357c715f32b61ce4d6b0c9daaf85a356498dfd (diff) |
RDS: Switch to generic logging helpers
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'net/rds/ib_cm.c')
-rw-r--r-- | net/rds/ib_cm.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 8a09ee7db3c1..b8d1bdae8a2a 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c | |||
@@ -39,36 +39,6 @@ | |||
39 | #include "rds.h" | 39 | #include "rds.h" |
40 | #include "ib.h" | 40 | #include "ib.h" |
41 | 41 | ||
42 | static char *rds_ib_event_type_strings[] = { | ||
43 | #define RDS_IB_EVENT_STRING(foo) \ | ||
44 | [IB_EVENT_##foo] = __stringify(IB_EVENT_##foo) | ||
45 | RDS_IB_EVENT_STRING(CQ_ERR), | ||
46 | RDS_IB_EVENT_STRING(QP_FATAL), | ||
47 | RDS_IB_EVENT_STRING(QP_REQ_ERR), | ||
48 | RDS_IB_EVENT_STRING(QP_ACCESS_ERR), | ||
49 | RDS_IB_EVENT_STRING(COMM_EST), | ||
50 | RDS_IB_EVENT_STRING(SQ_DRAINED), | ||
51 | RDS_IB_EVENT_STRING(PATH_MIG), | ||
52 | RDS_IB_EVENT_STRING(PATH_MIG_ERR), | ||
53 | RDS_IB_EVENT_STRING(DEVICE_FATAL), | ||
54 | RDS_IB_EVENT_STRING(PORT_ACTIVE), | ||
55 | RDS_IB_EVENT_STRING(PORT_ERR), | ||
56 | RDS_IB_EVENT_STRING(LID_CHANGE), | ||
57 | RDS_IB_EVENT_STRING(PKEY_CHANGE), | ||
58 | RDS_IB_EVENT_STRING(SM_CHANGE), | ||
59 | RDS_IB_EVENT_STRING(SRQ_ERR), | ||
60 | RDS_IB_EVENT_STRING(SRQ_LIMIT_REACHED), | ||
61 | RDS_IB_EVENT_STRING(QP_LAST_WQE_REACHED), | ||
62 | RDS_IB_EVENT_STRING(CLIENT_REREGISTER), | ||
63 | #undef RDS_IB_EVENT_STRING | ||
64 | }; | ||
65 | |||
66 | static char *rds_ib_event_str(enum ib_event_type type) | ||
67 | { | ||
68 | return rds_str_array(rds_ib_event_type_strings, | ||
69 | ARRAY_SIZE(rds_ib_event_type_strings), type); | ||
70 | }; | ||
71 | |||
72 | /* | 42 | /* |
73 | * Set the selected protocol version | 43 | * Set the selected protocol version |
74 | */ | 44 | */ |
@@ -243,7 +213,7 @@ static void rds_ib_cm_fill_conn_param(struct rds_connection *conn, | |||
243 | static void rds_ib_cq_event_handler(struct ib_event *event, void *data) | 213 | static void rds_ib_cq_event_handler(struct ib_event *event, void *data) |
244 | { | 214 | { |
245 | rdsdebug("event %u (%s) data %p\n", | 215 | rdsdebug("event %u (%s) data %p\n", |
246 | event->event, rds_ib_event_str(event->event), data); | 216 | event->event, ib_event_msg(event->event), data); |
247 | } | 217 | } |
248 | 218 | ||
249 | static void rds_ib_qp_event_handler(struct ib_event *event, void *data) | 219 | static void rds_ib_qp_event_handler(struct ib_event *event, void *data) |
@@ -252,7 +222,7 @@ static void rds_ib_qp_event_handler(struct ib_event *event, void *data) | |||
252 | struct rds_ib_connection *ic = conn->c_transport_data; | 222 | struct rds_ib_connection *ic = conn->c_transport_data; |
253 | 223 | ||
254 | rdsdebug("conn %p ic %p event %u (%s)\n", conn, ic, event->event, | 224 | rdsdebug("conn %p ic %p event %u (%s)\n", conn, ic, event->event, |
255 | rds_ib_event_str(event->event)); | 225 | ib_event_msg(event->event)); |
256 | 226 | ||
257 | switch (event->event) { | 227 | switch (event->event) { |
258 | case IB_EVENT_COMM_EST: | 228 | case IB_EVENT_COMM_EST: |
@@ -261,7 +231,7 @@ static void rds_ib_qp_event_handler(struct ib_event *event, void *data) | |||
261 | default: | 231 | default: |
262 | rdsdebug("Fatal QP Event %u (%s) " | 232 | rdsdebug("Fatal QP Event %u (%s) " |
263 | "- connection %pI4->%pI4, reconnecting\n", | 233 | "- connection %pI4->%pI4, reconnecting\n", |
264 | event->event, rds_ib_event_str(event->event), | 234 | event->event, ib_event_msg(event->event), |
265 | &conn->c_laddr, &conn->c_faddr); | 235 | &conn->c_laddr, &conn->c_faddr); |
266 | rds_conn_drop(conn); | 236 | rds_conn_drop(conn); |
267 | break; | 237 | break; |