Skip to contentSkip to conversation

Setting service level for a QP with ibv_modify_qp and RDMA_CM

DISCUSSION Christian Mohrbacher 2 participants 2 messages Aug 14, 2012 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

Hi,
we are trying to set the service level for a QP with ibv_modify_qp, but ibv_modify_qp() returns an error (errno = EINVAL).

We are using RDMA CM and use rdma_create_qp() to allocate the queue pair. After some searching in the net we found posts, which indicate that ibv_modify_qp() cannot be used to set the service level, if you are using RDMA CM. Can anybody confirm or negate this assumption and are there alternatives?

Best regards,
Christian

---

Christian Mohrbacher
Fraunhofer HPC
FhGFS Team
http://www.fhgfs.com

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive
Quoted 8 lines

we are trying to set the service level for a QP with ibv_modify_qp, but ibv_modify_qp() returns an error (errno = EINVAL).

We are using RDMA CM and use rdma_create_qp() to allocate the queue pair. After some searching in the net we found posts, which indicate that ibv_modify_qp() cannot be used to set the service level, if you are using RDMA CM. Can anybody confirm or negate this assumption and are there alternatives?

If you're using the rdmacm, you should avoid calling ibv_modify_qp directly. The library will call it on your behalf. The service level will be set automatically when the required path record is obtained. You have a couple of options for controlling this.

An IP address is mapped to an IB GID and PKey. You can assign different service levels based on different PKeys.

Quality/type of service can also be set by calling rdma_set_option, using RDMA_OPTION_ID_TOS. This value ends up being used in a path record query to the SA.

In both cases, the SA must be configured with the QoS values.

- Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html