|
@@ -115,6 +115,19 @@ const char *__attribute_const__ rdma_reject_msg(struct rdma_cm_id *id,
|
|
|
}
|
|
|
EXPORT_SYMBOL(rdma_reject_msg);
|
|
|
|
|
|
+bool rdma_is_consumer_reject(struct rdma_cm_id *id, int reason)
|
|
|
+{
|
|
|
+ if (rdma_ib_or_roce(id->device, id->port_num))
|
|
|
+ return reason == IB_CM_REJ_CONSUMER_DEFINED;
|
|
|
+
|
|
|
+ if (rdma_protocol_iwarp(id->device, id->port_num))
|
|
|
+ return reason == -ECONNREFUSED;
|
|
|
+
|
|
|
+ WARN_ON_ONCE(1);
|
|
|
+ return false;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(rdma_is_consumer_reject);
|
|
|
+
|
|
|
static void cma_add_one(struct ib_device *device);
|
|
|
static void cma_remove_one(struct ib_device *device, void *client_data);
|
|
|
|