Commit cd0a4baf authored by Yixian Liu's avatar Yixian Liu Committed by Jason Gunthorpe

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/1612517974-31867-12-git-send-email-liweihang@huawei.comSigned-off-by: default avatarYixian Liu <liuyixian@huawei.com>
Signed-off-by: default avatarWeihang Li <liweihang@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 62490fd5
...@@ -5669,9 +5669,6 @@ static int hns_roce_v2_aeq_int(struct hns_roce_dev *hr_dev, ...@@ -5669,9 +5669,6 @@ static int hns_roce_v2_aeq_int(struct hns_roce_dev *hr_dev,
++eq->cons_index; ++eq->cons_index;
aeqe_found = 1; 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); hns_roce_v2_init_irq_work(hr_dev, eq, queue_num);
aeqe = next_aeqe_sw_v2(eq); aeqe = next_aeqe_sw_v2(eq);
...@@ -5714,9 +5711,6 @@ static int hns_roce_v2_ceq_int(struct hns_roce_dev *hr_dev, ...@@ -5714,9 +5711,6 @@ static int hns_roce_v2_ceq_int(struct hns_roce_dev *hr_dev,
++eq->cons_index; ++eq->cons_index;
ceqe_found = 1; ceqe_found = 1;
if (eq->cons_index > (EQ_DEPTH_COEFF * eq->entries - 1))
eq->cons_index = 0;
ceqe = next_ceqe_sw_v2(eq); ceqe = next_ceqe_sw_v2(eq);
} }
......
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