summaryrefslogtreecommitdiff
path: root/include/rdma
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-07-16 11:50:11 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-07-26 18:47:47 +0300
commitcee104334c98dd04e9dd4d9a4fa4784f7f6aada9 (patch)
tree161dad5624ed86258e0609f49c2022c42222f4ee /include/rdma
parentd238ca09810a02e9224c698094afda0e8003f419 (diff)
downloadlinux-cee104334c98dd04e9dd4d9a4fa4784f7f6aada9.tar.xz
IB/core: Introduce and use sgid_attr in CM requests
For RoCE, when CM requests are received for RC and UD connections, netdevice of the incoming request is unavailable. Because of that CM requests are always forwarded to init_net namespace. Now that we have the GID attribute available, introduce SGID attribute in incoming CM requests and refer to the netdevice of it. This is similar to existing SGID attribute field in outgoing CM requests for RC and UD transports. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_cm.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h
index c98d603c0b63..568708a87239 100644
--- a/include/rdma/ib_cm.h
+++ b/include/rdma/ib_cm.h
@@ -120,6 +120,13 @@ struct ib_cm_req_event_param {
struct sa_path_rec *primary_path;
struct sa_path_rec *alternate_path;
+ /*
+ * SGID attribute of the primary path. Currently only
+ * useful for RoCE. Alternate path GID attributes
+ * are not yet supported.
+ */
+ const struct ib_gid_attr *ppath_sgid_attr;
+
__be64 remote_ca_guid;
u32 remote_qkey;
u32 remote_qpn;
@@ -226,6 +233,12 @@ struct ib_cm_apr_event_param {
struct ib_cm_sidr_req_event_param {
struct ib_cm_id *listen_id;
__be64 service_id;
+
+ /*
+ * SGID attribute of the request. Currently only
+ * useful for RoCE.
+ */
+ const struct ib_gid_attr *sgid_attr;
/* P_Key that was used by the GMP's BTH header */
u16 bth_pkey;
u8 port;