diff options
author | Moni Shoua <monis@mellanox.com> | 2019-01-22 08:48:43 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-02-04 14:34:06 -0700 |
commit | 586f4e95c71a2443d0aa8d6993407ce0aaf77a09 (patch) | |
tree | 7bf5452901de6e1069bb8a2a65b2e075c2bb8a07 /drivers/infiniband/hw/mlx5 | |
parent | 52a72e2a395fa3c5ab5df41058a8511e87215730 (diff) | |
download | linux-stable-586f4e95c71a2443d0aa8d6993407ce0aaf77a09.tar.gz linux-stable-586f4e95c71a2443d0aa8d6993407ce0aaf77a09.tar.bz2 linux-stable-586f4e95c71a2443d0aa8d6993407ce0aaf77a09.zip |
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: Moni Shoua <monis@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
-rw-r--r-- | drivers/infiniband/hw/mlx5/odp.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c index 2cbe4320513b..07b0f8bd6cd9 100644 --- a/drivers/infiniband/hw/mlx5/odp.c +++ b/drivers/infiniband/hw/mlx5/odp.c @@ -869,7 +869,6 @@ srcu_unlock: /** * Parse a series of data segments for page fault handling. * - * @qp the QP on which the fault occurred. * @pfault contains page fault information. * @wqe points at the first data segment in the WQE. * @wqe_end points after the end of the WQE. @@ -886,7 +885,7 @@ srcu_unlock: */ static int pagefault_data_segments(struct mlx5_ib_dev *dev, struct mlx5_pagefault *pfault, - struct mlx5_ib_qp *qp, void *wqe, + void *wqe, void *wqe_end, u32 *bytes_mapped, u32 *total_wqe_bytes, int receive_queue) { @@ -897,10 +896,6 @@ static int pagefault_data_segments(struct mlx5_ib_dev *dev, size_t bcnt; 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) *bytes_mapped = 0; if (total_wqe_bytes) @@ -1200,7 +1195,7 @@ static void mlx5_ib_mr_wqe_pfault_handler(struct mlx5_ib_dev *dev, 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, !requestor); if (ret == -EAGAIN) { |