[openib-general] IPOIB NAPI
Michael S. Tsirkin
mst at mellanox.co.il
Thu Feb 22 15:19:17 PST 2007
> > An API idea:
> > how about instead testing missed_events, we add a flag:
> >
> > IB_CQ_TEST (or a longer name IB_CQ_REPORT_MISSED_EVENTS?)
> > and change ib_req_notify_cq to return int which will keep
> > the missed_events value, only if this flag is set?
> >
> > This has 2 advatages
> > - Less churn updating all users to new API - they just ignore return value -
> > and still almost no overhead for them as they don't set IB_CQ_TEST
> > - For all users we have to push less values on stack - note compiler can't
> > get rid of them as we are calling function through a pointer
> > - For users that do
> > missed_events = ib_req_notify_cq(priv->cq, IB_CQ_NEXT_COMP | IB_CQ_TEST)
> > we get the result in register.
>
> Yes, I like this. So ib_req_notify_cq() gets a return value that is
> negative if an error occurred, 0 if everything is fine, or positive if
> a missed event might have happened.
>
> I think I prefer the longer name IB_CQ_REPORT_MISSED_EVENTS -- at
> least there's a chance at guessing what it means even if you don't
> read the documentation.
By the way, how about extending the userspace API in a similiar
fashion?
missed_events = ibv_req_notify_cq(priv->cq, IBV_CQ_NEXT_COMP |
IBV_CQ_REPORT_MISSED_EVENTS)
--
MST
More information about the general
mailing list