diff mbox series

[rdma-rc] RDMA/irdma: Process extended CQ entries correctly

Message ID 20211005182302.374-1-shiraz.saleem@intel.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [rdma-rc] RDMA/irdma: Process extended CQ entries correctly | expand

Commit Message

Shiraz Saleem Oct. 5, 2021, 6:23 p.m. UTC
The valid bit for extended CQE's written by HW is
retrieved from the incorrect quad-word. This leads
to missed completions for any UD traffic particularly
after a wrap-around.

Get the valid bit for extended CQE's from the correct
quad-word in the descriptor.

Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries")
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
---
 drivers/infiniband/hw/irdma/uk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jason Gunthorpe Oct. 6, 2021, 7:39 p.m. UTC | #1
On Tue, Oct 05, 2021 at 01:23:02PM -0500, Shiraz Saleem wrote:
> The valid bit for extended CQE's written by HW is
> retrieved from the incorrect quad-word. This leads
> to missed completions for any UD traffic particularly
> after a wrap-around.
> 
> Get the valid bit for extended CQE's from the correct
> quad-word in the descriptor.
> 
> Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries")
> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> ---
>  drivers/infiniband/hw/irdma/uk.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c
index 5fb92de..9b544a3 100644
--- a/drivers/infiniband/hw/irdma/uk.c
+++ b/drivers/infiniband/hw/irdma/uk.c
@@ -1092,12 +1092,12 @@  enum irdma_status_code
 		if (cq->avoid_mem_cflct) {
 			ext_cqe = (__le64 *)((u8 *)cqe + 32);
 			get_64bit_val(ext_cqe, 24, &qword7);
-			polarity = (u8)FIELD_GET(IRDMA_CQ_VALID, qword3);
+			polarity = (u8)FIELD_GET(IRDMA_CQ_VALID, qword7);
 		} else {
 			peek_head = (cq->cq_ring.head + 1) % cq->cq_ring.size;
 			ext_cqe = cq->cq_base[peek_head].buf;
 			get_64bit_val(ext_cqe, 24, &qword7);
-			polarity = (u8)FIELD_GET(IRDMA_CQ_VALID, qword3);
+			polarity = (u8)FIELD_GET(IRDMA_CQ_VALID, qword7);
 			if (!peek_head)
 				polarity ^= 1;
 		}