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>,
Yishai Hadas <yishaih@mellanox.com>,
Yonatan Cohen <yonatanc@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH rdma-next 3/3] IB/mlx5: Introduce a new mini-CQE format
Date: Mon, 28 May 2018 10:11:48 -0600 [thread overview]
Message-ID: <20180528161148.GD17491@mellanox.com> (raw)
In-Reply-To: <20180527104234.17261-4-leon@kernel.org>
On Sun, May 27, 2018 at 01:42:34PM +0300, Leon Romanovsky wrote:
> From: Yonatan Cohen <yonatanc@mellanox.com>
>
> The new mini-CQE format includes the stride index, byte count and
> packet checksum.
> Stride index is needed for striding WQ feature.
> This patch exposes this capability and enables its setting
> via mlx5 UHW data as part of query device and cq creation.
>
> Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
> Reviewed-by: Guy Levi <guyle@mellanox.com>
> Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> drivers/infiniband/hw/mlx5/cq.c | 42 +++++++++++++++++++++++++++++----------
> drivers/infiniband/hw/mlx5/main.c | 4 ++++
> include/uapi/rdma/mlx5-abi.h | 2 +-
> 3 files changed, 37 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c
> index 7b4ce1a19de0..ad39d64b8108 100644
> +++ b/drivers/infiniband/hw/mlx5/cq.c
> @@ -751,6 +751,28 @@ static int alloc_cq_frag_buf(struct mlx5_ib_dev *dev,
> return 0;
> }
>
> +enum {
> + MLX5_CQE_RES_FORMAT_HASH = 0,
> + MLX5_CQE_RES_FORMAT_CSUM = 1,
> + MLX5_CQE_RES_FORMAT_CSUM_STRIDX = 3,
> +};
What is this??
> +static int mini_cqe_res_format_to_hw(struct mlx5_ib_dev *dev, u8 format)
> +{
> + switch (format) {
> + case MLX5_IB_CQE_RES_FORMAT_HASH:
> + return MLX5_CQE_RES_FORMAT_HASH;
Used here..
> + mini_cqe_format =
> + mini_cqe_res_format_to_hw(dev,
> + ucmd.cqe_comp_res_format);
And format comes from a ucmd, so that enum is upai.
Put it in the right place and put the right comment beside
struct mlx5_ib_create_cq's cqe_comp_res_format..
And what is wrong with the user space patches? Where is the update to
enum mlx5dv_cqe_comp_res_format ? And why is this wrong?
struct mlx5dv_cq_init_attr {
uint64_t comp_mask; /* Use enum mlx5dv_cq_init_attr_mask */
uint8_t cqe_comp_res_format; /* Use enum mlx5dv_cqe_comp_res_format */
^^^^^^^^^^^^^^^^^^^^^^^^^^
No, it isn't, and there isn't even an enum for it. Are you sure this is
designed right? Looks pretty wrong to me.
Fix it all please, and you need to arrange things to share the uapi
header with dv just like verbs is doing.
No more of this lax attitude toward uapi!
Jason
next prev parent reply other threads:[~2018-05-28 16:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-27 10:42 [PATCH rdma-next 0/3] Introduce new mlx5 CQE format Leon Romanovsky
2018-05-27 10:42 ` [PATCH mlx5-next 1/3] net/mlx5: Exposing a new mini-CQE format Leon Romanovsky
2018-05-29 21:01 ` Saeed Mahameed
2018-05-29 21:35 ` Jason Gunthorpe
2018-05-27 10:42 ` [PATCH rdma-next 2/3] IB/mlx5: Refactor CQE compression response Leon Romanovsky
2018-05-27 10:42 ` [PATCH rdma-next 3/3] IB/mlx5: Introduce a new mini-CQE format Leon Romanovsky
2018-05-28 16:11 ` Jason Gunthorpe [this message]
2018-05-28 16:52 ` Yishai Hadas
2018-05-28 17:00 ` Jason Gunthorpe
2018-05-29 20:05 ` [PATCH rdma-next 0/3] Introduce new mlx5 CQE format 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=20180528161148.GD17491@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=yishaih@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;
as well as URLs for NNTP newsgroup(s).