mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
RDMA/bnxt_re: Support different traffic class
Adding support for different traffic class passed to driver. Fix the traffic class setting in modify_qp by skipping the ECN bits. Pass the service level received from applications to the firmware. Signed-off-by: Chandramohan Akula <chandramohan.akula@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1731660464-27838-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
fc0856c3a3
commit
c64b16a37b
2 changed files with 12 additions and 2 deletions
|
@ -2136,7 +2136,7 @@ int bnxt_re_modify_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr,
|
|||
qp->qplib_qp.ah.sgid_index = ctx->idx;
|
||||
qp->qplib_qp.ah.host_sgid_index = grh->sgid_index;
|
||||
qp->qplib_qp.ah.hop_limit = grh->hop_limit;
|
||||
qp->qplib_qp.ah.traffic_class = grh->traffic_class;
|
||||
qp->qplib_qp.ah.traffic_class = grh->traffic_class >> 2;
|
||||
qp->qplib_qp.ah.sl = rdma_ah_get_sl(&qp_attr->ah_attr);
|
||||
ether_addr_copy(qp->qplib_qp.ah.dmac,
|
||||
qp_attr->ah_attr.roce.dmac);
|
||||
|
|
|
@ -1318,6 +1318,7 @@ int bnxt_qplib_modify_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp)
|
|||
struct creq_modify_qp_resp resp = {};
|
||||
struct bnxt_qplib_cmdqmsg msg = {};
|
||||
struct cmdq_modify_qp req = {};
|
||||
u16 vlan_pcp_vlan_dei_vlan_id;
|
||||
u32 temp32[4];
|
||||
u32 bmask;
|
||||
int rc;
|
||||
|
@ -1414,7 +1415,16 @@ int bnxt_qplib_modify_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp)
|
|||
if (bmask & CMDQ_MODIFY_QP_MODIFY_MASK_DEST_QP_ID)
|
||||
req.dest_qp_id = cpu_to_le32(qp->dest_qpn);
|
||||
|
||||
req.vlan_pcp_vlan_dei_vlan_id = cpu_to_le16(qp->vlan_id);
|
||||
if (bmask & CMDQ_MODIFY_QP_MODIFY_MASK_VLAN_ID) {
|
||||
vlan_pcp_vlan_dei_vlan_id =
|
||||
((res->sgid_tbl.tbl[qp->ah.sgid_index].vlan_id <<
|
||||
CMDQ_MODIFY_QP_VLAN_ID_SFT) &
|
||||
CMDQ_MODIFY_QP_VLAN_ID_MASK);
|
||||
vlan_pcp_vlan_dei_vlan_id |=
|
||||
((qp->ah.sl << CMDQ_MODIFY_QP_VLAN_PCP_SFT) &
|
||||
CMDQ_MODIFY_QP_VLAN_PCP_MASK);
|
||||
req.vlan_pcp_vlan_dei_vlan_id = cpu_to_le16(vlan_pcp_vlan_dei_vlan_id);
|
||||
}
|
||||
|
||||
bnxt_qplib_fill_cmdqmsg(&msg, &req, &resp, NULL, sizeof(req), sizeof(resp), 0);
|
||||
rc = bnxt_qplib_rcfw_send_message(rcfw, &msg);
|
||||
|
|
Loading…
Add table
Reference in a new issue