All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page
@ 2019-10-24  9:21 Weihang Li
  2019-10-24  9:21 ` [PATCH for-rc 1/2] RDMA/hns: Fix to support 64K page for srq Weihang Li
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Weihang Li @ 2019-10-24  9:21 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm

Currently, some configurations can only support 4K page in hip08, this
series fixes them.

Lijun Ou (1):
  RDMA/hns: Fix to support 64K page for srq

Yangyang Li (1):
  RDMA/hns: Bugfix for qpc/cqc timer configuration

 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++--
 drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.8.1


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

* [PATCH for-rc 1/2] RDMA/hns: Fix to support 64K page for srq
  2019-10-24  9:21 [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page Weihang Li
@ 2019-10-24  9:21 ` Weihang Li
  2019-10-24  9:21 ` [PATCH for-rc 2/2] RDMA/hns: Bugfix for qpc/cqc timer configuration Weihang Li
  2019-10-28 16:39 ` [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page Jason Gunthorpe
  2 siblings, 0 replies; 4+ messages in thread
From: Weihang Li @ 2019-10-24  9:21 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm

From: Lijun Ou <oulijun@huawei.com>

SRQ's page size configuration of BA and buffer should depend on current
PAGE_SHIFT, or it can't work in scenario of 64K page.

Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode")
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.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 7a89d66..d70a784 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -6092,11 +6092,11 @@ static void hns_roce_v2_write_srqc(struct hns_roce_dev *hr_dev,
 	roce_set_field(srq_context->byte_44_idxbufpgsz_addr,
 		       SRQC_BYTE_44_SRQ_IDX_BA_PG_SZ_M,
 		       SRQC_BYTE_44_SRQ_IDX_BA_PG_SZ_S,
-		       hr_dev->caps.idx_ba_pg_sz);
+		       hr_dev->caps.idx_ba_pg_sz + PG_SHIFT_OFFSET);
 	roce_set_field(srq_context->byte_44_idxbufpgsz_addr,
 		       SRQC_BYTE_44_SRQ_IDX_BUF_PG_SZ_M,
 		       SRQC_BYTE_44_SRQ_IDX_BUF_PG_SZ_S,
-		       hr_dev->caps.idx_buf_pg_sz);
+		       hr_dev->caps.idx_buf_pg_sz + PG_SHIFT_OFFSET);
 
 	srq_context->idx_nxt_blk_addr =
 		cpu_to_le32(mtts_idx[1] >> PAGE_ADDR_SHIFT);
-- 
2.8.1


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

* [PATCH for-rc 2/2] RDMA/hns: Bugfix for qpc/cqc timer configuration
  2019-10-24  9:21 [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page Weihang Li
  2019-10-24  9:21 ` [PATCH for-rc 1/2] RDMA/hns: Fix to support 64K page for srq Weihang Li
@ 2019-10-24  9:21 ` Weihang Li
  2019-10-28 16:39 ` [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page Jason Gunthorpe
  2 siblings, 0 replies; 4+ messages in thread
From: Weihang Li @ 2019-10-24  9:21 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm

From: Yangyang Li <liyangyang20@huawei.com>

qpc/cqc timer entry size needs one page, but currently they are fixedly
configured to 4096, which is not appropriate in 64K page scenarios. So
they should be modified to PAGE_SIZE.

Fixes: 0e40dc2f70cd ("RDMA/hns: Add timer allocation support for hip08")
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
index 43219d2..76a14db 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
@@ -87,8 +87,8 @@
 #define HNS_ROCE_V2_MTT_ENTRY_SZ		64
 #define HNS_ROCE_V2_CQE_ENTRY_SIZE		32
 #define HNS_ROCE_V2_SCCC_ENTRY_SZ		32
-#define HNS_ROCE_V2_QPC_TIMER_ENTRY_SZ		4096
-#define HNS_ROCE_V2_CQC_TIMER_ENTRY_SZ		4096
+#define HNS_ROCE_V2_QPC_TIMER_ENTRY_SZ		PAGE_SIZE
+#define HNS_ROCE_V2_CQC_TIMER_ENTRY_SZ		PAGE_SIZE
 #define HNS_ROCE_V2_PAGE_SIZE_SUPPORTED		0xFFFFF000
 #define HNS_ROCE_V2_MAX_INNER_MTPT_NUM		2
 #define HNS_ROCE_INVALID_LKEY			0x100
-- 
2.8.1


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

* Re: [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page
  2019-10-24  9:21 [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page Weihang Li
  2019-10-24  9:21 ` [PATCH for-rc 1/2] RDMA/hns: Fix to support 64K page for srq Weihang Li
  2019-10-24  9:21 ` [PATCH for-rc 2/2] RDMA/hns: Bugfix for qpc/cqc timer configuration Weihang Li
@ 2019-10-28 16:39 ` Jason Gunthorpe
  2 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2019-10-28 16:39 UTC (permalink / raw)
  To: Weihang Li; +Cc: dledford, linux-rdma, linuxarm

On Thu, Oct 24, 2019 at 05:21:55PM +0800, Weihang Li wrote:
> Currently, some configurations can only support 4K page in hip08, this
> series fixes them.
> 
> Lijun Ou (1):
>   RDMA/hns: Fix to support 64K page for srq
> 
> Yangyang Li (1):
>   RDMA/hns: Bugfix for qpc/cqc timer configuration

Applied to for-next

Thanks,
Jason

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

end of thread, other threads:[~2019-10-28 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24  9:21 [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page Weihang Li
2019-10-24  9:21 ` [PATCH for-rc 1/2] RDMA/hns: Fix to support 64K page for srq Weihang Li
2019-10-24  9:21 ` [PATCH for-rc 2/2] RDMA/hns: Bugfix for qpc/cqc timer configuration Weihang Li
2019-10-28 16:39 ` [PATCH for-rc 0/2] RDMA/hns: Fixes related to 64K page 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.