2 * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved.
3 * Copyright (c) 2004 Infinicon Corporation. All rights reserved.
4 * Copyright (c) 2004 Intel Corporation. All rights reserved.
5 * Copyright (c) 2004 Topspin Corporation. All rights reserved.
6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved.
7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
8 * Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved.
10 * This software is available to you under a choice of one of two
11 * licenses. You may choose to be licensed under the terms of the GNU
12 * General Public License (GPL) Version 2, available from the file
13 * COPYING in the main directory of this source tree, or the
14 * OpenIB.org BSD license below:
16 * Redistribution and use in source and binary forms, with or
17 * without modification, are permitted provided that the following
20 * - Redistributions of source code must retain the above
21 * copyright notice, this list of conditions and the following
24 * - Redistributions in binary form must reproduce the above
25 * copyright notice, this list of conditions and the following
26 * disclaimer in the documentation and/or other materials
27 * provided with the distribution.
29 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
33 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
34 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
35 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39 #ifndef IB_VERBS_EXP_H
40 #define IB_VERBS_EXP_H
42 #include <rdma/ib_verbs.h>
45 enum ib_exp_device_cap_flags2 {
46 IB_EXP_DEVICE_DC_TRANSPORT = 1 << 0,
47 IB_EXP_DEVICE_QPG = 1 << 1,
48 IB_EXP_DEVICE_UD_RSS = 1 << 2,
49 IB_EXP_DEVICE_UD_TSS = 1 << 3
52 enum ib_exp_device_attr_comp_mask {
53 IB_EXP_DEVICE_ATTR_WITH_TIMESTAMP_MASK = 1ULL << 1,
54 IB_EXP_DEVICE_ATTR_WITH_HCA_CORE_CLOCK = 1ULL << 2,
55 IB_EXP_DEVICE_ATTR_CAP_FLAGS2 = 1ULL << 3,
56 IB_EXP_DEVICE_ATTR_DC_REQ_RD = 1ULL << 4,
57 IB_EXP_DEVICE_ATTR_DC_RES_RD = 1ULL << 5,
58 IB_EXP_DEVICE_ATTR_INLINE_RECV_SZ = 1ULL << 6,
59 IB_EXP_DEVICE_ATTR_RSS_TBL_SZ = 1ULL << 7,
62 struct ib_exp_device_attr {
63 struct ib_device_attr base;
64 /* Use IB_EXP_DEVICE_ATTR_... for exp_comp_mask */
65 uint32_t exp_comp_mask;
66 uint64_t device_cap_flags2;
69 uint32_t inline_recv_sz;
70 uint32_t max_rss_tbl_sz;
73 struct ib_exp_qp_init_attr {
74 void (*event_handler)(struct ib_event *, void *);
76 struct ib_cq *send_cq;
77 struct ib_cq *recv_cq;
79 struct ib_xrcd *xrcd; /* XRC TGT QPs only */
82 struct ib_qp *qpg_parent; /* see qpg_type */
83 struct ib_qpg_init_attrib parent_attrib;
85 enum ib_sig_type sq_sig_type;
86 enum ib_qp_type qp_type;
87 enum ib_qp_create_flags create_flags;
88 enum ib_qpg_type qpg_type;
89 u8 port_num; /* special QP types only */
94 int ib_exp_query_device(struct ib_device *device,
95 struct ib_exp_device_attr *device_attr);
100 #endif /* IB_VERBS_EXP_H */