All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next 0/3] RDMA/hns: Misc cleanups
@ 2020-04-30 10:31 Weihang Li
  2020-04-30 10:31 ` [PATCH for-next 1/3] RDMA/hns: Fix comments with non-English symbols Weihang Li
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Weihang Li @ 2020-04-30 10:31 UTC (permalink / raw)
  To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm

Some tiny cleanups for hns driver.

Weihang Li (2):
  RDMA/hns: Fix comments with non-English symbols
  RDMA/hns: Adjust lp_pktn_ini dynamically

Wenpeng Liang (1):
  RDMA/hns: Remove redundant assignment of caps

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

-- 
2.8.1


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

* [PATCH for-next 1/3] RDMA/hns: Fix comments with non-English symbols
  2020-04-30 10:31 [PATCH for-next 0/3] RDMA/hns: Misc cleanups Weihang Li
@ 2020-04-30 10:31 ` Weihang Li
  2020-04-30 10:31 ` [PATCH for-next 2/3] RDMA/hns: Adjust lp_pktn_ini dynamically Weihang Li
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2020-04-30 10:31 UTC (permalink / raw)
  To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm

There is a comments with some chinese semicolons that cause encoding issues
each time hns_roc_hw_v2.h was modified from a IDE. So fix this by using
correct symbols.

Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
index 82dd9f6..05bfe07 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
@@ -1241,10 +1241,9 @@ struct hns_roce_func_clear {
 };
 
 #define FUNC_CLEAR_RST_FUN_DONE_S 0
-/* Each physical function manages up to 248 virtual functions;
- * it takes up to 100ms for each function to execute clear;
- * if an abnormal reset occurs, it is executed twice at most;
- * so it takes up to 249 * 2 * 100ms.
+/* Each physical function manages up to 248 virtual functions, it takes up to
+ * 100ms for each function to execute clear. If an abnormal reset occurs, it is
+ * executed twice at most, so it takes up to 249 * 2 * 100ms.
  */
 #define HNS_ROCE_V2_FUNC_CLEAR_TIMEOUT_MSECS	(249 * 2 * 100)
 #define HNS_ROCE_V2_READ_FUNC_CLEAR_FLAG_INTERVAL	40
-- 
2.8.1


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

* [PATCH for-next 2/3] RDMA/hns: Adjust lp_pktn_ini dynamically
  2020-04-30 10:31 [PATCH for-next 0/3] RDMA/hns: Misc cleanups Weihang Li
  2020-04-30 10:31 ` [PATCH for-next 1/3] RDMA/hns: Fix comments with non-English symbols Weihang Li
@ 2020-04-30 10:31 ` Weihang Li
  2020-04-30 10:31 ` [PATCH for-next 3/3] RDMA/hns: Remove redundant assignment of caps Weihang Li
  2020-05-06 20:36 ` [PATCH for-next 0/3] RDMA/hns: Misc cleanups Jason Gunthorpe
  3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2020-04-30 10:31 UTC (permalink / raw)
  To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm

lp_pktn_ini means the number of loopback slice packets for long messages,
it should depend on MTU(fixed to 4096B currently) and max size of SQ
inline.

Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index f70370d..7643b06 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -3977,7 +3977,8 @@ static int modify_qp_init_to_rtr(struct ib_qp *ibqp,
 
 	/* mtu*(2^LP_PKTN_INI) should not bigger than 1 message length 64kb */
 	roce_set_field(context->byte_56_dqpn_err, V2_QPC_BYTE_56_LP_PKTN_INI_M,
-		       V2_QPC_BYTE_56_LP_PKTN_INI_S, 0);
+		       V2_QPC_BYTE_56_LP_PKTN_INI_S,
+		       ilog2(hr_dev->caps.max_sq_inline / IB_MTU_4096));
 	roce_set_field(qpc_mask->byte_56_dqpn_err, V2_QPC_BYTE_56_LP_PKTN_INI_M,
 		       V2_QPC_BYTE_56_LP_PKTN_INI_S, 0);
 
-- 
2.8.1


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

* [PATCH for-next 3/3] RDMA/hns: Remove redundant assignment of caps
  2020-04-30 10:31 [PATCH for-next 0/3] RDMA/hns: Misc cleanups Weihang Li
  2020-04-30 10:31 ` [PATCH for-next 1/3] RDMA/hns: Fix comments with non-English symbols Weihang Li
  2020-04-30 10:31 ` [PATCH for-next 2/3] RDMA/hns: Adjust lp_pktn_ini dynamically Weihang Li
@ 2020-04-30 10:31 ` Weihang Li
  2020-05-06 20:36 ` [PATCH for-next 0/3] RDMA/hns: Misc cleanups Jason Gunthorpe
  3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2020-04-30 10:31 UTC (permalink / raw)
  To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm

From: Wenpeng Liang <liangwenpeng@huawei.com>

These caps are assigned in query_pf_caps() or set_default_caps(), and
should not be assigned out of these two functions.

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 7643b06..ad9a11a 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -2079,11 +2079,6 @@ static int hns_roce_v2_profile(struct hns_roce_dev *hr_dev)
 	hr_dev->vendor_part_id = hr_dev->pci_dev->device;
 	hr_dev->sys_image_guid = be64_to_cpu(hr_dev->ib_dev.node_guid);
 
-	caps->num_mtt_segs	= HNS_ROCE_V2_MAX_MTT_SEGS;
-	caps->num_cqe_segs	= HNS_ROCE_V2_MAX_CQE_SEGS;
-	caps->num_srqwqe_segs	= HNS_ROCE_V2_MAX_SRQWQE_SEGS;
-	caps->num_idx_segs	= HNS_ROCE_V2_MAX_IDX_SEGS;
-
 	caps->pbl_ba_pg_sz	= HNS_ROCE_BA_PG_SZ_SUPPORTED_16K;
 	caps->pbl_buf_pg_sz	= 0;
 	caps->pbl_hop_num	= HNS_ROCE_PBL_HOP_NUM;
-- 
2.8.1


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

* Re: [PATCH for-next 0/3] RDMA/hns: Misc cleanups
  2020-04-30 10:31 [PATCH for-next 0/3] RDMA/hns: Misc cleanups Weihang Li
                   ` (2 preceding siblings ...)
  2020-04-30 10:31 ` [PATCH for-next 3/3] RDMA/hns: Remove redundant assignment of caps Weihang Li
@ 2020-05-06 20:36 ` Jason Gunthorpe
  3 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2020-05-06 20:36 UTC (permalink / raw)
  To: Weihang Li; +Cc: dledford, leon, linux-rdma, linuxarm

On Thu, Apr 30, 2020 at 06:31:28PM +0800, Weihang Li wrote:
> Some tiny cleanups for hns driver.
> 
> Weihang Li (2):
>   RDMA/hns: Fix comments with non-English symbols
>   RDMA/hns: Adjust lp_pktn_ini dynamically
> 
> Wenpeng Liang (1):
>   RDMA/hns: Remove redundant assignment of caps
> 
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 8 ++------
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 7 +++----
>  2 files changed, 5 insertions(+), 10 deletions(-)

Applied to for-next, thanks

Jason

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

end of thread, other threads:[~2020-05-06 20:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 10:31 [PATCH for-next 0/3] RDMA/hns: Misc cleanups Weihang Li
2020-04-30 10:31 ` [PATCH for-next 1/3] RDMA/hns: Fix comments with non-English symbols Weihang Li
2020-04-30 10:31 ` [PATCH for-next 2/3] RDMA/hns: Adjust lp_pktn_ini dynamically Weihang Li
2020-04-30 10:31 ` [PATCH for-next 3/3] RDMA/hns: Remove redundant assignment of caps Weihang Li
2020-05-06 20:36 ` [PATCH for-next 0/3] RDMA/hns: Misc cleanups 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.