public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* IBV Test Program
@ 2011-03-29 16:48 Greg Kerr
       [not found] ` <201103291248.42710.kerr.g-movQPkccWJngpn9g0Uvcdg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kerr @ 2011-03-29 16:48 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hi, 

I've tried asking this question in a few different places with no luck, so I'm 
hoping you folks can help me. I'm an undergraduate research assistant learning 
how to use verbs and I had a question.

I want to modify rc_pingpong.c to loop and basically send data between the two 
nodes multiple times, instead of just once. The first time through, it 
successfuly completes the transmission. On the next iteration the call to 
ibv_post_recv fails.

The source code is here: 
http://pastebin.com/1mEu9x4f (server)
http://pastebin.com/k1NKdCSn (client)

Please forgive the debug code scattered in there.

I'm pretty sure it must be a simple problem, I just don't know what the 
problem is.  I can't imagine the queue overflowing after a second 
ibv_post_recv.

The relevant changes are around line 769.

-- 
Greg Kerr
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: IBV Test Program
       [not found] ` <201103291248.42710.kerr.g-movQPkccWJngpn9g0Uvcdg@public.gmane.org>
@ 2011-03-29 17:07   ` Roland Dreier
  2011-03-29 17:14   ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Roland Dreier @ 2011-03-29 17:07 UTC (permalink / raw)
  To: Greg Kerr; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Tue, Mar 29, 2011 at 9:48 AM, Greg Kerr <kerr.g-movQPkccWJngpn9g0Uvcdg@public.gmane.org> wrote:
> I want to modify rc_pingpong.c to loop and basically send data between the two
> nodes multiple times, instead of just once. The first time through, it
> successfuly completes the transmission. On the next iteration the call to
> ibv_post_recv fails.

Not sure I follow... the pingpong code already sends multiple times in a loop?

Instead of a link to a pastebin, can you send a diff to show what you changed?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: IBV Test Program
       [not found] ` <201103291248.42710.kerr.g-movQPkccWJngpn9g0Uvcdg@public.gmane.org>
  2011-03-29 17:07   ` Roland Dreier
@ 2011-03-29 17:14   ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2011-03-29 17:14 UTC (permalink / raw)
  To: Greg Kerr; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Tue, Mar 29, 2011 at 12:48:42PM -0400, Greg Kerr wrote:

> I've tried asking this question in a few different places with no
> luck, so I'm hoping you folks can help me. I'm an undergraduate
> research assistant learning how to use verbs and I had a question.
 
> I want to modify rc_pingpong.c to loop and basically send data
> between the two nodes multiple times, instead of just once. The
> first time through, it successfuly completes the transmission. On
> the next iteration the call to ibv_post_recv fails.

This will post into a RC QP without a recv buffer on the far side
because the way you have the loop around ibv_poll_cq is not right.

You need to loop around ibv_poll_cq until you get both completions,
then repost your recv buffer and then sleep. Otherwise you will end up
posting a send into a QP with no recv buffer and send the QP to the
err state which mucks everything up.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-29 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 16:48 IBV Test Program Greg Kerr
     [not found] ` <201103291248.42710.kerr.g-movQPkccWJngpn9g0Uvcdg@public.gmane.org>
2011-03-29 17:07   ` Roland Dreier
2011-03-29 17:14   ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox