All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-rc] RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility
@ 2021-10-29 10:05 Wenpeng Liang
  2021-10-29 15:06 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Wenpeng Liang @ 2021-10-29 10:05 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

From: Yixing Liu <liuyixing1@huawei.com>

The upper limit of MAX_LP_MSG_LEN on HIP08 is 64K, and the upper limit on
HIP09 is 16K. Regardless of whether it is HIP08 or HIP09, only 16K will be
used. In order to ensure compatibility, it is unified to 16K.

Setting MAX_LP_MSG_LEN to 16K will not cause the performance loss of HIP08.

Fixes: fbed9d2be292 ("RDMA/hns: Fix configuration of ack_req_freq in QPC")
Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index d5f3faa1627a..3453b15cb391 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4399,8 +4399,8 @@ static int modify_qp_init_to_rtr(struct ib_qp *ibqp,
 	mtu = ib_mtu_enum_to_int(ib_mtu);
 	if (WARN_ON(mtu <= 0))
 		return -EINVAL;
-#define MAX_LP_MSG_LEN 65536
-	/* MTU * (2 ^ LP_PKTN_INI) shouldn't be bigger than 64KB */
+#define MAX_LP_MSG_LEN 16384
+	/* MTU * (2 ^ LP_PKTN_INI) shouldn't be bigger than 16KB */
 	lp_pktn_ini = ilog2(MAX_LP_MSG_LEN / mtu);
 	if (WARN_ON(lp_pktn_ini >= 0xF))
 		return -EINVAL;
--
2.33.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH for-rc] RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility
  2021-10-29 10:05 [PATCH for-rc] RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility Wenpeng Liang
@ 2021-10-29 15:06 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-10-29 15:06 UTC (permalink / raw)
  To: Wenpeng Liang; +Cc: dledford, linux-rdma, linuxarm

On Fri, Oct 29, 2021 at 06:05:37PM +0800, Wenpeng Liang wrote:
> From: Yixing Liu <liuyixing1@huawei.com>
> 
> The upper limit of MAX_LP_MSG_LEN on HIP08 is 64K, and the upper limit on
> HIP09 is 16K. Regardless of whether it is HIP08 or HIP09, only 16K will be
> used. In order to ensure compatibility, it is unified to 16K.
> 
> Setting MAX_LP_MSG_LEN to 16K will not cause the performance loss of HIP08.
> 
> Fixes: fbed9d2be292 ("RDMA/hns: Fix configuration of ack_req_freq in QPC")
> Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to for-rc, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-29 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 10:05 [PATCH for-rc] RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility Wenpeng Liang
2021-10-29 15:06 ` Jason Gunthorpe

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.