mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 02:00:53 +07:00
RDMA/hns: Avoid setting loopback indicator when smac is same as dmac
[ Upstream commit 3631dadfb118821236098a215e59fb5d3e1c30a8 ]
The loopback flag will be set to 1 by the hardware when the source mac
address is same as the destination mac address. So the driver don't need
to compare them.
Fixes: d6a3627e31
("RDMA/hns: Optimize wqe buffer set flow for post send")
Link: https://lore.kernel.org/r/1605526408-6936-4-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6b8a015eda
commit
af7ae24594
@ -433,8 +433,6 @@ static inline int set_ud_wqe(struct hns_roce_qp *qp,
|
||||
unsigned int curr_idx = *sge_idx;
|
||||
int valid_num_sge;
|
||||
u32 msg_len = 0;
|
||||
bool loopback;
|
||||
u8 *smac;
|
||||
int ret;
|
||||
|
||||
valid_num_sge = calc_wr_sge_num(wr, &msg_len);
|
||||
@ -457,13 +455,6 @@ static inline int set_ud_wqe(struct hns_roce_qp *qp,
|
||||
roce_set_field(ud_sq_wqe->byte_48, V2_UD_SEND_WQE_BYTE_48_DMAC_5_M,
|
||||
V2_UD_SEND_WQE_BYTE_48_DMAC_5_S, ah->av.mac[5]);
|
||||
|
||||
/* MAC loopback */
|
||||
smac = (u8 *)hr_dev->dev_addr[qp->port];
|
||||
loopback = ether_addr_equal_unaligned(ah->av.mac, smac) ? 1 : 0;
|
||||
|
||||
roce_set_bit(ud_sq_wqe->byte_40,
|
||||
V2_UD_SEND_WQE_BYTE_40_LBI_S, loopback);
|
||||
|
||||
ud_sq_wqe->msg_len = cpu_to_le32(msg_len);
|
||||
|
||||
/* Set sig attr */
|
||||
|
Loading…
Reference in New Issue
Block a user