From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>, linux-rdma@vger.kernel.org
Subject: [RFC PATCH rdma-core 07/11] librdmacm: Connect rdma_connect to the ECE
Date: Thu, 5 Mar 2020 17:03:52 +0200 [thread overview]
Message-ID: <20200305150356.208843-8-leon@kernel.org> (raw)
In-Reply-To: <20200305150356.208843-1-leon@kernel.org>
From: Leon Romanovsky <leonro@mellanox.com>
The ECE options are handled to the kernel at the time
of connection request, e.g. rdma_connect().
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
librdmacm/cma.c | 9 +++++++++
librdmacm/rdma_cma_abi.h | 6 ++++++
2 files changed, 15 insertions(+)
diff --git a/librdmacm/cma.c b/librdmacm/cma.c
index 8d2342b5..e912410b 100644
--- a/librdmacm/cma.c
+++ b/librdmacm/cma.c
@@ -1547,6 +1547,13 @@ static void ucma_copy_conn_param_to_kern(struct cma_id_private *id_priv,
}
}
+static void ucma_copy_ece_param_to_kern_req(struct cma_id_private *id_priv,
+ struct ucma_abi_ece *dst)
+{
+ dst->vendor_id = id_priv->local_ece.vendor_id;
+ dst->attr_mod = id_priv->local_ece.options;
+}
+
int rdma_connect(struct rdma_cm_id *id, struct rdma_conn_param *conn_param)
{
uint32_t qp_num = (conn_param) ? conn_param->qp_num : 0;
@@ -1579,6 +1586,8 @@ int rdma_connect(struct rdma_cm_id *id, struct rdma_conn_param *conn_param)
ucma_copy_conn_param_to_kern(id_priv, &cmd.conn_param, conn_param,
qp_num, srq);
+ ucma_copy_ece_param_to_kern_req(id_priv, &cmd.ece);
+
ret = write(id->channel->fd, &cmd, sizeof cmd);
if (ret != sizeof cmd)
return (ret >= 0) ? ERR(ENODATA) : -1;
diff --git a/librdmacm/rdma_cma_abi.h b/librdmacm/rdma_cma_abi.h
index ab4adb00..6451862e 100644
--- a/librdmacm/rdma_cma_abi.h
+++ b/librdmacm/rdma_cma_abi.h
@@ -223,6 +223,11 @@ struct ucma_abi_ud_param {
__u8 reserved2[4]; /* Round to 8-byte boundary to support 32/64 */
};
+struct ucma_abi_ece {
+ __u32 vendor_id;
+ __u32 attr_mod;
+};
+
struct ucma_abi_connect {
__u32 cmd;
__u16 in;
@@ -230,6 +235,7 @@ struct ucma_abi_connect {
struct ucma_abi_conn_param conn_param;
__u32 id;
__u32 reserved;
+ struct ucma_abi_ece ece;
};
struct ucma_abi_listen {
--
2.24.1
next prev parent reply other threads:[~2020-03-05 15:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 15:03 [RFC PATCH rdma-core 00/11] Add Enhanced Connection Established (ECE) APIs Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 01/11] Update kernel headers Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 02/11] libibverbs: Add interfaces to configure and use ECE Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 03/11] mlx5: Implement ECE callbacks Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 04/11] libibverbs: Document ECE API Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 05/11] debian: Install all available librdmacm man pages Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 06/11] librdmacm: Provide interface to use ECE for external QPs Leon Romanovsky
2020-03-05 15:03 ` Leon Romanovsky [this message]
2020-03-05 15:03 ` [RFC PATCH rdma-core 08/11] librdmacm: Return ECE results through rdma_accept Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 09/11] librdmacm: Add an option to reject ECE request Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 10/11] librdmacm: Implement ECE handshake logic Leon Romanovsky
2020-03-05 15:03 ` [RFC PATCH rdma-core 11/11] librdmacm: Document ECE API Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200305150356.208843-8-leon@kernel.org \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).