linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@mellanox.com>,
	Christoph Hellwig <hch@infradead.org>
Cc: Leon Romanovsky <leonro@mellanox.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	Yamin Friedman <yaminf@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	linux-netdev <netdev@vger.kernel.org>
Subject: [PATCH rdma-next v2 3/3] RDMA/mlx5: Add capability for max sge to get optimized performance
Date: Mon,  7 Oct 2019 16:59:33 +0300	[thread overview]
Message-ID: <20191007135933.12483-4-leon@kernel.org> (raw)
In-Reply-To: <20191007135933.12483-1-leon@kernel.org>

From: Yamin Friedman <yaminf@mellanox.com>

Allows the IB device to provide a value of maximum scatter gather entries
per RDMA READ.

In certain cases it may be preferable for a device to perform UMR memory
registration rather than have many scatter entries in a single RDMA READ.
This provides a significant performance increase in devices capable of
using different memory registration schemes based on the number of scatter
gather entries. This general capability allows each device vendor to fine
tune when it is better to use memory registration.

Signed-off-by: Yamin Friedman <yaminf@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index fa23c8e7043b..39d54e285ae9 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1012,6 +1012,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
 		1 << MLX5_CAP_GEN(mdev, log_max_klm_list_size);
 	props->max_pi_fast_reg_page_list_len =
 		props->max_fast_reg_page_list_len / 2;
+	props->max_sgl_rd =
+		MLX5_CAP_GEN(mdev, max_sgl_for_optimized_performance);
 	get_atomic_caps_qp(dev, props);
 	props->masked_atomic_cap   = IB_ATOMIC_NONE;
 	props->max_mcast_grp	   = 1 << MLX5_CAP_GEN(mdev, log_max_mcg);
--
2.20.1


  parent reply	other threads:[~2019-10-07 13:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 13:59 [PATCH rdma-next v2 0/3] Optimize SGL registration Leon Romanovsky
2019-10-07 13:59 ` [PATCH mlx5-next v2 1/3] net/mlx5: Expose optimal performance scatter entries capability Leon Romanovsky
2019-10-07 15:02   ` Bart Van Assche
2019-10-07 15:54     ` Leon Romanovsky
2019-10-08  5:55   ` Leon Romanovsky
2019-10-07 13:59 ` [PATCH rdma-next v2 2/3] RDMA/rw: Support threshold for registration vs scattering to local pages Leon Romanovsky
2019-10-07 15:00   ` Christoph Hellwig
2019-10-07 15:57     ` Leon Romanovsky
2019-10-07 15:07   ` Bart Van Assche
2019-10-07 16:03     ` Leon Romanovsky
2019-10-07 22:22       ` Bart Van Assche
2019-10-08  5:53         ` Leon Romanovsky
2019-10-07 15:12   ` Bart Van Assche
2019-10-07 15:58     ` Leon Romanovsky
2019-10-07 13:59 ` Leon Romanovsky [this message]
2019-10-15  8:15 ` [PATCH rdma-next v2 0/3] Optimize SGL registration Leon Romanovsky
2019-10-22 17:42 ` Jason Gunthorpe

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=20191007135933.12483-4-leon@kernel.org \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=hch@infradead.org \
    --cc=jgg@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=saeedm@mellanox.com \
    --cc=yaminf@mellanox.com \
    /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).