On Thu, Dec 10, 2015 at 04:52:30PM -0500, [email protected] wrote:
> From: Dean Luick <[email protected]>
>
>
> @@ -2555,6 +2567,7 @@ static void ib_mad_completion_handler(struct
> work_struct *work)
> {
> struct ib_mad_port_private *port_priv;
> struct ib_wc wc;
> + int count = 0;
>
> port_priv = container_of(work, struct ib_mad_port_private, work);
> ib_req_notify_cq(port_priv->cq, IB_CQ_NEXT_COMP);
I think you shoudld push the call to ib_req_notify_cq outside the
while loop. You don't need to arm the CQ if you re-queued the work.
Only when you have drained the CQ should you re-arm.
> @@ -2574,6 +2587,11 @@ static void ib_mad_completion_handler(struct
> work_struct *work)
> }
> } else
> mad_error_handler(port_priv, &wc);
> +
> + if (++count > MAD_COMPLETION_PROC_LIMIT) {
> + queue_work(port_priv->wq, &port_priv->work);
> + break;
> + }
> }
> }
>
> --
> 1.8.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html