Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: Bernard Metzler <bmt@zurich.ibm.com>,
	<linux-rdma@vger.kernel.org>, Zhu Yanjun <yanjunz@nvidia.com>
Subject: Re: [PATCH] RDMA/rxe,siw: Restore uverbs_cmd_mask IB_USER_VERBS_CMD_POST_SEND
Date: Fri, 30 Oct 2020 13:25:08 -0300	[thread overview]
Message-ID: <20201030162508.GA3195718@nvidia.com> (raw)
In-Reply-To: <77c24a90-0df2-e0b4-02a7-6f88f2aa9b46@gmail.com>

On Fri, Oct 30, 2020 at 11:18:15AM -0500, Bob Pearson wrote:

> This the right short term fix but seriously why not just completely
> kill off uverbs_cmd_mask? If a driver sets a non-NULL value in
> ib_device_ops assume it was done for a reason and allow commands
> through. Is there any example of a driver using uverbs_cmd_mask to
> dynamically enable/disable a verb? I thought this was your plan when
> you mentioned this change a while back.

The remaining ops are all shared with the kernel, so nearly all
drivers set the post_send op but only a few are prepared for it to be
called from userspace.

It is an unfortuante side effect of co-mingling the kernel and user API.

The only way out would be to split the remaining ops into user/kernel
versions and require drivers to set the user op pointer.

These would be effected:

        rdi->ibdev.uverbs_cmd_mask |=
                (1ull << IB_USER_VERBS_CMD_POLL_CQ)             |
                (1ull << IB_USER_VERBS_CMD_REQ_NOTIFY_CQ)       |
                (1ull << IB_USER_VERBS_CMD_POST_SEND)           |
                (1ull << IB_USER_VERBS_CMD_POST_RECV)           |
                (1ull << IB_USER_VERBS_CMD_POST_SRQ_RECV);

I thought about doing it, maybe I should check again

Jason

  reply	other threads:[~2020-10-30 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 14:03 [PATCH] RDMA/rxe,siw: Restore uverbs_cmd_mask IB_USER_VERBS_CMD_POST_SEND Jason Gunthorpe
2020-10-30 16:18 ` Bob Pearson
2020-10-30 16:25   ` Jason Gunthorpe [this message]
2020-11-02 19:32 ` 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=20201030162508.GA3195718@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=bmt@zurich.ibm.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=yanjunz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox