All of lore.kernel.org
 help / color / mirror / Atom feed
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: [PATCH rdma-core 06/12] librdmacm: Connect rdma_connect to the ECE
Date: Mon, 20 Apr 2020 17:06:42 +0300	[thread overview]
Message-ID: <20200420140648.275554-7-leon@kernel.org> (raw)
In-Reply-To: <20200420140648.275554-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 a12ed1e0..91735225 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.25.2


  parent reply	other threads:[~2020-04-20 14:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 14:06 [PATCH rdma-core 00/12] Add Enhanced Connection Established (ECE) APIs Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 01/12] Update kernel headers Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 02/12] libibverbs: Add interfaces to configure and use ECE Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 03/12] libibverbs: Document ECE API Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 04/12] debian: Install all available librdmacm man pages Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 05/12] librdmacm: Provide interface to use ECE for external QPs Leon Romanovsky
2020-04-20 14:06 ` Leon Romanovsky [this message]
2020-04-20 14:06 ` [PATCH rdma-core 07/12] librdmacm: Return ECE results through rdma_accept Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 08/12] librdmacm: Add an option to reject ECE request Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 09/12] librdmacm: Implement ECE handshake logic Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 10/12] librdmacm: Document ECE API Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 11/12] pyverbs: Add support for ECE Leon Romanovsky
2020-04-20 14:06 ` [PATCH rdma-core 12/12] tests: Add test for rdmacm ECE mechanism 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=20200420140648.275554-7-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.