From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Lior Nahmanson <liorna@nvidia.com>,
linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
Meir Lichtinger <meirl@nvidia.com>,
netdev@vger.kernel.org, Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [PATCH rdma-next v1 2/3] RDMA/mlx5: Separate DCI QP creation logic
Date: Tue, 22 Jun 2021 15:45:56 -0300 [thread overview]
Message-ID: <20210622184556.GA2596427@nvidia.com> (raw)
In-Reply-To: <b4530bdd999349c59691224f016ff1efb5dc3b92.1624258894.git.leonro@nvidia.com>
On Mon, Jun 21, 2021 at 10:06:15AM +0300, Leon Romanovsky wrote:
> From: Lior Nahmanson <liorna@nvidia.com>
>
> This patch isolates DCI QP creation logic to separate function, so this
> change will reduce complexity when adding new features to DCI QP without
> interfering with other QP types.
>
> The code was copied from create_user_qp() while taking only DCI relevant bits.
>
> Reviewed-by: Meir Lichtinger <meirl@nvidia.com>
> Signed-off-by: Lior Nahmanson <liorna@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> drivers/infiniband/hw/mlx5/qp.c | 157 ++++++++++++++++++++++++++++++++
> 1 file changed, 157 insertions(+)
>
> diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
> index 7a5f1eba60e3..65a380543f5a 100644
> +++ b/drivers/infiniband/hw/mlx5/qp.c
> @@ -1974,6 +1974,160 @@ static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
> return 0;
> }
>
> +static int create_dci(struct mlx5_ib_dev *dev, struct ib_pd *pd,
> + struct mlx5_ib_qp *qp,
> + struct mlx5_create_qp_params *params)
> +{
This is a huge amount of copying just to add 4 lines, why?
There must be a better way to do this qp stuff.
Why not put more stuff in _create_user_qp()?
Jason
next prev parent reply other threads:[~2021-06-22 18:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 7:06 [PATCH rdma-next v1 0/3] Add ConnectX DCS offload support Leon Romanovsky
2021-06-21 7:06 ` [PATCH mlx5-next v1 1/3] net/mlx5: Add DCS caps & fields support Leon Romanovsky
2021-06-21 7:06 ` [PATCH rdma-next v1 2/3] RDMA/mlx5: Separate DCI QP creation logic Leon Romanovsky
2021-06-22 18:45 ` Jason Gunthorpe [this message]
2021-06-23 6:03 ` Leon Romanovsky
2021-06-21 7:06 ` [PATCH rdma-next v1 3/3] RDMA/mlx5: Add DCS offload support Leon Romanovsky
2021-07-16 15:42 ` [PATCH rdma-next v1 0/3] Add ConnectX " Jason Gunthorpe
2021-07-18 10:38 ` Leon Romanovsky
2021-07-20 18:18 ` Jason Gunthorpe
2021-07-21 4:34 ` 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=20210622184556.GA2596427@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=liorna@nvidia.com \
--cc=meirl@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@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;
as well as URLs for NNTP newsgroup(s).