From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH mlx5-next 04/13] net/mlx5: Open-code modify QP in steering module
Date: Mon, 13 Apr 2020 17:22:59 +0300 [thread overview]
Message-ID: <20200413142308.936946-5-leon@kernel.org> (raw)
In-Reply-To: <20200413142308.936946-1-leon@kernel.org>
From: Leon Romanovsky <leonro@mellanox.com>
Remove dependency on qp.c from SW steering by open
coding modify QP interface.
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
.../mellanox/mlx5/core/steering/dr_send.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
index 690e4181db4c..266b913d2f9a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
@@ -585,8 +585,10 @@ static int dr_modify_qp_rst2init(struct mlx5_core_dev *mdev,
MLX5_SET(qpc, qpc, rre, 1);
MLX5_SET(qpc, qpc, rwe, 1);
- return mlx5_core_qp_modify(mdev, MLX5_CMD_OP_RST2INIT_QP, 0, qpc,
- &dr_qp->mqp);
+ MLX5_SET(rst2init_qp_in, in, opcode, MLX5_CMD_OP_RST2INIT_QP);
+ MLX5_SET(rst2init_qp_in, in, qpn, dr_qp->mqp.qpn);
+
+ return mlx5_cmd_exec_in(mdev, rst2init_qp, in);
}
static int dr_cmd_modify_qp_rtr2rts(struct mlx5_core_dev *mdev,
@@ -600,12 +602,13 @@ static int dr_cmd_modify_qp_rtr2rts(struct mlx5_core_dev *mdev,
MLX5_SET(rtr2rts_qp_in, in, qpn, dr_qp->mqp.qpn);
- MLX5_SET(qpc, qpc, log_ack_req_freq, 0);
MLX5_SET(qpc, qpc, retry_count, attr->retry_cnt);
MLX5_SET(qpc, qpc, rnr_retry, attr->rnr_retry);
- return mlx5_core_qp_modify(mdev, MLX5_CMD_OP_RTR2RTS_QP, 0, qpc,
- &dr_qp->mqp);
+ MLX5_SET(rtr2rts_qp_in, in, opcode, MLX5_CMD_OP_RTR2RTS_QP);
+ MLX5_SET(rtr2rts_qp_in, in, qpn, dr_qp->mqp.qpn);
+
+ return mlx5_cmd_exec_in(mdev, rtr2rts_qp, in);
}
static int dr_cmd_modify_qp_init2rtr(struct mlx5_core_dev *mdev,
@@ -636,8 +639,10 @@ static int dr_cmd_modify_qp_init2rtr(struct mlx5_core_dev *mdev,
MLX5_SET(qpc, qpc, primary_address_path.vhca_port_num, attr->port_num);
MLX5_SET(qpc, qpc, min_rnr_nak, 1);
- return mlx5_core_qp_modify(mdev, MLX5_CMD_OP_INIT2RTR_QP, 0, qpc,
- &dr_qp->mqp);
+ MLX5_SET(init2rtr_qp_in, in, opcode, MLX5_CMD_OP_INIT2RTR_QP);
+ MLX5_SET(init2rtr_qp_in, in, qpn, dr_qp->mqp.qpn);
+
+ return mlx5_cmd_exec_in(mdev, init2rtr_qp, in);
}
static int dr_prepare_qp_to_rts(struct mlx5dr_domain *dmn)
--
2.25.2
next prev parent reply other threads:[~2020-04-13 14:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 14:22 [PATCH mlx5-next 00/13] Move QP code to be under mlx5_ib responsibility Leon Romanovsky
2020-04-13 14:22 ` [PATCH mlx5-next 01/13] net/mlx5: Provide simplified command interfaces Leon Romanovsky
2020-04-13 14:22 ` [PATCH mlx5-next 02/13] net/mlx5: Open-code create and destroy QP calls Leon Romanovsky
2020-04-13 14:22 ` [PATCH mlx5-next 03/13] net/mlx5: Remove empty QP and CQ events handlers Leon Romanovsky
2020-04-13 14:22 ` Leon Romanovsky [this message]
2020-04-13 14:23 ` [PATCH mlx5-next 05/13] net/mlx5: Open-code modify QP in the FPGA module Leon Romanovsky
2020-04-13 14:23 ` [PATCH mlx5-next 06/13] net/mlx5: Open-code modify QP in the IPoIB module Leon Romanovsky
2020-04-13 14:23 ` [PATCH mlx5-next 07/13] net/mlx5: Remove extra indirection while storing QPN Leon Romanovsky
2020-04-13 14:23 ` [PATCH mlx5-next 08/13] net/mlx5: Replace hand written QP context struct with automatic getters Leon Romanovsky
2020-04-13 14:23 ` [PATCH mlx5-next 09/13] net/mlx5: Remove Q counter low level helper APIs Leon Romanovsky
2020-04-13 14:23 ` [PATCH mlx5-next 11/13] net/mlx5: Delete not-used cmd header Leon Romanovsky
2020-04-13 14:23 ` [PATCH mlx5-next 13/13] net/mlx5: Move QP logic to mlx5_ib Leon Romanovsky
2020-04-19 12:56 ` [PATCH mlx5-next 00/13] Move QP code to be under mlx5_ib responsibility 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=20200413142308.936946-5-leon@kernel.org \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@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).