Commit 586f4e95 authored by Moni Shoua's avatar Moni Shoua Committed by Jason Gunthorpe

IB/mlx5: Remove useless check in ODP handler

When handling an ODP event for a receive WQE in SRQ the target QP is
unknown. Therefore, it is wrong to ask if QP has a SRQ in the page-fault
handler.
Signed-off-by: default avatarMoni Shoua <monis@mellanox.com>
Reviewed-by: default avatarMajd Dibbiny <majd@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 52a72e2a
...@@ -869,7 +869,6 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, u32 key, ...@@ -869,7 +869,6 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, u32 key,
/** /**
* Parse a series of data segments for page fault handling. * Parse a series of data segments for page fault handling.
* *
* @qp the QP on which the fault occurred.
* @pfault contains page fault information. * @pfault contains page fault information.
* @wqe points at the first data segment in the WQE. * @wqe points at the first data segment in the WQE.
* @wqe_end points after the end of the WQE. * @wqe_end points after the end of the WQE.
...@@ -886,7 +885,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, u32 key, ...@@ -886,7 +885,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, u32 key,
*/ */
static int pagefault_data_segments(struct mlx5_ib_dev *dev, static int pagefault_data_segments(struct mlx5_ib_dev *dev,
struct mlx5_pagefault *pfault, struct mlx5_pagefault *pfault,
struct mlx5_ib_qp *qp, void *wqe, void *wqe,
void *wqe_end, u32 *bytes_mapped, void *wqe_end, u32 *bytes_mapped,
u32 *total_wqe_bytes, int receive_queue) u32 *total_wqe_bytes, int receive_queue)
{ {
...@@ -897,10 +896,6 @@ static int pagefault_data_segments(struct mlx5_ib_dev *dev, ...@@ -897,10 +896,6 @@ static int pagefault_data_segments(struct mlx5_ib_dev *dev,
size_t bcnt; size_t bcnt;
int inline_segment; int inline_segment;
/* Skip SRQ next-WQE segment. */
if (receive_queue && qp->ibqp.srq)
wqe += sizeof(struct mlx5_wqe_srq_next_seg);
if (bytes_mapped) if (bytes_mapped)
*bytes_mapped = 0; *bytes_mapped = 0;
if (total_wqe_bytes) if (total_wqe_bytes)
...@@ -1200,7 +1195,7 @@ static void mlx5_ib_mr_wqe_pfault_handler(struct mlx5_ib_dev *dev, ...@@ -1200,7 +1195,7 @@ static void mlx5_ib_mr_wqe_pfault_handler(struct mlx5_ib_dev *dev,
goto resolve_page_fault; goto resolve_page_fault;
} }
ret = pagefault_data_segments(dev, pfault, qp, wqe, wqe_end, ret = pagefault_data_segments(dev, pfault, wqe, wqe_end,
&bytes_mapped, &total_wqe_bytes, &bytes_mapped, &total_wqe_bytes,
!requestor); !requestor);
if (ret == -EAGAIN) { if (ret == -EAGAIN) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment