From: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
To: Veerendra Allada <allada.v-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org
Subject: Re: RDMA_CM_EVENT_REJECTED and ressources release
Date: Thu, 21 Jun 2012 08:11:47 +0200 [thread overview]
Message-ID: <1340259107.2288.7.camel@dworkin.quest-ce.net> (raw)
In-Reply-To: <CAFRond5aFKD1orfM=3wdDkkHq47b8BkY2RiidMLJDTy014gdLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Le mercredi 20 juin 2012 à 21:27 -0400, Veerendra Allada a écrit :
> Is it possible to delay the memory registrations (ibv_reg_mr) and the
> ibv_post_recv()'s until the connection is established ? Based on what
> i understood, i am suggesting the following sequence of calls on
> Client and Server. See if it helps.
>
> Client
> rdma_create_event_channel()
> rdma_create_id()
> rdma_resolve_addr()
> ibv_alloc_pd()
> ibv_create_comp_channel()
> ibv_create_cq()
> rdma_create_qp()
> rdma_resolve_route()
> rdma_connect()
>
> If the connection is not successful, call the corresponding destroy
> calls in the the reverse order.
> If the connection is successful, register memory and post the receive
> calls.
>
> Server
> rdma_create_event_channel()
> rdma_create_id()
> rdma_bind_addr()
> rdma_listen()
>
> Up on a new incoming connection request, do the following sequence.
>
> ibv_alloc_pd()
> ibv_create_comp_channel()
> ibv_create_cq()
> rdma_create_qp()
> rdma_accept()
>
> After the connection is successful, register memory and then post
> receive requests.
> At this point you should be able to post ibv_post_send requests and
> poll your completion queue's, etc.
>
Thanks for your answer, but it's not applicable on my case:
I have to post receive works before doing rdma_accept()/rdma_connect()
so that both side are ready to receive messages sent by other peer.
Not doing so will lead to races, RNR errors will be triggered on the
sending side if it's faster than the receiving side.
If the protocol implemented above the RDMA connection is
request/response based and initiated by the client, the client could
follow your proposed scheme, but on the server side, it will have to
post receive works before calling rdma_accept().
Regards.
--
Yann Droneaud
OPTEYA
--
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
next prev parent reply other threads:[~2012-06-21 6:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 14:19 RDMA_CM_EVENT_REJECTED and ressources release Yann Droneaud
[not found] ` <CAFRond5aFKD1orfM=3wdDkkHq47b8BkY2RiidMLJDTy014gdLQ@mail.gmail.com>
[not found] ` <CAFRond5aFKD1orfM=3wdDkkHq47b8BkY2RiidMLJDTy014gdLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-21 6:11 ` Yann Droneaud [this message]
[not found] ` <1340201995.2468.24.camel-sQn2kEGNn0pFevvuwOF9vF6hYfS7NtTn@public.gmane.org>
2012-06-21 16:04 ` Hefty, Sean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340259107.2288.7.camel@dworkin.quest-ce.net \
--to=ydroneaud-rly5vtjfyj3qt0dzr+alfa@public.gmane.org \
--cc=allada.v-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox