From: Jason Gunthorpe <jgg@mellanox.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Leon Romanovsky <leonro@mellanox.com>,
RDMA mailing list <linux-rdma@vger.kernel.org>,
Guy Levi <guyle@mellanox.com>,
Yonatan Cohen <yonatanc@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH rdma-next 3/4] IB/mlx5: Verify that driver supports user flags
Date: Sun, 7 Oct 2018 13:13:45 -0600 [thread overview]
Message-ID: <20181007191345.GD20234@mellanox.com> (raw)
In-Reply-To: <20181007090337.21037-4-leon@kernel.org>
On Sun, Oct 07, 2018 at 12:03:36PM +0300, Leon Romanovsky wrote:
> From: Yonatan Cohen <yonatanc@mellanox.com>
>
> Flags sent down from user might not be supported by
> running driver.
> This might lead to unwanted bugs.
> To solve this, added macro to test for unsupported flags.
>
> Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> drivers/infiniband/hw/mlx5/qp.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
> index bae48bdf281c..17c4b6641933 100644
> +++ b/drivers/infiniband/hw/mlx5/qp.c
> @@ -1728,6 +1728,15 @@ static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev,
> MLX5_SET(qpc, qpc, cs_req, MLX5_REQ_SCAT_DATA32_CQE);
> }
>
> +#define MLX5_QP_CREATE_FLAGS_NOT_SUPPORTED(flags) \
> + ((flags) & ~( \
This needs a cast, it would be better to add something like the check
comp mask function in rdma-core than this goofy macro thing.
Jason
next prev parent reply other threads:[~2018-10-07 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-07 9:03 [PATCH rdma-next 0/4] Scatter to CQE Leon Romanovsky
2018-10-07 9:03 ` [PATCH mlx5-next 1/4] net/mlx5: Expose DC scatter to CQE capability bit Leon Romanovsky
2018-10-07 9:03 ` [PATCH rdma-next 2/4] IB/mlx5: Support scatter to CQE for DC transport type Leon Romanovsky
2018-10-07 9:03 ` [PATCH rdma-next 3/4] IB/mlx5: Verify that driver supports user flags Leon Romanovsky
2018-10-07 19:13 ` Jason Gunthorpe [this message]
2018-10-07 9:03 ` [PATCH rdma-next 4/4] IB/mlx5: Allow scatter to CQE without global signaled WRs 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=20181007191345.GD20234@mellanox.com \
--to=jgg@mellanox.com \
--cc=dledford@redhat.com \
--cc=guyle@mellanox.com \
--cc=leon@kernel.org \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=yonatanc@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