mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 12:11:59 +02:00
RDMA/bnxt_re: Report udp source port for flow_label in bnxt_re_query_qp
The firmware doesn't capture the flow_label. Therefore the value that's always returned by qplib_qp->ah.flow_label is 0 whenever a qp is created. And as per IB spec, udp source port can be reported for flow_label. Hence reported udp source port for flow_label in bnxt_re_query_qp by populating the value of qplib_qp->udp_sport into qp_attr->ah_attr.grh.flow_label. Signed-off-by: Abhishek Mohapatra <abhishek.mohapatra@broadcom.com> Signed-off-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com> Link: https://patch.msgid.link/20250814112555.221665-8-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
ef56081d18
commit
dc61e916f1
|
|
@ -2305,7 +2305,7 @@ int bnxt_re_query_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr,
|
|||
qp_attr->pkey_index = qplib_qp->pkey_index;
|
||||
qp_attr->qkey = qplib_qp->qkey;
|
||||
qp_attr->ah_attr.type = RDMA_AH_ATTR_TYPE_ROCE;
|
||||
rdma_ah_set_grh(&qp_attr->ah_attr, NULL, qplib_qp->ah.flow_label,
|
||||
rdma_ah_set_grh(&qp_attr->ah_attr, NULL, qplib_qp->udp_sport,
|
||||
qplib_qp->ah.host_sgid_index,
|
||||
qplib_qp->ah.hop_limit,
|
||||
qplib_qp->ah.traffic_class);
|
||||
|
|
|
|||
|
|
@ -1492,6 +1492,7 @@ int bnxt_qplib_query_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp)
|
|||
qp->access = sb->access;
|
||||
qp->pkey_index = le16_to_cpu(sb->pkey);
|
||||
qp->qkey = le32_to_cpu(sb->qkey);
|
||||
qp->udp_sport = le16_to_cpu(sb->udp_src_port);
|
||||
|
||||
temp32[0] = le32_to_cpu(sb->dgid[0]);
|
||||
temp32[1] = le32_to_cpu(sb->dgid[1]);
|
||||
|
|
|
|||
|
|
@ -299,6 +299,7 @@ struct bnxt_qplib_qp {
|
|||
u8 smac[6];
|
||||
u16 vlan_id;
|
||||
u16 port_id;
|
||||
u16 udp_sport;
|
||||
u8 nw_type;
|
||||
struct bnxt_qplib_ah ah;
|
||||
|
||||
|
|
|
|||
|
|
@ -788,7 +788,8 @@ struct creq_query_qp_resp_sb {
|
|||
#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_ATOMIC 0x8UL
|
||||
__le16 pkey;
|
||||
__le32 qkey;
|
||||
__le32 reserved32;
|
||||
__le16 udp_src_port;
|
||||
__le16 reserved16;
|
||||
__le32 dgid[4];
|
||||
__le32 flow_label;
|
||||
__le16 sgid_index;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user