From: Selvin Xavier <selvin.xavier@broadcom.com>
To: jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com,
Selvin Xavier <selvin.xavier@broadcom.com>
Subject: [PATCH for-next v2 2/7] RDMA/bnxt_re: Remove HW queue mapping from RoCE Driver
Date: Sat, 25 Mar 2023 11:44:09 -0700 [thread overview]
Message-ID: <1679769854-30605-3-git-send-email-selvin.xavier@broadcom.com> (raw)
In-Reply-To: <1679769854-30605-1-git-send-email-selvin.xavier@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 4994 bytes --]
bnxt_en driver does the queue mapping for RoCE traffic. Removing the
queue mapping from RoCE driver.
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
drivers/infiniband/hw/bnxt_re/main.c | 77 --------------------------------
drivers/infiniband/hw/bnxt_re/qplib_sp.c | 15 -------
drivers/infiniband/hw/bnxt_re/qplib_sp.h | 1 -
3 files changed, 93 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 48bbba7..4aa3442 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -921,49 +921,6 @@ static void bnxt_re_dispatch_event(struct ib_device *ibdev, struct ib_qp *qp,
}
}
-#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_IVLAN 0x02
-static int bnxt_re_query_hwrm_pri2cos(struct bnxt_re_dev *rdev, u8 dir,
- u64 *cid_map)
-{
- struct hwrm_queue_pri2cos_qcfg_input req = {0};
- struct hwrm_queue_pri2cos_qcfg_output resp;
- struct bnxt_en_dev *en_dev = rdev->en_dev;
- struct bnxt_fw_msg fw_msg;
- u32 flags = 0;
- u8 *qcfgmap, *tmp_map;
- int rc = 0, i;
-
- if (!cid_map)
- return -EINVAL;
-
- memset(&fw_msg, 0, sizeof(fw_msg));
- bnxt_re_init_hwrm_hdr(rdev, (void *)&req,
- HWRM_QUEUE_PRI2COS_QCFG, -1, -1);
- flags |= (dir & 0x01);
- flags |= HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_IVLAN;
- req.flags = cpu_to_le32(flags);
- req.port_id = en_dev->pf_port_id;
-
- bnxt_re_fill_fw_msg(&fw_msg, (void *)&req, sizeof(req), (void *)&resp,
- sizeof(resp), DFLT_HWRM_CMD_TIMEOUT);
- rc = bnxt_send_msg(en_dev, &fw_msg);
- if (rc)
- return rc;
-
- if (resp.queue_cfg_info) {
- ibdev_warn(&rdev->ibdev,
- "Asymmetric cos queue configuration detected");
- ibdev_warn(&rdev->ibdev,
- " on device, QoS may not be fully functional\n");
- }
- qcfgmap = &resp.pri0_cos_queue_id;
- tmp_map = (u8 *)cid_map;
- for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++)
- tmp_map[i] = qcfgmap[i];
-
- return rc;
-}
-
static bool bnxt_re_is_qp1_or_shadow_qp(struct bnxt_re_dev *rdev,
struct bnxt_re_qp *qp)
{
@@ -1056,26 +1013,9 @@ static u32 bnxt_re_get_priority_mask(struct bnxt_re_dev *rdev)
return prio_map;
}
-static void bnxt_re_parse_cid_map(u8 prio_map, u8 *cid_map, u16 *cosq)
-{
- u16 prio;
- u8 id;
-
- for (prio = 0, id = 0; prio < 8; prio++) {
- if (prio_map & (1 << prio)) {
- cosq[id] = cid_map[prio];
- id++;
- if (id == 2) /* Max 2 tcs supported */
- break;
- }
- }
-}
-
static int bnxt_re_setup_qos(struct bnxt_re_dev *rdev)
{
u8 prio_map = 0;
- u64 cid_map;
- int rc;
/* Get priority for roce */
prio_map = bnxt_re_get_priority_mask(rdev);
@@ -1083,23 +1023,6 @@ static int bnxt_re_setup_qos(struct bnxt_re_dev *rdev)
if (prio_map == rdev->cur_prio_map)
return 0;
rdev->cur_prio_map = prio_map;
- /* Get cosq id for this priority */
- rc = bnxt_re_query_hwrm_pri2cos(rdev, 0, &cid_map);
- if (rc) {
- ibdev_warn(&rdev->ibdev, "no cos for p_mask %x\n", prio_map);
- return rc;
- }
- /* Parse CoS IDs for app priority */
- bnxt_re_parse_cid_map(prio_map, (u8 *)&cid_map, rdev->cosq);
-
- /* Config BONO. */
- rc = bnxt_qplib_map_tc2cos(&rdev->qplib_res, rdev->cosq);
- if (rc) {
- ibdev_warn(&rdev->ibdev, "no tc for cos{%x, %x}\n",
- rdev->cosq[0], rdev->cosq[1]);
- return rc;
- }
-
/* Actual priorities are not programmed as they are already
* done by L2 driver; just enable or disable priority vlan tagging
*/
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
index b802981..3f4998a 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
@@ -679,21 +679,6 @@ int bnxt_qplib_free_fast_reg_page_list(struct bnxt_qplib_res *res,
return 0;
}
-int bnxt_qplib_map_tc2cos(struct bnxt_qplib_res *res, u16 *cids)
-{
- struct bnxt_qplib_rcfw *rcfw = res->rcfw;
- struct cmdq_map_tc_to_cos req;
- struct creq_map_tc_to_cos_resp resp;
- u16 cmd_flags = 0;
-
- RCFW_CMD_PREP(req, MAP_TC_TO_COS, cmd_flags);
- req.cos0 = cpu_to_le16(cids[0]);
- req.cos1 = cpu_to_le16(cids[1]);
-
- return bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp,
- NULL, 0);
-}
-
int bnxt_qplib_get_roce_stats(struct bnxt_qplib_rcfw *rcfw,
struct bnxt_qplib_roce_stats *stats)
{
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.h b/drivers/infiniband/hw/bnxt_re/qplib_sp.h
index 5939e8f..96e61db 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.h
+++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.h
@@ -277,7 +277,6 @@ int bnxt_qplib_alloc_fast_reg_page_list(struct bnxt_qplib_res *res,
struct bnxt_qplib_frpl *frpl, int max);
int bnxt_qplib_free_fast_reg_page_list(struct bnxt_qplib_res *res,
struct bnxt_qplib_frpl *frpl);
-int bnxt_qplib_map_tc2cos(struct bnxt_qplib_res *res, u16 *cids);
int bnxt_qplib_get_roce_stats(struct bnxt_qplib_rcfw *rcfw,
struct bnxt_qplib_roce_stats *stats);
int bnxt_qplib_qext_stat(struct bnxt_qplib_rcfw *rcfw, u32 fid,
--
2.5.5
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4224 bytes --]
next prev parent reply other threads:[~2023-03-25 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 18:44 [PATCH for-next v2 0/7] RDMA/bnxt_re: Enable Congestion control by default Selvin Xavier
2023-03-25 18:44 ` [PATCH for-next v2 1/7] RDMA/bnxt_re: Update HW interface headers Selvin Xavier
2023-03-25 18:44 ` Selvin Xavier [this message]
2023-03-25 18:44 ` [PATCH for-next v2 3/7] RDMA/bnxt_re: Convert RCFW_CMD_PREP macro to static inline function Selvin Xavier
2023-03-25 18:44 ` [PATCH for-next v2 4/7] RDMA/bnxt_re: Reduce number of argumets to control path command APIs Selvin Xavier
2023-03-25 18:44 ` [PATCH for-next v2 5/7] RDMA/bnxt_re: RoCE slow path TLV support Selvin Xavier
2023-03-25 18:44 ` [PATCH for-next v2 6/7] RDAM/bnxt_re: Use tlv apis while processing the slow path commands Selvin Xavier
2023-03-25 18:44 ` [PATCH for-next v2 7/7] RDMA/bnxt_re: Enable congestion control by default Selvin Xavier
2023-03-29 7:25 ` 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=1679769854-30605-3-git-send-email-selvin.xavier@broadcom.com \
--to=selvin.xavier@broadcom.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
/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