From: Weihang Li <liweihang@huawei.com>
To: <dledford@redhat.com>, <jgg@ziepe.ca>
Cc: <leon@kernel.org>, <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: [PATCH v2 for-next 3/7] RDMA/hns: Avoid setting loopback indicator when smac is same as dmac
Date: Mon, 16 Nov 2020 19:33:24 +0800 [thread overview]
Message-ID: <1605526408-6936-4-git-send-email-liweihang@huawei.com> (raw)
In-Reply-To: <1605526408-6936-1-git-send-email-liweihang@huawei.com>
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: d6a3627e311c ("RDMA/hns: Optimize wqe buffer set flow for post send")
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 3895a2a..bd09df4 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -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 */
--
2.8.1
next prev parent reply other threads:[~2020-11-16 12:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 11:33 [PATCH v2 for-next 0/7] RDMA/hns: Support UD for HIP09 Weihang Li
2020-11-16 11:33 ` [PATCH v2 for-next 1/7] RDMA/hns: Only record vlan info for HIP08 Weihang Li
2020-11-16 11:33 ` [PATCH v2 for-next 2/7] RDMA/hns: Fix missing fields in address vector Weihang Li
2020-11-16 11:33 ` Weihang Li [this message]
2020-11-16 11:33 ` [PATCH v2 for-next 4/7] RDMA/hns: Remove the portn field in UD SQ WQE Weihang Li
2020-11-16 11:33 ` [PATCH v2 for-next 5/7] RDMA/hns: Simplify process of filling " Weihang Li
2020-11-16 11:33 ` [PATCH v2 for-next 6/7] RDMA/hns: Add UD support for HIP09 Weihang Li
2020-11-16 11:33 ` [PATCH v2 for-next 7/7] RDMA/hns: Add support for UD inline Weihang Li
2020-11-18 19:10 ` Jason Gunthorpe
2020-11-19 6:15 ` liweihang
2020-11-26 19:24 ` Jason Gunthorpe
2020-11-27 9:55 ` liweihang
2020-11-27 13:21 ` Jason Gunthorpe
2020-11-26 19:44 ` [PATCH v2 for-next 0/7] RDMA/hns: Support UD for HIP09 Jason Gunthorpe
2020-11-26 19:45 ` Jason Gunthorpe
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=1605526408-6936-4-git-send-email-liweihang@huawei.com \
--to=liweihang@huawei.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.