mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
c8f6a362bf
Extend rdma_cm to support multicast communication. Multicast support is added to the existing RDMA_PS_UDP port space, as well as a new RDMA_PS_IPOIB port space. The latter port space allows joining the multicast groups used by IPoIB, which enables offloading IPoIB traffic to a separate QP. The port space determines the signature used in the MGID when joining the group. The newly added RDMA_PS_IPOIB also allows for unicast operations, similar to RDMA_PS_UDP. Supporting the RDMA_PS_IPOIB requires changing how UD QPs are initialized, since we can no longer assume that the qkey is constant. This requires saving the Q_Key to use when attaching to a device, so that it is available when creating the QP. The Q_Key information is exported to the user through the existing rdma_init_qp_attr() interface. Multicast support is also exported to userspace through the rdma_ucm. Signed-off-by: Roland Dreier <rolandd@cisco.com>
51 lines
1.7 KiB
C
51 lines
1.7 KiB
C
/*
|
|
* Copyright (c) 2006 Intel Corporation. All rights reserved.
|
|
*
|
|
* This Software is licensed under one of the following licenses:
|
|
*
|
|
* 1) under the terms of the "Common Public License 1.0" a copy of which is
|
|
* available from the Open Source Initiative, see
|
|
* http://www.opensource.org/licenses/cpl.php.
|
|
*
|
|
* 2) under the terms of the "The BSD License" a copy of which is
|
|
* available from the Open Source Initiative, see
|
|
* http://www.opensource.org/licenses/bsd-license.php.
|
|
*
|
|
* 3) under the terms of the "GNU General Public License (GPL) Version 2" a
|
|
* copy of which is available from the Open Source Initiative, see
|
|
* http://www.opensource.org/licenses/gpl-license.php.
|
|
*
|
|
* Licensee has the right to choose one of the above licenses.
|
|
*
|
|
* Redistributions of source code must retain the above copyright
|
|
* notice and one of the license notices.
|
|
*
|
|
* Redistributions in binary form must reproduce both the above copyright
|
|
* notice, one of the license notices in the documentation
|
|
* and/or other materials provided with the distribution.
|
|
*
|
|
*/
|
|
|
|
#if !defined(RDMA_CM_IB_H)
|
|
#define RDMA_CM_IB_H
|
|
|
|
#include <rdma/rdma_cm.h>
|
|
|
|
/**
|
|
* rdma_set_ib_paths - Manually sets the path records used to establish a
|
|
* connection.
|
|
* @id: Connection identifier associated with the request.
|
|
* @path_rec: Reference to the path record
|
|
*
|
|
* This call permits a user to specify routing information for rdma_cm_id's
|
|
* bound to Infiniband devices. It is called on the client side of a
|
|
* connection and replaces the call to rdma_resolve_route.
|
|
*/
|
|
int rdma_set_ib_paths(struct rdma_cm_id *id,
|
|
struct ib_sa_path_rec *path_rec, int num_paths);
|
|
|
|
/* Global qkey for UDP QPs and multicast groups. */
|
|
#define RDMA_UDP_QKEY 0x01234567
|
|
|
|
#endif /* RDMA_CM_IB_H */
|