diff options
author | Yixian Liu <[email protected]> | 2021-02-05 17:39:33 +0800 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2021-02-08 20:25:26 -0400 |
commit | cd0a4baf36dafb0a6d1a57be712ab6263ef169bc (patch) | |
tree | 64b93550bc14cc876f1d800a89266c65bcdcedc9 | |
parent | 62490fd5a8654f9639a6766921ee72f5dbc6a479 (diff) |
RDMA/hns: Remove unnecessary wrap around for EQ's consumer index
The hns driver wrap around the consumer index of AEQ and CEQ when they
reach to two times of queue entries number for owner mechanism, actually,
it is unnecessary to wrap around since the hardware itself will mask it
before use.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Yixian Liu <[email protected]>
Signed-off-by: Weihang Li <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 45a11fdaaa50..28c2deac58ff 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -5669,9 +5669,6 @@ static int hns_roce_v2_aeq_int(struct hns_roce_dev *hr_dev, ++eq->cons_index; aeqe_found = 1; - if (eq->cons_index > (2 * eq->entries - 1)) - eq->cons_index = 0; - hns_roce_v2_init_irq_work(hr_dev, eq, queue_num); aeqe = next_aeqe_sw_v2(eq); @@ -5714,9 +5711,6 @@ static int hns_roce_v2_ceq_int(struct hns_roce_dev *hr_dev, ++eq->cons_index; ceqe_found = 1; - if (eq->cons_index > (EQ_DEPTH_COEFF * eq->entries - 1)) - eq->cons_index = 0; - ceqe = next_ceqe_sw_v2(eq); } |