mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
RDMA/cma: Provide ECE reject reason
IBTA declares "vendor option not supported" reject reason in REJ messages if passive side doesn't want to accept proposed ECE options. Due to the fact that ECE is managed by userspace, there is a need to let users to provide such rejected reason. Link: https://lore.kernel.org/r/20200526103304.196371-7-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
0cb15372a6
commit
8094ba0ace
@@ -15,6 +15,7 @@
|
||||
#include <linux/in.h>
|
||||
#include <linux/in6.h>
|
||||
#include <rdma/ib_verbs.h>
|
||||
#include <rdma/ib_cm.h>
|
||||
#include <rdma/rdma_cm.h>
|
||||
#include <target/target_core_base.h>
|
||||
#include <target/target_core_fabric.h>
|
||||
@@ -502,7 +503,7 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
|
||||
if (!np->enabled) {
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
isert_dbg("iscsi_np is not enabled, reject connect request\n");
|
||||
return rdma_reject(cma_id, NULL, 0);
|
||||
return rdma_reject(cma_id, NULL, 0, IB_CM_REJ_CONSUMER_DEFINED);
|
||||
}
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
|
||||
@@ -553,7 +554,7 @@ out_rsp_dma_map:
|
||||
isert_free_login_buf(isert_conn);
|
||||
out:
|
||||
kfree(isert_conn);
|
||||
rdma_reject(cma_id, NULL, 0);
|
||||
rdma_reject(cma_id, NULL, 0, IB_CM_REJ_CONSUMER_DEFINED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "rtrs-srv.h"
|
||||
#include "rtrs-log.h"
|
||||
#include <rdma/ib_cm.h>
|
||||
|
||||
MODULE_DESCRIPTION("RDMA Transport Server");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -1576,7 +1577,7 @@ static int rtrs_rdma_do_reject(struct rdma_cm_id *cm_id, int errno)
|
||||
.errno = cpu_to_le16(errno),
|
||||
};
|
||||
|
||||
err = rdma_reject(cm_id, &msg, sizeof(msg));
|
||||
err = rdma_reject(cm_id, &msg, sizeof(msg), IB_CM_REJ_CONSUMER_DEFINED);
|
||||
if (err)
|
||||
pr_err("rdma_reject(), err: %d\n", err);
|
||||
|
||||
|
||||
@@ -2497,7 +2497,8 @@ reject:
|
||||
SRP_BUF_FORMAT_INDIRECT);
|
||||
|
||||
if (rdma_cm_id)
|
||||
rdma_reject(rdma_cm_id, rej, sizeof(*rej));
|
||||
rdma_reject(rdma_cm_id, rej, sizeof(*rej),
|
||||
IB_CM_REJ_CONSUMER_DEFINED);
|
||||
else
|
||||
ib_send_cm_rej(ib_cm_id, IB_CM_REJ_CONSUMER_DEFINED, NULL, 0,
|
||||
rej, sizeof(*rej));
|
||||
|
||||
Reference in New Issue
Block a user