* [PATCH for-next 00/16] IB/hfi1, qib, rdmavt: patches for next 08/21/2017
@ 2017-08-22 1:26 Dennis Dalessandro
2017-08-22 1:26 ` [PATCH for-next 02/16] IB/{qib, hfi1}: Avoid flow control testing for RDMA write operation Dennis Dalessandro
2017-08-28 23:16 ` [PATCH for-next 00/16] IB/hfi1, qib, rdmavt: patches for next 08/21/2017 Doug Ledford
0 siblings, 2 replies; 3+ messages in thread
From: Dennis Dalessandro @ 2017-08-22 1:26 UTC (permalink / raw)
To: dledford
Cc: Mike Marciniszyn, linux-rdma, stable, Kaike Wan, Michael J. Ruhl,
Grzegorz Morys, Harish Chegondi, Kamenee Arumugam
Hi Doug,
Another week another set of patches. I meant to send on Friday but was waiting
for 0-day builds to complete. I still haven't gotten any notification, the
service may be down but I wanted to get these on the list anyway for review.
If I get any bad result I will reply but there is nothing particularly scary
in here.
Content wise this is more clean ups including a patch for rdmavt to use
the put_swqe/clear_mr_ref helpers that support was added for in qib/hfi1
previously.
We have some minor bug fixes as well. A large portion of the patch set is
a clean up/refactoring exercise by Harish that I took because it makes the code
cleaner and easier to read.
Note, one of the fixes from Mike is marked stable. I don't know if it's something
that you want to take into this late of an RC so it may be best to just go to
next and flow through the stable process.
Patches can can also be found in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.14
---
Grzegorz Morys (1):
IB/hfi1: Ratelimit prints from sdma_interrupt
Harish Chegondi (7):
IB/hfi1: Clean up hfi1_user_exp_rcv_setup function
IB/hfi1: Clean up user_sdma_send_pkts() function
IB/hfi1: Clean up pin_vector_pages() function
IB/hfi1: Fix the bail out code in pin_vector_pages() function
IB/hfi1: Remove duplicate definitions of num_user_pages() function
IB/hfi1: Move structure definitions from user_exp_rcv.c to user_exp_rcv.h
IB/hfi1: Move structure and MACRO definitions in user_sdma.c to user_sdma.h
Kaike Wan (1):
IB/hfi1: Add received request info to qp_stats
Kamenee Arumugam (3):
IB/qib: Remove unnecessary memory allocation for boardname
IB/qib: Stricter bounds checking for copy and array access
IB/hfi1: Fix whitespace alignment issue for MAD
Michael J. Ruhl (1):
IB/hfi1: Improve local kmem_cache_alloc performance
Mike Marciniszyn (3):
IB/rdmavt: Use rvt_put_swqe() in rvt_clear_mr_ref()
IB/{qib,hfi1}: Avoid flow control testing for RDMA write operation
IB/hfi1: Add opcode states to qp_stats
drivers/infiniband/hw/hfi1/chip.c | 4
drivers/infiniband/hw/hfi1/file_ops.c | 2
drivers/infiniband/hw/hfi1/hfi.h | 6
drivers/infiniband/hw/hfi1/mad.c | 2
drivers/infiniband/hw/hfi1/qp.c | 13 +
drivers/infiniband/hw/hfi1/rc.c | 3
drivers/infiniband/hw/hfi1/user_exp_rcv.c | 255 ++++++++++-------
drivers/infiniband/hw/hfi1/user_exp_rcv.h | 34 ++
drivers/infiniband/hw/hfi1/user_sdma.c | 434 +++++++++--------------------
drivers/infiniband/hw/hfi1/user_sdma.h | 166 +++++++++++
drivers/infiniband/hw/hfi1/verbs_txreq.c | 11 -
drivers/infiniband/hw/hfi1/vnic_sdma.c | 13 -
drivers/infiniband/hw/qib/qib_iba6120.c | 20 -
drivers/infiniband/hw/qib/qib_iba7220.c | 22 +
drivers/infiniband/hw/qib/qib_iba7322.c | 40 +--
drivers/infiniband/hw/qib/qib_init.c | 1
drivers/infiniband/hw/qib/qib_mad.c | 4
drivers/infiniband/hw/qib/qib_rc.c | 4
drivers/infiniband/hw/qib/qib_ruc.c | 6
drivers/infiniband/sw/rdmavt/qp.c | 6
20 files changed, 556 insertions(+), 490 deletions(-)
--
-Denny
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH for-next 02/16] IB/{qib, hfi1}: Avoid flow control testing for RDMA write operation
2017-08-22 1:26 [PATCH for-next 00/16] IB/hfi1, qib, rdmavt: patches for next 08/21/2017 Dennis Dalessandro
@ 2017-08-22 1:26 ` Dennis Dalessandro
2017-08-28 23:16 ` [PATCH for-next 00/16] IB/hfi1, qib, rdmavt: patches for next 08/21/2017 Doug Ledford
1 sibling, 0 replies; 3+ messages in thread
From: Dennis Dalessandro @ 2017-08-22 1:26 UTC (permalink / raw)
To: dledford; +Cc: linux-rdma, Mike Marciniszyn, stable, Kaike Wan
From: Mike Marciniszyn <mike.marciniszyn@intel.com>
Section 9.7.7.2.5 of the 1.3 IBTA spec clearly says that receive
credits should never apply to RDMA write.
qib and hfi1 were doing that. The following situation will result
in a QP hang:
- A prior SEND or RDMA_WRITE with immmediate consumed the last
credit for a QP using RC receive buffer credits
- The prior op is acked so there are no more acks
- The peer ULP fails to post receive for some reason
- An RDMA write sees that the credits are exhausted and waits
- The peer ULP posts receive buffers
- The ULP posts a send or RDMA write that will be hung
The fix is to avoid the credit test for the RDMA write operation.
Cc: <stable@vger.kernel.org>
Reviewed-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
---
drivers/infiniband/hw/hfi1/rc.c | 3 ++-
drivers/infiniband/hw/qib/qib_rc.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c
index 99defcc..e1cf0c0 100644
--- a/drivers/infiniband/hw/hfi1/rc.c
+++ b/drivers/infiniband/hw/hfi1/rc.c
@@ -442,7 +442,7 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps)
case IB_WR_RDMA_WRITE:
if (newreq && !(qp->s_flags & RVT_S_UNLIMITED_CREDIT))
qp->s_lsn++;
- /* FALLTHROUGH */
+ goto no_flow_control;
case IB_WR_RDMA_WRITE_WITH_IMM:
/* If no credit, return. */
if (!(qp->s_flags & RVT_S_UNLIMITED_CREDIT) &&
@@ -450,6 +450,7 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps)
qp->s_flags |= RVT_S_WAIT_SSN_CREDIT;
goto bail;
}
+no_flow_control:
put_ib_reth_vaddr(
wqe->rdma_wr.remote_addr,
&ohdr->u.rc.reth);
diff --git a/drivers/infiniband/hw/qib/qib_rc.c b/drivers/infiniband/hw/qib/qib_rc.c
index 4ddbcac..e9a9173 100644
--- a/drivers/infiniband/hw/qib/qib_rc.c
+++ b/drivers/infiniband/hw/qib/qib_rc.c
@@ -348,7 +348,7 @@ int qib_make_rc_req(struct rvt_qp *qp, unsigned long *flags)
case IB_WR_RDMA_WRITE:
if (newreq && !(qp->s_flags & RVT_S_UNLIMITED_CREDIT))
qp->s_lsn++;
- /* FALLTHROUGH */
+ goto no_flow_control;
case IB_WR_RDMA_WRITE_WITH_IMM:
/* If no credit, return. */
if (!(qp->s_flags & RVT_S_UNLIMITED_CREDIT) &&
@@ -356,7 +356,7 @@ int qib_make_rc_req(struct rvt_qp *qp, unsigned long *flags)
qp->s_flags |= RVT_S_WAIT_SSN_CREDIT;
goto bail;
}
-
+no_flow_control:
ohdr->u.rc.reth.vaddr =
cpu_to_be64(wqe->rdma_wr.remote_addr);
ohdr->u.rc.reth.rkey =
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH for-next 00/16] IB/hfi1, qib, rdmavt: patches for next 08/21/2017
2017-08-22 1:26 [PATCH for-next 00/16] IB/hfi1, qib, rdmavt: patches for next 08/21/2017 Dennis Dalessandro
2017-08-22 1:26 ` [PATCH for-next 02/16] IB/{qib, hfi1}: Avoid flow control testing for RDMA write operation Dennis Dalessandro
@ 2017-08-28 23:16 ` Doug Ledford
1 sibling, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2017-08-28 23:16 UTC (permalink / raw)
To: Dennis Dalessandro
Cc: Mike Marciniszyn, linux-rdma, stable, Kaike Wan, Michael J. Ruhl,
Grzegorz Morys, Harish Chegondi, Kamenee Arumugam
On Mon, 2017-08-21 at 18:26 -0700, Dennis Dalessandro wrote:
> Hi Doug,
>
> Another week another set of patches. I meant to send on Friday but
> was waiting
> for 0-day builds to complete. I still haven't gotten any
> notification, the
> service may be down but I wanted to get these on the list anyway for
> review.
> If I get any bad result I will reply but there is nothing
> particularly scary
> in here.
>
> Content wise this is more clean ups including a patch for rdmavt to
> use
> the put_swqe/clear_mr_ref helpers that support was added for in
> qib/hfi1
> previously.
>
> We have some minor bug fixes as well. A large portion of the patch
> set is
> a clean up/refactoring exercise by Harish that I took because it
> makes the code
> cleaner and easier to read.
>
> Note, one of the fixes from Mike is marked stable. I don't know if
> it's something
> that you want to take into this late of an RC so it may be best to
> just go to
> next and flow through the stable process.
>
> Patches can can also be found in my GitHub repo at:
> https://github.com/ddalessa/kernel/tree/for-4.14
>
Hi Denny,
I went ahead and took these, but please make sure you follow up with
the review requests from Leon. Preferably by the time I'm back from
PTO the incremental patches will be waiting for me ;-)
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-28 23:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-22 1:26 [PATCH for-next 00/16] IB/hfi1, qib, rdmavt: patches for next 08/21/2017 Dennis Dalessandro
2017-08-22 1:26 ` [PATCH for-next 02/16] IB/{qib, hfi1}: Avoid flow control testing for RDMA write operation Dennis Dalessandro
2017-08-28 23:16 ` [PATCH for-next 00/16] IB/hfi1, qib, rdmavt: patches for next 08/21/2017 Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).