diff options
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index eb3d628ec4dd..22841487f600 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
@@ -2044,13 +2044,19 @@ isert_handle_wc(struct ib_wc *wc) | |||
2044 | static void | 2044 | static void |
2045 | isert_cq_work(struct work_struct *work) | 2045 | isert_cq_work(struct work_struct *work) |
2046 | { | 2046 | { |
2047 | enum { isert_poll_budget = 65536 }; | ||
2047 | struct isert_comp *comp = container_of(work, struct isert_comp, | 2048 | struct isert_comp *comp = container_of(work, struct isert_comp, |
2048 | work); | 2049 | work); |
2050 | int completed = 0; | ||
2049 | struct ib_wc wc; | 2051 | struct ib_wc wc; |
2050 | 2052 | ||
2051 | while (ib_poll_cq(comp->cq, 1, &wc) == 1) | 2053 | while (ib_poll_cq(comp->cq, 1, &wc) == 1) { |
2052 | isert_handle_wc(&wc); | 2054 | isert_handle_wc(&wc); |
2053 | 2055 | ||
2056 | if (++completed >= isert_poll_budget) | ||
2057 | break; | ||
2058 | } | ||
2059 | |||
2054 | ib_req_notify_cq(comp->cq, IB_CQ_NEXT_COMP); | 2060 | ib_req_notify_cq(comp->cq, IB_CQ_NEXT_COMP); |
2055 | } | 2061 | } |
2056 | 2062 | ||