[openib-general] segmentation fault in ibv_modify_srq
Jack Morgenstein
jackm at mellanox.co.il
Sun Oct 9 09:30:05 PDT 2005
Sayantan,
The Limit Event must be re-armed after an event has occurred (it is a "one-shot").
(i.e., modify-srq/set-limit must be re-invoked).This is compliant with the
IB Spec (see section 10.2.9.3, first paragraph). (Note that after each SRQ LWM
event, the limit for the SRQ gets reset back to zero -- i.e., disabled).
Therefore, proper use of this feature is as follows (after creating the SRQ):
a. Post the SRQ WQEs
b. Arm the Limit to a non-zero value (less than the number of WQEs posted,
or the arming is useless -- you will immediately get the event).
c. If the number of posted WQEs falls below your limit, you will get an
event.
d. Handling the event:
1) FIRST, post more WQEs to the SRQ to get the number of posted wqe's to be
greater than your desired limit.
2) THEN, re-arm the event (i.e., modify the SRQ limit again to
be a non-zero value).
Jack
-----Original Message-----
On Sun, Oct 09, 2005 at 05:18:53PM +0200, Sayantan Sur wrote:
> Roland,
>
> * On Oct,13 Roland Dreier<rolandd at cisco.com> wrote :
> > Sayantan> I noticed that the test re-posts buffers only when the
> > Sayantan> outstanding recv count is <= 1. I set a SRQ limit as
> > Sayantan> max_recv - 5. So, I should get the event when 5 WQEs are
> > Sayantan> consumed from the SRQ, right?
> >
> > Yes, your code is correct. The problem was that the mthca kernel
> > driver was dispatching SRQ events incorrectly, so the event never
> > reached userspace. I've checked in a fix for that, and I'm going to
> > queue the SRQ limit event stuff for 2.6.15 (now that I've seen it
> > working).
>
> I did some further testing with this. Apparently, when the asynchronous
> thread is first started, it gets the limit event (since no receives are
> posted yet ...). But after that when the number of posted receives
> actually drop below max_recv - 5, I am not able to see another limit
> event.
>
> Do you think that this could happen in the current implementation?
>
> Thanks,
> Sayantan.
>
> --
> http://www.cse.ohio-state.edu/~surs
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit
> http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list