* [PATCH V2 for-next 1/3] RDMA/hns: Fix a bug with modifying mac address
[not found] ` <1517996970-79496-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2018-02-07 9:49 ` Lijun Ou
2018-02-07 9:49 ` [PATCH V2 for-next 2/3] RDMA/hns: Fix QP state judgement before receiving work requests Lijun Ou
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Lijun Ou @ 2018-02-07 9:49 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, jgg-VPRAkNaXOzVWk0Htik3J/w
Cc: leon-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA
When modifying mac address, it will trigger hns_roce_del_gid
function and can't delete the default gid matched the index
because the attribute of gid is null.
Signed-off-by: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
V2: Add initial operation for zattr from Jason Gunthorpe's reviews.
V1: The initial submit
---
drivers/infiniband/hw/hns/hns_roce_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index eb9a69f..8255bb9 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -100,6 +100,7 @@ static int hns_roce_del_gid(struct ib_device *device, u8 port_num,
unsigned int index, void **context)
{
struct hns_roce_dev *hr_dev = to_hr_dev(device);
+ struct ib_gid_attr zattr = { };
union ib_gid zgid = { {0} };
u8 port = port_num - 1;
unsigned long flags;
@@ -110,7 +111,7 @@ static int hns_roce_del_gid(struct ib_device *device, u8 port_num,
spin_lock_irqsave(&hr_dev->iboe.lock, flags);
- ret = hr_dev->hw->set_gid(hr_dev, port, index, &zgid, NULL);
+ ret = hr_dev->hw->set_gid(hr_dev, port, index, &zgid, &zattr);
spin_unlock_irqrestore(&hr_dev->iboe.lock, flags);
--
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 for-next 2/3] RDMA/hns: Fix QP state judgement before receiving work requests
[not found] ` <1517996970-79496-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-02-07 9:49 ` [PATCH V2 for-next 1/3] RDMA/hns: Fix a bug with modifying mac address Lijun Ou
@ 2018-02-07 9:49 ` Lijun Ou
2018-02-07 9:49 ` [PATCH V2 for-next 3/3] RDMA/hns: Use free_pages function instead of free_page Lijun Ou
2018-02-14 23:53 ` [PATCH V2 for-next 0/3] Several fixes for hns Jason Gunthorpe
3 siblings, 0 replies; 5+ messages in thread
From: Lijun Ou @ 2018-02-07 9:49 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, jgg-VPRAkNaXOzVWk0Htik3J/w
Cc: leon-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA
From: Yixian Liu <liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
The QP can accept receive work requests only when the QP is
in the states that allow them to be submitted.
This patch updates the QP state judgement based on the
specification.
Signed-off-by: Yixian Liu <liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Signed-off-by: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
1 file changed, 1 insertion(+), 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 db2ff35..0aa7483 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -509,7 +509,7 @@ static int hns_roce_v2_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
spin_lock_irqsave(&hr_qp->rq.lock, flags);
ind = hr_qp->rq.head & (hr_qp->rq.wqe_cnt - 1);
- if (hr_qp->state == IB_QPS_RESET || hr_qp->state == IB_QPS_ERR) {
+ if (hr_qp->state == IB_QPS_RESET) {
spin_unlock_irqrestore(&hr_qp->rq.lock, flags);
*bad_wr = wr;
return -EINVAL;
--
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 for-next 3/3] RDMA/hns: Use free_pages function instead of free_page
[not found] ` <1517996970-79496-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-02-07 9:49 ` [PATCH V2 for-next 1/3] RDMA/hns: Fix a bug with modifying mac address Lijun Ou
2018-02-07 9:49 ` [PATCH V2 for-next 2/3] RDMA/hns: Fix QP state judgement before receiving work requests Lijun Ou
@ 2018-02-07 9:49 ` Lijun Ou
2018-02-14 23:53 ` [PATCH V2 for-next 0/3] Several fixes for hns Jason Gunthorpe
3 siblings, 0 replies; 5+ messages in thread
From: Lijun Ou @ 2018-02-07 9:49 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, jgg-VPRAkNaXOzVWk0Htik3J/w
Cc: leon-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA
It need to use free_pages function for free the memory allocated
by __get_free_pages function.
Signed-off-by: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/hns/hns_roce_mr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c b/drivers/infiniband/hw/hns/hns_roce_mr.c
index da86a811..f7256d8 100644
--- a/drivers/infiniband/hw/hns/hns_roce_mr.c
+++ b/drivers/infiniband/hw/hns/hns_roce_mr.c
@@ -933,7 +933,7 @@ int hns_roce_ib_umem_write_mtt(struct hns_roce_dev *hr_dev,
ret = hns_roce_write_mtt(hr_dev, mtt, n, i, pages);
out:
- free_page((unsigned long) pages);
+ free_pages((unsigned long) pages, order);
return ret;
}
--
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 for-next 0/3] Several fixes for hns
[not found] ` <1517996970-79496-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
` (2 preceding siblings ...)
2018-02-07 9:49 ` [PATCH V2 for-next 3/3] RDMA/hns: Use free_pages function instead of free_page Lijun Ou
@ 2018-02-14 23:53 ` Jason Gunthorpe
3 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2018-02-14 23:53 UTC (permalink / raw)
To: Lijun Ou
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Wed, Feb 07, 2018 at 05:49:27PM +0800, Lijun Ou wrote:
> This patchset include three fixes for hns driver. the first patch
> mainly matched with IB protocol. the second patch fix the bug
> with freeing memory by __get_free_pages. the last patch mainly
> fix the bug when changed the hw mac address.
>
> Change from V1:
> 1. Fix the comment given by Jason Gunthorpe
>
> Lijun Ou (2):
> RDMA/hns: Fix a bug with modifying mac address
> RDMA/hns: Use free_pages function instead of free_page
>
> Yixian Liu (1):
> RDMA/hns: Fix QP state judgement before receiving work requests
I applied these to -next as requested, but I suspect two of them
should have gone to -rc. maybe all three.
Jason
--
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