Roland Dreier wrote:
> > do {
> > while (ib_poll_cq(cq, 1, &wc) > 0)
> > /* process wc */
> > } while (ib_req_notify_cq(cq, IB_CQ_NEXT_COMP |
> > IB_CQ_REPORT_MISSED_EVENTS) > 0);
> This approach can be used to have race-free in-order processing of
> completions using a scheme such as the NAPI processing loop used by the
> IPoIB driver (with help from the core networking stack).
Roland, I'm wasn't sure if/howmuch the results are buggy, but the IPoIB poll
loop doesn't check whether the return code of ib_req_notify_cq is negative
(error) or positive (more completions to poll), any thoughts on the matter?
444 if (done < budget) {
445 if (dev->features & NETIF_F_LRO)
446 lro_flush_all(&priv->lro.lro_mgr);
447
448 napi_complete(napi);
449 if (unlikely(ib_req_notify_cq(priv->recv_cq,
450 IB_CQ_NEXT_COMP |
451
IB_CQ_REPORT_MISSED_EVENTS)) &&
452 napi_reschedule(napi))
453 goto poll_more;
454 }
455
456 return done;
457 }
Or.
--
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