[PATCH V2 for-next 07/19] IB/hns: Delete the sqp_start from the structure hns_roce_caps

2016-09-20 Thread Salil Mehta
From: "Wei Hu (Xavier)" This patch deleted the sqp_start from the structure hns_roce_caps, and modified the calculation of the qp number. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h | 1 - drivers/infiniband/hw/hns/hns_

[PATCH V2 for-next 08/19] IB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn

2016-09-20 Thread Salil Mehta
by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- PATCH V2: Addressed Leon Romanovsky's comment Link: https://lkml.org/lkml/2016/9/12/303 PATCH V1: Initial patch --- drivers/infiniband/hw/hns/hns_roce_eq.c | 146 drivers/infiniband/hw/hns/hns_roce_

[PATCH V2 for-next 06/19] IB/hns: Fix bug of clear hem

2016-09-20 Thread Salil Mehta
-off-by: Dongdong Huang(Donald) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h | 2 + drivers/infiniband/hw/hns/hns_roce_hem.c| 76 +-- drivers/infiniband/hw/hns/hns_roce_hem.h| 4 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 140 +++

[PATCH V2 for-next 04/19] IB/hns: Simplify function of pd alloc and qp alloc

2016-09-20 Thread Salil Mehta
From: Lijun Ou Hns_roce_pd_alloc and hns_roce_reserve_range_qp use unnecessary transformation of parameters. This patch simplify these two functions. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns

[PATCH V2 for-next 03/19] IB/hns: Fix bug of using uninit refcount and free

2016-09-20 Thread Salil Mehta
-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_cq.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_cq.c b/drivers/infiniband/hw/hns/hns_roce_cq.c index a52306f..3095f06 100644 --- a/drivers/infiniband/hw/hns/hns_roce_cq.c +++ b/drivers

[PATCH V2 for-next 05/19] IB/hns: Remove unused parameter named qp_type

2016-09-20 Thread Salil Mehta
From: Lijun Ou This patch removes the qp_type parameter in hns_roce_set_kernel_sq_size(). Signed-off-by: Lijun Ou Signed-off-by: Ping Zhang Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_qp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH V2 for-next 00/19] IB/hns: Fixes for various misc. bugs

2016-09-20 Thread Salil Mehta
Fix the bug when platform_get_resource() exec fail IB/hns: Delete the redundant lines in hns_roce_v1_m_qp() Salil Mehta (1): IB/hns: Fix for removal of redundant code Wei Hu (Xavier) (3): IB/hns: Fix bug of clear hem IB/hns: Delete the sqp_start from the structure hns_roce_caps IB/hns: Optimiz

[PATCH V2 for-next 13/19] IB/hns: Some items of qpc need to take user param

2016-09-20 Thread Salil Mehta
From: Lijun Ou Some items of qpc need to take user param when modified qp state. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 6 -- 1 file changed, 4 insertions

[PATCH V2 for-next 11/19] IB/hns: Return bad wr while post send failed

2016-09-20 Thread Salil Mehta
From: Lijun Ou While post failed, hns roce should return the wr failed to user. We omitted this while qp type is wrong and fixed it. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- PATCH V2: Addressed commnets by

[PATCH V2 for-next 15/19] IB/hns: Cq has not been freed

2016-09-20 Thread Salil Mehta
From: Lijun Ou Cq has not been freed when fail to ib_copy_to_udata, so need to free it. Signed-off-by: Lijun Ou Signed-off-by: Peter Chen Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_cq.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH V2 for-next 16/19] IB/hns: Update the rq head when modify qp state

2016-09-20 Thread Salil Mehta
From: Lijun Ou The rq head in qpc was zero will miss the rq wqes which have be sent, so here we should take the real value. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 3 ++- 1 file changed, 2 insertions

[PATCH V2 for-next 14/19] IB/hns: Validate mtu when modified qp

2016-09-20 Thread Salil Mehta
From: Lijun Ou The mtu should be validated when modify qp,so we check it. Signed-off-by: Lijun Ou Signed-off-by: Peter Chen Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- PATCH V2: Addressed Leon Romanovsky's comments Link: https://lkml.org/lkml/2016/9/13/39 PAT

[PATCH V2 for-next 09/19] IB/hns: Modify the init of iboe lock

2016-09-20 Thread Salil Mehta
Hu (Xavier) Signed-off-by: Salil Mehta --- PATCH V2: Addressed Leon Romanovsky's comments Link: https://lkml.org/lkml/2016/9/13/51 PATCH V1: Initial patch --- drivers/infiniband/hw/hns/hns_roce_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dr

[PATCH V2 for-next 17/19] IB/hns: Fix the bug when platform_get_resource() exec fail

2016-09-20 Thread Salil Mehta
From: Lijun Ou This patch mainly fixes the bug with platform_get_resource(). It should return NULL when platform_get_resource() exec fail. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_pd.c | 4 1 file changed, 4

[PATCH V2 for-next 19/19] IB/hns: Fix for removal of redundant code

2016-09-20 Thread Salil Mehta
This patch removes the redundant code lines present in the functions get_send_wqe() and get_recv_wqe(). This also fixes the error in calculating the SQ WQE. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- PATCH V1: This has been create to address the Leon

[PATCH V2 for-next 10/19] IB/hns: Fix bug of memory leakage for registering user mr

2016-09-20 Thread Salil Mehta
-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_mr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c b/drivers/infiniband/hw/hns/hns_roce_mr.c index 59f5e2b..fb87883 100644 --- a/drivers/infiniband/hw/hns/hns_roce_mr.c +++ b/drivers

[PATCH V2 for-next 12/19] IB/hns: The Ack timeout need a lower limit value

2016-09-20 Thread Salil Mehta
From: Lijun Ou The Ack timeout of qpc need a lower limit value,otherwise the read performance will be very lower. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 17

[PATCH V2 for-next 18/19] IB/hns: Delete the redundant lines in hns_roce_v1_m_qp()

2016-09-20 Thread Salil Mehta
From: Lijun Ou It doesn't need to assign for the filed of qp state in qpc separately when qp happen to migrate state which supported in RoCE engine v1. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- PATCH V2: Addressed comments provided by

[PATCH V2 for-next 02/19] IB/hns: Remove parameters of resize cq

2016-09-20 Thread Salil Mehta
From: Lijun Ou In old version of RoCE, it doesn't support to resize cq. So, we remove parameters related to resize cq. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_cq.c

[PATCH V2 for-next 01/19] IB/hns: Remove unused parameters in some functions

2016-09-20 Thread Salil Mehta
From: Lijun Ou The parameter named collapsed unused in hns_roce_cq_alloc. Also, parameter named doorbell_lock unsed in hns_roce_v1_cq_set_ci. This patch optimize these parameters. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns

RE: [PATCH for-next 12/20] IB/hns: Return bad wr while post send failed

2016-09-20 Thread Salil Mehta
> -Original Message- > From: Leon Romanovsky [mailto:l...@kernel.org] > Sent: Thursday, September 15, 2016 10:08 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > xuwei (O); mehta.salil@gmail.com; linux-r...@vger.k

RE: [PATCH for-next 03/20] IB/hns: Add the check for pointer ctrl

2016-09-20 Thread Salil Mehta
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Leon Romanovsky > Sent: Thursday, September 15, 2016 11:08 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (

RE: [PATCH for-next 18/20] IB/hns: Update the rq head when modify qp state

2016-09-20 Thread Salil Mehta
> -Original Message- > From: Leon Romanovsky [mailto:l...@kernel.org] > Sent: Thursday, September 15, 2016 11:13 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > xuwei (O); mehta.salil@gmail.com; linux-r...@vger.k

RE: [PATCH for-next 20/20] IB/hns: Delete the redundant lines in hns_roce_v1_m_qp()

2016-09-20 Thread Salil Mehta
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Leon Romanovsky > Sent: Thursday, September 15, 2016 11:15 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (

RE: [PATCH for-next 18/20] IB/hns: Update the rq head when modify qp state

2016-09-20 Thread Salil Mehta
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Leon Romanovsky > Sent: Tuesday, September 20, 2016 6:06 PM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (

[PATCH for-next 01/20] IB/hns: Remove unused parameters in some functions

2016-09-09 Thread Salil Mehta
From: Lijun Ou The parameter named collapsed unused in hns_roce_cq_alloc. Also, parameter named doorbell_lock unsed in hns_roce_v1_cq_set_ci. This patch optimize these parameters. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns

[PATCH for-next 18/20] IB/hns: Update the rq head when modify qp state

2016-09-09 Thread Salil Mehta
From: Lijun Ou The rq head in qpc was zero will miss the rq wqes which have be sent, so here we should take the real value. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c |3 ++- 1 file changed, 2

[PATCH for-next 04/20] IB/hns: Fix bug of using uninit refcount and free

2016-09-09 Thread Salil Mehta
-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_cq.c |8 1 file changed, 8 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_cq.c b/drivers/infiniband/hw/hns/hns_roce_cq.c index a52306f..3095f06 100644 --- a/drivers/infiniband/hw/hns/hns_roce_cq.c +++ b

[PATCH for-next 19/20] IB/hns: Fix the bug when platform_get_resource() exec fail

2016-09-09 Thread Salil Mehta
From: Lijun Ou This patch mainly fixes the bug with platform_get_resource(). It should return NULL when platform_get_resource() exec fail. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_pd.c |4 1 file changed

[PATCH for-next 10/20] IB/hns: Modify the init of iboe lock

2016-09-09 Thread Salil Mehta
) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index 2704076..4721c0c 100644 --- a/drivers/infiniband/hw/hns

[PATCH for-next 13/20] IB/hns: Add check for some NULL pointer scenes

2016-09-09 Thread Salil Mehta
From: Lijun Ou Some pointers have not be checked when they are null, so we add check for them. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 11 +++ 1 file

[PATCH for-next 12/20] IB/hns: Return bad wr while post send failed

2016-09-09 Thread Salil Mehta
From: Lijun Ou While post failed, hns roce should return the wr failed to user. We omitted this while qp type is wrong and fixed it. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns

[PATCH for-next 03/20] IB/hns: Add the check for pointer ctrl

2016-09-09 Thread Salil Mehta
From: Lijun Ou The pointer ctrl may be null, so we add check for it. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c

[PATCH for-next 16/20] IB/hns: Validate mtu when modified qp

2016-09-09 Thread Salil Mehta
From: Lijun Ou The mtu should be validated when modify qp,so we check it. Signed-off-by: Lijun Ou Signed-off-by: Peter Chen Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_qp.c | 15 +++ 1 file changed, 15 insertions(+) diff

[PATCH for-next 17/20] IB/hns: Cq has not been freed

2016-09-09 Thread Salil Mehta
From: Lijun Ou Cq has not been freed when fail to ib_copy_to_udata, so need to free it. Signed-off-by: Lijun Ou Signed-off-by: Peter Chen Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_cq.c |5 - 1 file changed, 4 insertions(+), 1

[PATCH for-next 09/20] IB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn

2016-09-09 Thread Salil Mehta
by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_eq.c | 146 +++ drivers/infiniband/hw/hns/hns_roce_eq.h |4 + 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_eq.c b/drivers/

[PATCH for-next 06/20] IB/hns: Remove unused parameter named qp_type

2016-09-09 Thread Salil Mehta
From: Lijun Ou This patch removes the qp_type parameter in hns_roce_set_kernel_sq_size(). Signed-off-by: Lijun Ou Signed-off-by: Ping Zhang Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_qp.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH for-next 08/20] IB/hns: Delete the sqp_start from the structure hns_roce_caps

2016-09-09 Thread Salil Mehta
From: "Wei Hu (Xavier)" This patch deleted the sqp_start from the structure hns_roce_caps, and modified the calculation of the qp number. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h |1 - drivers/infinib

[PATCH for-next 07/20] IB/hns: Fix bug of clear hem

2016-09-09 Thread Salil Mehta
-off-by: Dongdong Huang(Donald) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h |2 + drivers/infiniband/hw/hns/hns_roce_hem.c| 76 +-- drivers/infiniband/hw/hns/hns_roce_hem.h|4 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 140 ++

[PATCH for-next 14/20] IB/hns: The Ack timeout need a lower limit value

2016-09-09 Thread Salil Mehta
From: Lijun Ou The Ack timeout of qpc need a lower limit value,otherwise the read performance will be very lower. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 17

[PATCH for-next 05/20] IB/hns: Simplify function of pd alloc and qp alloc

2016-09-09 Thread Salil Mehta
From: Lijun Ou Hns_roce_pd_alloc and hns_roce_reserve_range_qp use unnecessary transformation of parameters. This patch simplify these two functions. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns

[PATCH for-next 11/20] IB/hns: Fix bug of memory leakage for registering user mr

2016-09-09 Thread Salil Mehta
-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_mr.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c b/drivers/infiniband/hw/hns/hns_roce_mr.c index 59f5e2b..fb87883 100644 --- a/drivers/infiniband/hw/hns/hns_roce_mr.c +++ b/drivers

[PATCH for-next 02/20] IB/hns: Remove parameters of resize cq

2016-09-09 Thread Salil Mehta
From: Lijun Ou In old version of RoCE, it doesn't support to resize cq. So, we remove parameters related to resize cq. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_cq.c |

[PATCH for-next 20/20] IB/hns: Delete the redundant lines in hns_roce_v1_m_qp()

2016-09-09 Thread Salil Mehta
From: Lijun Ou It doesn't need to assign for the filed of qp state in qpc separately when qp happen to migrate state which supported in RoCE engine v1. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c |

[PATCH for-next 15/20] IB/hns: Some items of qpc need to take user param

2016-09-09 Thread Salil Mehta
From: Lijun Ou Some items of qpc need to take user param when modified qp state. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c |6 -- 1 file changed, 4 insertions

[PATCH for-next 00/20] IB/hns: Fixes for various misc. bugs

2016-09-09 Thread Salil Mehta
This patch-set introduces fixes for various bugs and potential problems found during internal review and testing phases of the HNS RoCE driver. NOTE: These fixes have been done over already floated CM patch: https://lkml.org/lkml/2016/9/1/609 Fixes have been done & tested by Oulijun and Huwei.

RE: [PATCH for-next 02/10] IB/hns: Register add_gid and del_gid for GID Table management

2016-09-12 Thread Salil Mehta
> -Original Message- > From: Leon Romanovsky [mailto:l...@kernel.org] > Sent: Monday, September 12, 2016 1:40 PM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > mehta.salil@gmail.com; linux-r...@vger.kernel

[PATCH V2 for-next 0/9] IB/hns: Add CM(Connection Manager) Support to HNS RoCe Driver

2016-09-13 Thread Salil Mehta
This patch-set adds the CM(Connection Manager) support to the HNS RoCE driver. Changes done are primarily to add support of APIs in IB device and some fixes over the base driver to support RDMA Connection Manager. This patch-set also updates the Device binding document as new parameter node-guid wa

[PATCH V2 for-next 1/9] IB/hns: Register HNS RoCE Driver get_netdev() with IB Core

2016-09-13 Thread Salil Mehta
: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index f64f0dd..39e69c3 100644 --- a/drivers/infiniband

[PATCH V2 for-next 2/9] IB/hns: Add & initialize "node_guid" parameter for RDMA CM

2016-09-13 Thread Salil Mehta
device. This value shall be used by RDMA CM. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- PATCH V2: Addressed the comment by Leon Romanovsky * Link: https://lkml.org/lkml/2016/9/12/309 PATCH V1: Initial Patch --- drivers/infiniband/hw/hns

[PATCH V2 for-next 4/9] IB/hns: Fix two possible bugs for rdma cm

2016-09-13 Thread Salil Mehta
From: Lijun Ou Fix the length of wqe that maybe lead to an error and write the end bytes of QP1C into the register. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH V2 for-next 6/9] IB/hns: Change the logic for allocating uar registers

2016-09-13 Thread Salil Mehta
Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_pd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_pd.c b/drivers/infiniband/hw/hns/hns_roce_pd.c index 16271b5..4109f74 100644 --- a/drivers

[PATCH V2 for-next 9/9] IB/hns: Add node_guid definition to the bindings document

2016-09-13 Thread Salil Mehta
From: Lijun Ou This patch adds node_guid definition in bindings document. The value of node_guid will be used during RDMA connection. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- Documentation/devicetree/bindings/infiniband/hisilicon-hns-roce.txt | 2 ++ 1 file

[PATCH V2 for-next 3/9] IB/hns: Fix the value of device_cap_flags

2016-09-13 Thread Salil Mehta
d-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index f0700f4..a9960ba 100644 --- a/drivers/infiniband/hw/hns/hns_roc

[PATCH V2 for-next 8/9] IB/hns: Fix two bugs for rdma cm connecting

2016-09-13 Thread Salil Mehta
From: Lijun Ou This patch mainly modify the value of HNS_ROCE_SL_SHIFT and delete the lines for assigning for the field of local_enable_e2e_credit in QP1C. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- drivers

[PATCH V2 for-next 5/9] IB/hns: Add phy_port for computing GSI/QPN

2016-09-13 Thread Salil Mehta
base driver where iboe port was being used instead of phy_port at some places. This values might not be same always. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 30

[PATCH V2 for-next 7/9] IB/hns: Fix the bug of rdma cm connecting on user mode

2016-09-13 Thread Salil Mehta
From: Lijun Ou Fix bug of modify qp from init to init on user mode. Otherwise, it will oops when rmda cm established. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 41 ++ 1 file changed, 14

RE: [PATCH for-next 16/20] IB/hns: Validate mtu when modified qp

2016-09-13 Thread Salil Mehta
> -Original Message- > From: Leon Romanovsky [mailto:l...@kernel.org] > Sent: Tuesday, September 13, 2016 7:33 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > xuwei (O); mehta.salil@gmail.com; linux-r...@vger.kernel.o

RE: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock

2016-09-13 Thread Salil Mehta
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Leon Romanovsky > Sent: Tuesday, September 13, 2016 7:50 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (

RE: [PATCH for-next 13/20] IB/hns: Add check for some NULL pointer scenes

2016-09-14 Thread Salil Mehta
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Leon Romanovsky > Sent: Tuesday, September 13, 2016 8:00 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (

RE: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock

2016-09-14 Thread Salil Mehta
> -Original Message- > From: Leon Romanovsky [mailto:l...@kernel.org] > Sent: Wednesday, September 14, 2016 6:05 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > xuwei (O); mehta.salil@gmail.com; linux-r...@vger.k

[PATCH for-next 08/10] IB/hns: Fix the bug of rdma cm connecting on user mode

2016-09-01 Thread Salil Mehta
From: Lijun Ou Fix bug of modify qp from init to init on user mode. Otherwise, it will oops when rmda cm established. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 41 ++-- 1 file changed, 14

[PATCH for-next 01/10] IB/hns: Register HNS RoCE Driver get_netdev() with IB Core

2016-09-01 Thread Salil Mehta
: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index f64f0dd..39e69c3 100644 --- a/drivers

[PATCH for-next 07/10] IB/hns: Change the logic for allocating uar registers

2016-09-01 Thread Salil Mehta
Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_pd.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_pd.c b/drivers/infiniband/hw/hns/hns_roce_pd.c index 16271b5..4109f74 100644 --- a/drivers

[PATCH for-next 02/10] IB/hns: Register add_gid and del_gid for GID Table management

2016-09-01 Thread Salil Mehta
From: Lijun Ou This patch adds support of add_gid() and del_gid() function in the HNS RoCE driver for manipulation of the GID table associated with port. This shall be used be used by CM when connection is established. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta

[PATCH for-next 00/10] Add CM(Connection Manager) Support to HNS RoCe Driver

2016-09-01 Thread Salil Mehta
This patch-set adds the CM(Connection Manager) support to the HNS RoCE driver. Changes done are primarily to add support of APIs in IB device and some fixes over the base driver to support RDMA Connection Manager. This patch-set also updates the Device binding document as new parameter node-guid wa

[PATCH for-next 04/10] IB/hns: Fix the value of device_cap_flags

2016-09-01 Thread Salil Mehta
d-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index ec27f0c..b54074d 100644 --- a/drivers/infiniband/hw/hns/hns_roc

[PATCH for-next 03/10] IB/hns: Add & initialize "node_guid" parameter for RDMA CM

2016-09-01 Thread Salil Mehta
device. This value shall be used by RDMA CM. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h |1 + drivers/infiniband/hw/hns/hns_roce_main.c |7 +++ 2 files changed, 8 insertions(+) diff --git a/drivers

[PATCH for-next 05/10] IB/hns: Fix two possible bugs for rdma cm

2016-09-01 Thread Salil Mehta
From: Lijun Ou Fix the length of wqe that maybe lead to an error and write the end bytes of QP1C into the register. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH for-next 09/10] IB/hns: Fix two bugs for rdma cm connecting

2016-09-01 Thread Salil Mehta
From: Lijun Ou This patch mainly modify the value of HNS_ROCE_SL_SHIFT and delete the lines for assigning for the field of local_enable_e2e_credit in QP1C. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h |2

[PATCH for-next 06/10] IB/hns: Add phy_port for computing GSI/QPN

2016-09-01 Thread Salil Mehta
base driver where iboe port was being used instead of phy_port at some places. This values might not be same always. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_device.h |1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c

[PATCH for-next 10/10] IB/hns: Add node_guid definition to the bindings document

2016-09-01 Thread Salil Mehta
From: Lijun Ou This patch adds node_guid definition in bindings document. The value of node_guid will be used during RDMA connection. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta --- .../bindings/infiniband/hisilicon-hns-roce.txt |2 ++ 1 file changed, 2

[PATCH for-next 0/2] {IB,net}/hns: Add support of ACPI to the Hisilicon RoCE Driver

2016-08-23 Thread Salil Mehta
DSDT table) part of the UEFI/BIOS. Again, this change is NOT reflected in this patch-set. Salil Mehta (2): net: hns: Add support of ACPI to HNS driver RoCE Reset function IB/hns: Add support of ACPI to the Hisilicon RoCE driver drivers/infiniband/hw/hns/hns_roce_device.h|2 +

[PATCH for-next 2/2] IB/hns: Add support of ACPI to the Hisilicon RoCE driver

2016-08-23 Thread Salil Mehta
://github.com/dledford/linux/tree/hns-roce Signed-off-by: Salil Mehta --- Change Log PATCH V1: Initial version to support ACPI in HNS RoCE driver. --- drivers/infiniband/hw/hns/hns_roce_device.h |2 +- drivers/infiniband/hw/hns/hns_roce_eq.c |2 +- drivers/infiniband/hw/hns

[PATCH for-next 1/2] net: hns: Add support of ACPI to HNS driver RoCE Reset function

2016-08-23 Thread Salil Mehta
e net-next: https://www.mail-archive.com/netdev@vger.kernel.org/msg123867.html Signed-off-by: Salil Mehta Reviewed-by: Yisen Zhuang --- Change Log PATCH V1: Initial version to support ACPI in RoCE Reset functionality of the HNS driver. --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac

RE: [PATCH for-next 2/2] IB/hns: Add support of ACPI to the Hisilicon RoCE driver

2016-08-24 Thread Salil Mehta
> -Original Message- > From: Leon Romanovsky [mailto:l...@kernel.org] > Sent: Wednesday, August 24, 2016 2:59 PM > To: Salil Mehta > Cc: dledf...@redhat.com; da...@davemloft.net; Huwei (Xavier); oulijun; > Zhuangyuzeng (Yisen); mehta.salil@gmail.com; linux- > r...

RE: [PATCH for-next 0/2] {IB,net}/hns: Add support of ACPI to the Hisilicon RoCE Driver

2016-08-25 Thread Salil Mehta
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, August 25, 2016 5:54 AM > To: Salil Mehta > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > mehta.salil@gmail.com; linux-r...@vger.kernel.org; > n

RE: [PATCH for-next 0/2] {IB,net}/hns: Add support of ACPI to the Hisilicon RoCE Driver

2016-08-25 Thread Salil Mehta
> -Original Message- > From: Doug Ledford [mailto:dledf...@redhat.com] > Sent: Thursday, August 25, 2016 12:57 PM > To: David Miller; Salil Mehta > Cc: Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > mehta.salil@gmail.com; linux-r...@vger.kernel.org; > net...@v

RE: [PATCH for-next 0/2] {IB,net}/hns: Add support of ACPI to the Hisilicon RoCE Driver

2016-08-25 Thread Salil Mehta
> -Original Message- > From: Doug Ledford [mailto:dledf...@redhat.com] > Sent: Thursday, August 25, 2016 2:53 PM > To: Salil Mehta; David Miller > Cc: Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > mehta.salil@gmail.com; linux-r...@vger.kernel.org; > net...@v

RE: [PATCH for-next 0/2] {IB,net}/hns: Add support of ACPI to the Hisilicon RoCE Driver

2016-08-25 Thread Salil Mehta
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Doug Ledford > Sent: Thursday, August 25, 2016 3:09 PM > To: Salil Mehta; David Miller > Cc: Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > meht

RE: [PATCH for-next 0/2] {IB,net}/hns: Add support of ACPI to the Hisilicon RoCE Driver

2016-08-25 Thread Salil Mehta
> -Original Message- > From: Doug Ledford [mailto:dledf...@redhat.com] > Sent: Thursday, August 25, 2016 4:00 PM > To: Salil Mehta; David Miller > Cc: Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > mehta.salil@gmail.com; linux-r...@vger.kernel.org; > net...@v

[PATCH net-next 3/3] net: hns3: Fixes the static check warning due to missing unsupp L3 proto check

2017-08-18 Thread Salil Mehta
This patch fixes the static check warning due to missing handling leg of unsupported L3 protocol type in the hns3_get_l4_protocol() function. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Reported-by: Dan Carpenter Signed-off-by: Salil Mehta --

[PATCH net-next 0/3] Misc. Bug fixes for HNS3 Ethernet Driver

2017-08-18 Thread Salil Mehta
This patch-set fixes various bugs reported by community. Salil Mehta (3): net: hns3: Fixes the missing u64_stats_fetch_begin_irq in 64-bit stats fetch net: hns3: Fixes the static checker error warning in hns3_get_link_ksettings() net: hns3: Fixes the static check warning due to

[PATCH net-next 2/3] net: hns3: Fixes the static checker error warning in hns3_get_link_ksettings()

2017-08-18 Thread Salil Mehta
This patch fixes the static check error warning in hns3_get_link_ksettings() function by re-arranging the code. Fixes: 496d03e960ae ("net: hns3: Add Ethtool support to HNS3 Driver") Reported-by: Dan Carpenter Signed-off-by: Salil Mehta --- .../ethernet/hisilicon/hns3/hns3pf/hns3

RE: [PATCH V2 net] net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs

2017-11-13 Thread Salil Mehta
Hi David, > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, November 13, 2017 1:19 AM > To: Salil Mehta > Cc: h...@lst.de; Zhuangyuzeng (Yisen); lipeng (Y); > mehta.salil@gmail.com; net...@vger.kernel.org; linux- > ker...@vge

[PATCH V3 net-next] net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs

2017-11-13 Thread Salil Mehta
This patch migrates the HNS3 driver code from use of depricated PCI MSI/MSI-X interrupt vector allocation/free APIs to new common APIs. Signed-off-by: Salil Mehta Suggested-by: Christoph Hellwig --- PATCH V3: respin against latest net-next PATCH V2: Yuval Shaia Link -> https://lkml.org/l

RE: [PATCH V3 net-next] net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs

2017-11-14 Thread Salil Mehta
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, November 14, 2017 12:46 PM > To: Salil Mehta > Cc: Zhuangyuzeng (Yisen); lipeng (Y); h...@lst.de; > mehta.salil@gmail.com; net...@vger.kernel.org; linux- > ker...@vge

RE: [PATCH net-next 0/6] net: hns3: support set_link_ksettings and for nway_reset ethtool command

2017-11-03 Thread Salil Mehta
Hi Andrew, > -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Friday, November 03, 2017 3:52 PM > To: lipeng (Y) > Cc: da...@davemloft.net; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; Linuxarm; Salil Mehta > Subject: Re: [PATCH ne

RE: [PATCH net-next 5/9] net: hns3: Fix for vf vlan delete failed problem

2018-08-14 Thread Salil Mehta
Hi Dave, > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, August 13, 2018 4:57 PM > To: Salil Mehta > Cc: Zhuangyuzeng (Yisen) ; lipeng (Y) > ; mehta.salil@gmail.com; > net...@vger.kernel.org; linux-kernel@vger

[PATCH net-next] net: hns3: converting spaces into tabs to avoid checkpatch.pl warning

2018-01-19 Thread Salil Mehta
Spaces were mistakenly used instead of tabs in some of the code related to reset functionality, which caused checkpatch.pl errors. These were missed earlier so fixing them now. Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions

[PATCH net-next 0/9] Add support of VF Reset to HNS3 VF driver

2018-03-22 Thread Salil Mehta
"[PATCH net-next 00/11] fix some bugs for HNS3 driver" Link: https://lkml.org/lkml/2018/3/21/72 Salil Mehta (9): net: hns3: Changes to make enet watchdog timeout func common for PF/VF net: hns3: Add VF Reset Service Task to support event handling net: hns3: Add VF Reset de

[PATCH net-next 5/9] net: hns3: Add support to reset the enet/ring mgmt layer

2018-03-22 Thread Salil Mehta
After VF driver knows that hardware reset has been performed successfully, it should proceed ahead and reset the enet layer. This primarily consists of bringing down interface, clearing TX/RX rings, disassociating vectors from ring etc. Signed-off-by: Salil Mehta --- .../ethernet/hisilicon/hns3

[PATCH net-next 7/9] net: hns3: Changes to support ARQ(Asynchronous Receive Queue)

2018-03-22 Thread Salil Mehta
still gets processed in context to mailbox interrupt. ARQ is important as VF reset introduces some new async messages like MBX_ASSERTING_RESET which adds up to the presssure on the responses for synchronousmessages and they timeout even more quickly. Signed-off-by: Salil Mehta --- drivers/net

[PATCH net-next 8/9] net: hns3: Add *Asserting Reset* mailbox message & handling in VF

2018-03-22 Thread Salil Mehta
the hardware to complete the reset and then further resets/tears its own stack. Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 12 2 files changed, 13 insertions(+) diff

[PATCH net-next 4/9] net: hns3: Add support to request VF Reset to PF

2018-03-22 Thread Salil Mehta
VF driver depends upon PF to eventually reset the hardware. This request is made using the mailbox command. This patch adds the required function to acheive above. Signed-off-by: Salil Mehta --- .../net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 19 +++ 1 file changed, 19

[PATCH net-next 9/9] net: hns3: Changes required in PF mailbox to support VF reset

2018-03-22 Thread Salil Mehta
received VF message, inform the VF of assertion and reset the VF using cmdq interface. Signed-off-by: Salil Mehta --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 2 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 42

[PATCH net-next 3/9] net: hns3: Add VF Reset device state and its handling

2018-03-22 Thread Salil Mehta
resetting the stack/enet layer, which in turn means reinitializing the ring management/enet layer. Note: we would be adding support of 3. later as a separate patch. This decision should not affect VF reset as its event handling is generic in nature. Signed-off-by: Salil Mehta --- drivers/net/eth

[PATCH net-next 2/9] net: hns3: Add VF Reset Service Task to support event handling

2018-03-22 Thread Salil Mehta
VF reset would involve handling of different reset related events from the stack, physical function, mailbox etc. Reset service task would be used in servicing such reset event requests and later handling the hardware completions waits and initiating the stack resets. Signed-off-by: Salil Mehta

[PATCH net-next 1/9] net: hns3: Changes to make enet watchdog timeout func common for PF/VF

2018-03-22 Thread Salil Mehta
following: 1. Makes the existing watchdog timeout handler in enet layer generic i.e. suitable for both VF and PF and 2. Introduces the new reset event handler for the VF code. 3. Changes existing reset event handler of PF code to initialize the reset level Signed-off-by: Salil Mehta

[PATCH net-next 6/9] net: hns3: Add support to re-initialize the hclge device

2018-03-22 Thread Salil Mehta
: Salil Mehta --- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 106 ++--- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 14 +++ 2 files changed, 106 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net

  1   2   3   4   5   6   7   >