As far as I understand, IBV_CREATE_QP() and RDMA_CREATE_QP literally do the same thing. If I have called ibv_create_qp() first, do I still need to call the other one when I'm establishing a connection using ibrdmacm API?
Moreover, diff b/w create QP and EP?
ibv_create_qp() and rdma_create_qp() are almost the same thing. ibv_create_qp() returns a pointer to the created queue pair, rdma_create_qp() assigns the created queue pair to id->qp.
There are the Infiniband Verbs, IBV, and the RDMA verbs. RDMA verbs have equivalents for many of the Infiniband Verbs. With Infiniband verbs, you have a bunch of individual pointers to maintain, the queue pair pointer, pointers to the completion queues, pointer to the protection domain, etc. With the RDMA verbs, these are all collected under the id structure. Look at /usr/include/rdma/rdma_cma.h, struct rdma_cm_id {}.
You can still use ibv_create_qp() in an RDMA verbs environment, but you need to make sure that you populate the RDMA id->qp with the returned queue pair, if you want to do any further operations with the RDMA verbs or RDMA Connection Manager.
rdma_create_ep, RDMA Create End Point, collapses a handful of RDMA calls, into one call. These include rdma_create_id(), rdma_create_qp(), rdma_resolve_addr(), and rdma_resolve_route().