@@ -1693,6 +1693,7 @@ static int cma_rep_recv(struct rdma_id_private *id_priv)
1693
1693
1694
1694
return 0 ;
1695
1695
reject :
1696
+ pr_debug_ratelimited ("RDMA CM: CONNECT_ERROR: failed to handle reply. status %d\n" , ret );
1696
1697
cma_modify_qp_err (id_priv );
1697
1698
ib_send_cm_rej (id_priv -> cm_id .ib , IB_CM_REJ_CONSUMER_DEFINED ,
1698
1699
NULL , 0 , NULL , 0 );
@@ -1764,6 +1765,8 @@ static int cma_ib_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
1764
1765
/* ignore event */
1765
1766
goto out ;
1766
1767
case IB_CM_REJ_RECEIVED :
1768
+ pr_debug_ratelimited ("RDMA CM: REJECTED: %s\n" , rdma_reject_msg (& id_priv -> id ,
1769
+ ib_event -> param .rej_rcvd .reason ));
1767
1770
cma_modify_qp_err (id_priv );
1768
1771
event .status = ib_event -> param .rej_rcvd .reason ;
1769
1772
event .event = RDMA_CM_EVENT_REJECTED ;
@@ -2289,6 +2292,8 @@ static void cma_query_handler(int status, struct ib_sa_path_rec *path_rec,
2289
2292
work -> new_state = RDMA_CM_ADDR_RESOLVED ;
2290
2293
work -> event .event = RDMA_CM_EVENT_ROUTE_ERROR ;
2291
2294
work -> event .status = status ;
2295
+ pr_debug_ratelimited ("RDMA CM: ROUTE_ERROR: failed to query path. status %d\n" ,
2296
+ status );
2292
2297
}
2293
2298
2294
2299
queue_work (cma_wq , & work -> work );
@@ -2724,8 +2729,14 @@ static void addr_handler(int status, struct sockaddr *src_addr,
2724
2729
goto out ;
2725
2730
2726
2731
memcpy (cma_src_addr (id_priv ), src_addr , rdma_addr_size (src_addr ));
2727
- if (!status && !id_priv -> cma_dev )
2732
+ if (!status && !id_priv -> cma_dev ) {
2728
2733
status = cma_acquire_dev (id_priv , NULL );
2734
+ if (status )
2735
+ pr_debug_ratelimited ("RDMA CM: ADDR_ERROR: failed to acquire device. status %d\n" ,
2736
+ status );
2737
+ } else {
2738
+ pr_debug_ratelimited ("RDMA CM: ADDR_ERROR: failed to resolve IP. status %d\n" , status );
2739
+ }
2729
2740
2730
2741
if (status ) {
2731
2742
if (!cma_comp_exch (id_priv , RDMA_CM_ADDR_RESOLVED ,
@@ -3311,10 +3322,13 @@ static int cma_sidr_rep_handler(struct ib_cm_id *cm_id,
3311
3322
if (rep -> status != IB_SIDR_SUCCESS ) {
3312
3323
event .event = RDMA_CM_EVENT_UNREACHABLE ;
3313
3324
event .status = ib_event -> param .sidr_rep_rcvd .status ;
3325
+ pr_debug_ratelimited ("RDMA CM: UNREACHABLE: bad SIDR reply. status %d\n" ,
3326
+ event .status );
3314
3327
break ;
3315
3328
}
3316
3329
ret = cma_set_qkey (id_priv , rep -> qkey );
3317
3330
if (ret ) {
3331
+ pr_debug_ratelimited ("RDMA CM: ADDR_ERROR: failed to set qkey. status %d\n" , ret );
3318
3332
event .event = RDMA_CM_EVENT_ADDR_ERROR ;
3319
3333
event .status = ret ;
3320
3334
break ;
@@ -3763,10 +3777,17 @@ static int cma_ib_mc_handler(int status, struct ib_sa_multicast *multicast)
3763
3777
3764
3778
if (!status )
3765
3779
status = cma_set_qkey (id_priv , be32_to_cpu (multicast -> rec .qkey ));
3780
+ else
3781
+ pr_debug_ratelimited ("RDMA CM: MULTICAST_ERROR: failed to join multicast. status %d\n" ,
3782
+ status );
3766
3783
mutex_lock (& id_priv -> qp_mutex );
3767
- if (!status && id_priv -> id .qp )
3784
+ if (!status && id_priv -> id .qp ) {
3768
3785
status = ib_attach_mcast (id_priv -> id .qp , & multicast -> rec .mgid ,
3769
3786
be16_to_cpu (multicast -> rec .mlid ));
3787
+ if (!status )
3788
+ pr_debug_ratelimited ("RDMA CM: MULTICAST_ERROR: failed to attach QP. status %d\n" ,
3789
+ status );
3790
+ }
3770
3791
mutex_unlock (& id_priv -> qp_mutex );
3771
3792
3772
3793
memset (& event , 0 , sizeof event );
0 commit comments