what to change in ibverbs when switching from UD to RC connections

112 views Asked by At

I'm looking at a ibverbs code from Mellanox.
With a send/recv operation via ibverbs.
The code is using UD connections.
But it didnt work when I change
qp_type = IBV_QPT_UD to IBV_QPT_RC

What do I need to change in this case other then the qp_type?

The code can be found here in the repo
https://github.com/alokprasad/books-src/tree/master/rdma-src-mellanox
under basic_send and basic_recv

1

There are 1 answers

0
WhoAmIWhereAmIWhatIAmDoing On

RC connection requires a connected channel.
In this case, should use a RDMA CM to establish a rdma channel, then RC can be used.
In this example, the communication is using UD because there was not a "handshake" between host and client. And UD packages can be dropped by the host due to all sorts of reasons, and thus the name "unreliable datagram".