All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Yishai Hadas <yishaih@nvidia.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Edward Srouji <edwards@nvidia.com>,
	linux-rdma@vger.kernel.org, Maor Gottlieb <maorg@nvidia.com>,
	Mark Zhang <markzhang@nvidia.com>,
	Michael Guralnik <michaelgur@nvidia.com>,
	Or Har-Toov <ohartoov@nvidia.com>,
	Tamar Mashiah <tmashiah@nvidia.com>
Subject: [PATCH rdma-next v1 3/6] RDMA/mlx5: Relax DEVX access upon modify commands
Date: Sun, 28 Jan 2024 11:29:13 +0200	[thread overview]
Message-ID: <7407d5ed35dc427c1097699e12b49c01e1073406.1706433934.git.leon@kernel.org> (raw)
In-Reply-To: <cover.1706433934.git.leon@kernel.org>

From: Yishai Hadas <yishaih@nvidia.com>

Relax DEVX access upon modify commands to be UVERBS_ACCESS_READ.

The kernel doesn't need to protect what firmware protects, or what
causes no damage to anyone but the user.

As firmware needs to protect itself from parallel access to the same
object, don't block parallel modify/query commands on the same object in
the kernel side.

This change will allow user space application to run parallel updates to
different entries in the same bulk object.

Tested-by: Tamar Mashiah <tmashiah@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/hw/mlx5/devx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c
index 4d8f5180134e..9d91790a2af2 100644
--- a/drivers/infiniband/hw/mlx5/devx.c
+++ b/drivers/infiniband/hw/mlx5/devx.c
@@ -2950,7 +2950,7 @@ DECLARE_UVERBS_NAMED_METHOD(
 	MLX5_IB_METHOD_DEVX_OBJ_MODIFY,
 	UVERBS_ATTR_IDR(MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE,
 			UVERBS_IDR_ANY_OBJECT,
-			UVERBS_ACCESS_WRITE,
+			UVERBS_ACCESS_READ,
 			UA_MANDATORY),
 	UVERBS_ATTR_PTR_IN(
 		MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN,
-- 
2.43.0


  parent reply	other threads:[~2024-01-28  9:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28  9:29 [PATCH rdma-next v1 0/6] Collection of mlx5_ib fixes Leon Romanovsky
2024-01-28  9:29 ` [PATCH rdma-next v1 1/6] RDMA/mlx5: Fix fortify source warning while accessing Eth segment Leon Romanovsky
2024-01-28  9:29 ` [PATCH rdma-next v1 2/6] IB/mlx5: Don't expose debugfs entries for RRoCE general parameters if not supported Leon Romanovsky
2024-01-28  9:29 ` Leon Romanovsky [this message]
2024-01-28  9:29 ` [PATCH rdma-next v1 4/6] RDMA/mlx5: Uncacheable mkey has neither rb_key or cache_ent Leon Romanovsky
2024-01-28  9:29 ` [PATCH rdma-next v1 5/6] RDMA/mlx5: Change check for cacheable user mkeys Leon Romanovsky
2024-01-29 17:52   ` Jason Gunthorpe
2024-01-30 13:47     ` Leon Romanovsky
2024-01-28  9:29 ` [PATCH rdma-next v1 6/6] RDMA/mlx5: Adding remote atomic access flag to updatable flags Leon Romanovsky
2024-01-31  9:16 ` (subset) [PATCH rdma-next v1 0/6] Collection of mlx5_ib fixes Leon Romanovsky
2024-01-31  9:18 ` 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=7407d5ed35dc427c1097699e12b49c01e1073406.1706433934.git.leon@kernel.org \
    --to=leon@kernel.org \
    --cc=edwards@nvidia.com \
    --cc=jgg@nvidia.com \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@nvidia.com \
    --cc=markzhang@nvidia.com \
    --cc=michaelgur@nvidia.com \
    --cc=ohartoov@nvidia.com \
    --cc=tmashiah@nvidia.com \
    --cc=yishaih@nvidia.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 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.