All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH V2 rdma-core 0/2] Bugfixes for hip08 libhns
       [not found] ` <1510309253-229097-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2017-11-10  9:45   ` oulijun
  2017-11-10 10:20   ` [PATCH V2 rdma-core 1/2] libhns: Set owner bit of SQWQE in user mode Lijun Ou
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: oulijun @ 2017-11-10  9:45 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

在 2017/11/10 18:20, Lijun Ou 写道:
> This path series update the usage of two fields in cq doorbell and
> sqwqe.
> 
> Change from V1:
> 1. Update commit log
> 2. Remove the third patch, name is
>    libhns: Fix endian format of payload and immediate
> 
> Lijun Ou (2):
>   libhns: Set owner bit of SQWQE in user mode
>   libhns: Modify the usage of cmd_sn in hip08 RoCE userspace
> 
>  providers/hns/hns_roce_u_hw_v2.c | 10 +++++++++-
>  providers/hns/hns_roce_u_hw_v2.h |  2 ++
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
Hi, leon&jgunthorpe
   In PATCH V2 version, I am remove the patch
	libhns: Fix endian format of payload and immediate

   I am trying to test it by using jason's patch and it has some questions within the next few days
	hns: Make the provider sparse clean

   I am tested it aginst D05(ARM64), when use hip08 as server and D05 as client, it is ok
   when use hip08 as client and D05 as server, it is fail. These test use the rdma operation with immediately scene.

   I have attending to resolving this bug and will send a patch serperately after resolved it

Thanks
Lijun Ou



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH V2 rdma-core 0/2] Bugfixes for hip08 libhns
@ 2017-11-10 10:20 Lijun Ou
       [not found] ` <1510309253-229097-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Lijun Ou @ 2017-11-10 10:20 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

This path series update the usage of two fields in cq doorbell and
sqwqe.

Change from V1:
1. Update commit log
2. Remove the third patch, name is
   libhns: Fix endian format of payload and immediate

Lijun Ou (2):
  libhns: Set owner bit of SQWQE in user mode
  libhns: Modify the usage of cmd_sn in hip08 RoCE userspace

 providers/hns/hns_roce_u_hw_v2.c | 10 +++++++++-
 providers/hns/hns_roce_u_hw_v2.h |  2 ++
 2 files changed, 11 insertions(+), 1 deletion(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH V2 rdma-core 1/2] libhns: Set owner bit of SQWQE in user mode
       [not found] ` <1510309253-229097-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  2017-11-10  9:45   ` oulijun
@ 2017-11-10 10:20   ` Lijun Ou
  2017-11-10 10:20   ` [PATCH V2 rdma-core 2/2] libhns: Modify the usage of cmd_sn in hip08 RoCE userspace Lijun Ou
  2017-11-13  6:54   ` [PATCH V2 rdma-core 0/2] Bugfixes for hip08 libhns Leon Romanovsky
  3 siblings, 0 replies; 5+ messages in thread
From: Lijun Ou @ 2017-11-10 10:20 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

In hip08, it needs to set owner field of sqwqe when posting
send wr. The owner field will be used by hardware. The set
algorithm as follows:
The value of owner should be 1 in the first lap, it should
be 0 in the second lap and in turn.

Signed-off-by: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
 providers/hns/hns_roce_u_hw_v2.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 50059bf..900387c 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -473,6 +473,7 @@ static int hns_roce_u_v2_arm_cq(struct ibv_cq *ibvcq, int solicited)
 static int hns_roce_u_v2_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
 				   struct ibv_send_wr **bad_wr)
 {
+	unsigned int sq_shift;
 	unsigned int ind_sge;
 	unsigned int ind;
 	int nreq;
@@ -542,6 +543,11 @@ static int hns_roce_u_v2_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
 		roce_set_bit(rc_sq_wqe->byte_4, RC_SQ_WQE_BYTE_4_SE_S,
 			     (wr->send_flags & IBV_SEND_SOLICITED) ? 1 : 0);
 
+		for (sq_shift = 0; (1 << sq_shift) < qp->sq.wqe_cnt; ++sq_shift)
+			;
+		roce_set_bit(rc_sq_wqe->byte_4, RC_SQ_WQE_BYTE_4_OWNER_S,
+			     ~(qp->sq.head >> sq_shift) & 0x1);
+
 		wqe += sizeof(struct hns_roce_rc_sq_wqe);
 		/* set remote addr segment */
 		switch (ibvqp->qp_type) {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH V2 rdma-core 2/2] libhns: Modify the usage of cmd_sn in hip08 RoCE userspace
       [not found] ` <1510309253-229097-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  2017-11-10  9:45   ` oulijun
  2017-11-10 10:20   ` [PATCH V2 rdma-core 1/2] libhns: Set owner bit of SQWQE in user mode Lijun Ou
@ 2017-11-10 10:20   ` Lijun Ou
  2017-11-13  6:54   ` [PATCH V2 rdma-core 0/2] Bugfixes for hip08 libhns Leon Romanovsky
  3 siblings, 0 replies; 5+ messages in thread
From: Lijun Ou @ 2017-11-10 10:20 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

The cmd_sn field of CQ doorbell inits for 0. It should be
increment on each first db rung after a complemention Event.
if the cmd_sn of notify doorbell Adjacent two times is the
same, the hardware will distinguish it for the same notify
request and update its type according to the priority level
of next event and solicited event.

Signed-off-by: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
 providers/hns/hns_roce_u_hw_v2.c | 4 +++-
 providers/hns/hns_roce_u_hw_v2.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 900387c..7777e75 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -444,11 +444,13 @@ static int hns_roce_u_v2_poll_cq(struct ibv_cq *ibvcq, int ne,
 static int hns_roce_u_v2_arm_cq(struct ibv_cq *ibvcq, int solicited)
 {
 	uint32_t ci;
+	uint32_t cmd_sn;
 	uint32_t solicited_flag;
 	struct hns_roce_v2_cq_db cq_db;
 	struct hns_roce_cq *cq = to_hr_cq(ibvcq);
 
 	ci  = cq->cons_index & ((cq->cq_depth << 1) - 1);
+	cmd_sn = cq->arm_sn & HNS_ROCE_CMDSN_MASK;
 	solicited_flag = solicited ? HNS_ROCE_V2_CQ_DB_REQ_SOL :
 				     HNS_ROCE_V2_CQ_DB_REQ_NEXT;
 
@@ -462,7 +464,7 @@ static int hns_roce_u_v2_arm_cq(struct ibv_cq *ibvcq, int solicited)
 		       CQ_DB_PARAMETER_CQ_CONSUMER_IDX_S, ci);
 
 	roce_set_field(cq_db.parameter, CQ_DB_PARAMETER_CMD_SN_M,
-		       CQ_DB_PARAMETER_CMD_SN_S, 1);
+		       CQ_DB_PARAMETER_CMD_SN_S, cmd_sn);
 	roce_set_bit(cq_db.parameter, CQ_DB_PARAMETER_NOTIFY_S, solicited_flag);
 
 	hns_roce_write64((uint32_t *)&cq_db, to_hr_ctx(ibvcq->context),
diff --git a/providers/hns/hns_roce_u_hw_v2.h b/providers/hns/hns_roce_u_hw_v2.h
index 28aab60..196ba4e 100644
--- a/providers/hns/hns_roce_u_hw_v2.h
+++ b/providers/hns/hns_roce_u_hw_v2.h
@@ -38,6 +38,8 @@
 #define HNS_ROCE_V2_CQ_DB_REQ_SOL		1
 #define HNS_ROCE_V2_CQ_DB_REQ_NEXT		0
 
+#define HNS_ROCE_CMDSN_MASK			0x3
+
 /* V2 REG DEFINITION */
 #define ROCEE_VF_DB_CFG0_OFFSET			0x0230
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH V2 rdma-core 0/2] Bugfixes for hip08 libhns
       [not found] ` <1510309253-229097-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-11-10 10:20   ` [PATCH V2 rdma-core 2/2] libhns: Modify the usage of cmd_sn in hip08 RoCE userspace Lijun Ou
@ 2017-11-13  6:54   ` Leon Romanovsky
  3 siblings, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2017-11-13  6:54 UTC (permalink / raw)
  To: Lijun Ou
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

On Fri, Nov 10, 2017 at 06:20:51PM +0800, Lijun Ou wrote:
> This path series update the usage of two fields in cq doorbell and
> sqwqe.
>
> Change from V1:
> 1. Update commit log
> 2. Remove the third patch, name is
>    libhns: Fix endian format of payload and immediate
>
> Lijun Ou (2):
>   libhns: Set owner bit of SQWQE in user mode
>   libhns: Modify the usage of cmd_sn in hip08 RoCE userspace
>
>  providers/hns/hns_roce_u_hw_v2.c | 10 +++++++++-
>  providers/hns/hns_roce_u_hw_v2.h |  2 ++
>  2 files changed, 11 insertions(+), 1 deletion(-)
>

Thanks, applied.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-11-13  6:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 10:20 [PATCH V2 rdma-core 0/2] Bugfixes for hip08 libhns Lijun Ou
     [not found] ` <1510309253-229097-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-11-10  9:45   ` oulijun
2017-11-10 10:20   ` [PATCH V2 rdma-core 1/2] libhns: Set owner bit of SQWQE in user mode Lijun Ou
2017-11-10 10:20   ` [PATCH V2 rdma-core 2/2] libhns: Modify the usage of cmd_sn in hip08 RoCE userspace Lijun Ou
2017-11-13  6:54   ` [PATCH V2 rdma-core 0/2] Bugfixes for hip08 libhns Leon Romanovsky

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.