diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-09 20:04:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-09 20:04:33 -0400 |
| commit | b9044ac8292fc94bee33f6f08acaed3ac55f0c75 (patch) | |
| tree | 40dce5392f6392984311ec1e083ce29b5186ce8b /include/uapi | |
| parent | 1fde76f173e4d9aa205432c2ed5eff978d00deee (diff) | |
| parent | 2937f375751922ffce9ef1d5fa84491840b0c8e0 (diff) | |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Pull main rdma updates from Doug Ledford:
"This is the main pull request for the rdma stack this release. The
code has been through 0day and I had it tagged for linux-next testing
for a couple days.
Summary:
- updates to mlx5
- updates to mlx4 (two conflicts, both minor and easily resolved)
- updates to iw_cxgb4 (one conflict, not so obvious to resolve,
proper resolution is to keep the code in cxgb4_main.c as it is in
Linus' tree as attach_uld was refactored and moved into
cxgb4_uld.c)
- improvements to uAPI (moved vendor specific API elements to uAPI
area)
- add hns-roce driver and hns and hns-roce ACPI reset support
- conversion of all rdma code away from deprecated
create_singlethread_workqueue
- security improvement: remove unsafe ib_get_dma_mr (breaks lustre in
staging)"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (75 commits)
staging/lustre: Disable InfiniBand support
iw_cxgb4: add fast-path for small REG_MR operations
cxgb4: advertise support for FR_NSMR_TPTE_WR
IB/core: correctly handle rdma_rw_init_mrs() failure
IB/srp: Fix infinite loop when FMR sg[0].offset != 0
IB/srp: Remove an unused argument
IB/core: Improve ib_map_mr_sg() documentation
IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets
IB/mthca: Move user vendor structures
IB/nes: Move user vendor structures
IB/ocrdma: Move user vendor structures
IB/mlx4: Move user vendor structures
IB/cxgb4: Move user vendor structures
IB/cxgb3: Move user vendor structures
IB/mlx5: Move and decouple user vendor structures
IB/{core,hw}: Add constant for node_desc
ipoib: Make ipoib_warn ratelimited
IB/mlx4/alias_GUID: Remove deprecated create_singlethread_workqueue
IB/ipoib_verbs: Remove deprecated create_singlethread_workqueue
IB/ipoib: Remove deprecated create_singlethread_workqueue
...
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/rdma/Kbuild | 7 | ||||
| -rw-r--r-- | include/uapi/rdma/cxgb3-abi.h | 76 | ||||
| -rw-r--r-- | include/uapi/rdma/cxgb4-abi.h | 81 | ||||
| -rw-r--r-- | include/uapi/rdma/ib_user_verbs.h | 27 | ||||
| -rw-r--r-- | include/uapi/rdma/mlx4-abi.h | 107 | ||||
| -rw-r--r-- | include/uapi/rdma/mlx5-abi.h | 249 | ||||
| -rw-r--r-- | include/uapi/rdma/mthca-abi.h | 111 | ||||
| -rw-r--r-- | include/uapi/rdma/nes-abi.h | 114 | ||||
| -rw-r--r-- | include/uapi/rdma/ocrdma-abi.h | 151 |
9 files changed, 921 insertions, 2 deletions
diff --git a/include/uapi/rdma/Kbuild b/include/uapi/rdma/Kbuild index 4edb0f2b4f9f..f14ab7ff5fee 100644 --- a/include/uapi/rdma/Kbuild +++ b/include/uapi/rdma/Kbuild | |||
| @@ -7,3 +7,10 @@ header-y += rdma_netlink.h | |||
| 7 | header-y += rdma_user_cm.h | 7 | header-y += rdma_user_cm.h |
| 8 | header-y += hfi/ | 8 | header-y += hfi/ |
| 9 | header-y += rdma_user_rxe.h | 9 | header-y += rdma_user_rxe.h |
| 10 | header-y += cxgb3-abi.h | ||
| 11 | header-y += cxgb4-abi.h | ||
| 12 | header-y += mlx4-abi.h | ||
| 13 | header-y += mlx5-abi.h | ||
| 14 | header-y += mthca-abi.h | ||
| 15 | header-y += nes-abi.h | ||
| 16 | header-y += ocrdma-abi.h | ||
diff --git a/include/uapi/rdma/cxgb3-abi.h b/include/uapi/rdma/cxgb3-abi.h new file mode 100644 index 000000000000..48a19bda071b --- /dev/null +++ b/include/uapi/rdma/cxgb3-abi.h | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2006 Chelsio, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * This software is available to you under a choice of one of two | ||
| 5 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 6 | * General Public License (GPL) Version 2, available from the file | ||
| 7 | * COPYING in the main directory of this source tree, or the | ||
| 8 | * OpenIB.org BSD license below: | ||
| 9 | * | ||
| 10 | * Redistribution and use in source and binary forms, with or | ||
| 11 | * without modification, are permitted provided that the following | ||
| 12 | * conditions are met: | ||
| 13 | * | ||
| 14 | * - Redistributions of source code must retain the above | ||
| 15 | * copyright notice, this list of conditions and the following | ||
| 16 | * disclaimer. | ||
| 17 | * | ||
| 18 | * - Redistributions in binary form must reproduce the above | ||
| 19 | * copyright notice, this list of conditions and the following | ||
| 20 | * disclaimer in the documentation and/or other materials | ||
| 21 | * provided with the distribution. | ||
| 22 | * | ||
| 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 26 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 27 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 28 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 30 | * SOFTWARE. | ||
| 31 | */ | ||
| 32 | #ifndef CXGB3_ABI_USER_H | ||
| 33 | #define CXBG3_ABI_USER_H | ||
| 34 | |||
| 35 | #include <linux/types.h> | ||
| 36 | |||
| 37 | #define IWCH_UVERBS_ABI_VERSION 1 | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Make sure that all structs defined in this file remain laid out so | ||
| 41 | * that they pack the same way on 32-bit and 64-bit architectures (to | ||
| 42 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). | ||
| 43 | * In particular do not use pointer types -- pass pointers in __u64 | ||
| 44 | * instead. | ||
| 45 | */ | ||
| 46 | struct iwch_create_cq_req { | ||
| 47 | __u64 user_rptr_addr; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct iwch_create_cq_resp_v0 { | ||
| 51 | __u64 key; | ||
| 52 | __u32 cqid; | ||
| 53 | __u32 size_log2; | ||
| 54 | }; | ||
| 55 | |||
| 56 | struct iwch_create_cq_resp { | ||
| 57 | __u64 key; | ||
| 58 | __u32 cqid; | ||
| 59 | __u32 size_log2; | ||
| 60 | __u32 memsize; | ||
| 61 | __u32 reserved; | ||
| 62 | }; | ||
| 63 | |||
| 64 | struct iwch_create_qp_resp { | ||
| 65 | __u64 key; | ||
| 66 | __u64 db_key; | ||
| 67 | __u32 qpid; | ||
| 68 | __u32 size_log2; | ||
| 69 | __u32 sq_size_log2; | ||
| 70 | __u32 rq_size_log2; | ||
| 71 | }; | ||
| 72 | |||
| 73 | struct iwch_reg_user_mr_resp { | ||
| 74 | __u32 pbl_addr; | ||
| 75 | }; | ||
| 76 | #endif /* CXGB3_ABI_USER_H */ | ||
diff --git a/include/uapi/rdma/cxgb4-abi.h b/include/uapi/rdma/cxgb4-abi.h new file mode 100644 index 000000000000..472b15990894 --- /dev/null +++ b/include/uapi/rdma/cxgb4-abi.h | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * This software is available to you under a choice of one of two | ||
| 5 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 6 | * General Public License (GPL) Version 2, available from the file | ||
| 7 | * COPYING in the main directory of this source tree, or the | ||
| 8 | * OpenIB.org BSD license below: | ||
| 9 | * | ||
| 10 | * Redistribution and use in source and binary forms, with or | ||
| 11 | * without modification, are permitted provided that the following | ||
| 12 | * conditions are met: | ||
| 13 | * | ||
| 14 | * - Redistributions of source code must retain the above | ||
| 15 | * copyright notice, this list of conditions and the following | ||
| 16 | * disclaimer. | ||
| 17 | * | ||
| 18 | * - Redistributions in binary form must reproduce the above | ||
| 19 | * copyright notice, this list of conditions and the following | ||
| 20 | * disclaimer in the documentation and/or other materials | ||
| 21 | * provided with the distribution. | ||
| 22 | * | ||
| 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 26 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 27 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 28 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 30 | * SOFTWARE. | ||
| 31 | */ | ||
| 32 | #ifndef CXGB4_ABI_USER_H | ||
| 33 | #define CXGB4_ABI_USER_H | ||
| 34 | |||
| 35 | #include <linux/types.h> | ||
| 36 | |||
| 37 | #define C4IW_UVERBS_ABI_VERSION 3 | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Make sure that all structs defined in this file remain laid out so | ||
| 41 | * that they pack the same way on 32-bit and 64-bit architectures (to | ||
| 42 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). | ||
| 43 | * In particular do not use pointer types -- pass pointers in __u64 | ||
| 44 | * instead. | ||
| 45 | */ | ||
| 46 | struct c4iw_create_cq_resp { | ||
| 47 | __u64 key; | ||
| 48 | __u64 gts_key; | ||
| 49 | __u64 memsize; | ||
| 50 | __u32 cqid; | ||
| 51 | __u32 size; | ||
| 52 | __u32 qid_mask; | ||
| 53 | __u32 reserved; /* explicit padding (optional for i386) */ | ||
| 54 | }; | ||
| 55 | |||
| 56 | enum { | ||
| 57 | C4IW_QPF_ONCHIP = (1 << 0) | ||
| 58 | }; | ||
| 59 | |||
| 60 | struct c4iw_create_qp_resp { | ||
| 61 | __u64 ma_sync_key; | ||
| 62 | __u64 sq_key; | ||
| 63 | __u64 rq_key; | ||
| 64 | __u64 sq_db_gts_key; | ||
| 65 | __u64 rq_db_gts_key; | ||
| 66 | __u64 sq_memsize; | ||
| 67 | __u64 rq_memsize; | ||
| 68 | __u32 sqid; | ||
| 69 | __u32 rqid; | ||
| 70 | __u32 sq_size; | ||
| 71 | __u32 rq_size; | ||
| 72 | __u32 qid_mask; | ||
| 73 | __u32 flags; | ||
| 74 | }; | ||
| 75 | |||
| 76 | struct c4iw_alloc_ucontext_resp { | ||
| 77 | __u64 status_page_key; | ||
| 78 | __u32 status_page_size; | ||
| 79 | __u32 reserved; /* explicit padding (optional for i386) */ | ||
| 80 | }; | ||
| 81 | #endif /* CXGB4_ABI_USER_H */ | ||
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index 7f035f4b53b0..25225ebbc7d5 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h | |||
| @@ -224,6 +224,17 @@ struct ib_uverbs_odp_caps { | |||
| 224 | __u32 reserved; | 224 | __u32 reserved; |
| 225 | }; | 225 | }; |
| 226 | 226 | ||
| 227 | struct ib_uverbs_rss_caps { | ||
| 228 | /* Corresponding bit will be set if qp type from | ||
| 229 | * 'enum ib_qp_type' is supported, e.g. | ||
| 230 | * supported_qpts |= 1 << IB_QPT_UD | ||
| 231 | */ | ||
| 232 | __u32 supported_qpts; | ||
| 233 | __u32 max_rwq_indirection_tables; | ||
| 234 | __u32 max_rwq_indirection_table_size; | ||
| 235 | __u32 reserved; | ||
| 236 | }; | ||
| 237 | |||
| 227 | struct ib_uverbs_ex_query_device_resp { | 238 | struct ib_uverbs_ex_query_device_resp { |
| 228 | struct ib_uverbs_query_device_resp base; | 239 | struct ib_uverbs_query_device_resp base; |
| 229 | __u32 comp_mask; | 240 | __u32 comp_mask; |
| @@ -232,6 +243,9 @@ struct ib_uverbs_ex_query_device_resp { | |||
| 232 | __u64 timestamp_mask; | 243 | __u64 timestamp_mask; |
| 233 | __u64 hca_core_clock; /* in KHZ */ | 244 | __u64 hca_core_clock; /* in KHZ */ |
| 234 | __u64 device_cap_flags_ex; | 245 | __u64 device_cap_flags_ex; |
| 246 | struct ib_uverbs_rss_caps rss_caps; | ||
| 247 | __u32 max_wq_type_rq; | ||
| 248 | __u32 reserved; | ||
| 235 | }; | 249 | }; |
| 236 | 250 | ||
| 237 | struct ib_uverbs_query_port { | 251 | struct ib_uverbs_query_port { |
| @@ -834,6 +848,10 @@ struct ib_uverbs_flow_spec_eth { | |||
| 834 | struct ib_uverbs_flow_ipv4_filter { | 848 | struct ib_uverbs_flow_ipv4_filter { |
| 835 | __be32 src_ip; | 849 | __be32 src_ip; |
| 836 | __be32 dst_ip; | 850 | __be32 dst_ip; |
| 851 | __u8 proto; | ||
| 852 | __u8 tos; | ||
| 853 | __u8 ttl; | ||
| 854 | __u8 flags; | ||
| 837 | }; | 855 | }; |
| 838 | 856 | ||
| 839 | struct ib_uverbs_flow_spec_ipv4 { | 857 | struct ib_uverbs_flow_spec_ipv4 { |
| @@ -868,8 +886,13 @@ struct ib_uverbs_flow_spec_tcp_udp { | |||
| 868 | }; | 886 | }; |
| 869 | 887 | ||
| 870 | struct ib_uverbs_flow_ipv6_filter { | 888 | struct ib_uverbs_flow_ipv6_filter { |
| 871 | __u8 src_ip[16]; | 889 | __u8 src_ip[16]; |
| 872 | __u8 dst_ip[16]; | 890 | __u8 dst_ip[16]; |
| 891 | __be32 flow_label; | ||
| 892 | __u8 next_hdr; | ||
| 893 | __u8 traffic_class; | ||
| 894 | __u8 hop_limit; | ||
| 895 | __u8 reserved; | ||
| 873 | }; | 896 | }; |
| 874 | 897 | ||
| 875 | struct ib_uverbs_flow_spec_ipv6 { | 898 | struct ib_uverbs_flow_spec_ipv6 { |
diff --git a/include/uapi/rdma/mlx4-abi.h b/include/uapi/rdma/mlx4-abi.h new file mode 100644 index 000000000000..af431752655c --- /dev/null +++ b/include/uapi/rdma/mlx4-abi.h | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. | ||
| 3 | * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. | ||
| 4 | * | ||
| 5 | * This software is available to you under a choice of one of two | ||
| 6 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 7 | * General Public License (GPL) Version 2, available from the file | ||
| 8 | * COPYING in the main directory of this source tree, or the | ||
| 9 | * OpenIB.org BSD license below: | ||
| 10 | * | ||
| 11 | * Redistribution and use in source and binary forms, with or | ||
| 12 | * without modification, are permitted provided that the following | ||
| 13 | * conditions are met: | ||
| 14 | * | ||
| 15 | * - Redistributions of source code must retain the above | ||
| 16 | * copyright notice, this list of conditions and the following | ||
| 17 | * disclaimer. | ||
| 18 | * | ||
| 19 | * - Redistributions in binary form must reproduce the above | ||
| 20 | * copyright notice, this list of conditions and the following | ||
| 21 | * disclaimer in the documentation and/or other materials | ||
| 22 | * provided with the distribution. | ||
| 23 | * | ||
| 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 28 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 29 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 30 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 31 | * SOFTWARE. | ||
| 32 | */ | ||
| 33 | |||
| 34 | #ifndef MLX4_ABI_USER_H | ||
| 35 | #define MLX4_ABI_USER_H | ||
| 36 | |||
| 37 | #include <linux/types.h> | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Increment this value if any changes that break userspace ABI | ||
| 41 | * compatibility are made. | ||
| 42 | */ | ||
| 43 | |||
| 44 | #define MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION 3 | ||
| 45 | #define MLX4_IB_UVERBS_ABI_VERSION 4 | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Make sure that all structs defined in this file remain laid out so | ||
| 49 | * that they pack the same way on 32-bit and 64-bit architectures (to | ||
| 50 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). | ||
| 51 | * In particular do not use pointer types -- pass pointers in __u64 | ||
| 52 | * instead. | ||
| 53 | */ | ||
| 54 | |||
| 55 | struct mlx4_ib_alloc_ucontext_resp_v3 { | ||
| 56 | __u32 qp_tab_size; | ||
| 57 | __u16 bf_reg_size; | ||
| 58 | __u16 bf_regs_per_page; | ||
| 59 | }; | ||
| 60 | |||
| 61 | struct mlx4_ib_alloc_ucontext_resp { | ||
| 62 | __u32 dev_caps; | ||
| 63 | __u32 qp_tab_size; | ||
| 64 | __u16 bf_reg_size; | ||
| 65 | __u16 bf_regs_per_page; | ||
| 66 | __u32 cqe_size; | ||
| 67 | }; | ||
| 68 | |||
| 69 | struct mlx4_ib_alloc_pd_resp { | ||
| 70 | __u32 pdn; | ||
| 71 | __u32 reserved; | ||
| 72 | }; | ||
| 73 | |||
| 74 | struct mlx4_ib_create_cq { | ||
| 75 | __u64 buf_addr; | ||
| 76 | __u64 db_addr; | ||
| 77 | }; | ||
| 78 | |||
| 79 | struct mlx4_ib_create_cq_resp { | ||
| 80 | __u32 cqn; | ||
| 81 | __u32 reserved; | ||
| 82 | }; | ||
| 83 | |||
| 84 | struct mlx4_ib_resize_cq { | ||
| 85 | __u64 buf_addr; | ||
| 86 | }; | ||
| 87 | |||
| 88 | struct mlx4_ib_create_srq { | ||
| 89 | __u64 buf_addr; | ||
| 90 | __u64 db_addr; | ||
| 91 | }; | ||
| 92 | |||
| 93 | struct mlx4_ib_create_srq_resp { | ||
| 94 | __u32 srqn; | ||
| 95 | __u32 reserved; | ||
| 96 | }; | ||
| 97 | |||
| 98 | struct mlx4_ib_create_qp { | ||
| 99 | __u64 buf_addr; | ||
| 100 | __u64 db_addr; | ||
| 101 | __u8 log_sq_bb_count; | ||
| 102 | __u8 log_sq_stride; | ||
| 103 | __u8 sq_no_prefetch; | ||
| 104 | __u8 reserved[5]; | ||
| 105 | }; | ||
| 106 | |||
| 107 | #endif /* MLX4_ABI_USER_H */ | ||
diff --git a/include/uapi/rdma/mlx5-abi.h b/include/uapi/rdma/mlx5-abi.h new file mode 100644 index 000000000000..f5d0f4e83b59 --- /dev/null +++ b/include/uapi/rdma/mlx5-abi.h | |||
| @@ -0,0 +1,249 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved. | ||
| 3 | * | ||
| 4 | * This software is available to you under a choice of one of two | ||
| 5 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 6 | * General Public License (GPL) Version 2, available from the file | ||
| 7 | * COPYING in the main directory of this source tree, or the | ||
| 8 | * OpenIB.org BSD license below: | ||
| 9 | * | ||
| 10 | * Redistribution and use in source and binary forms, with or | ||
| 11 | * without modification, are permitted provided that the following | ||
| 12 | * conditions are met: | ||
| 13 | * | ||
| 14 | * - Redistributions of source code must retain the above | ||
| 15 | * copyright notice, this list of conditions and the following | ||
| 16 | * disclaimer. | ||
| 17 | * | ||
| 18 | * - Redistributions in binary form must reproduce the above | ||
| 19 | * copyright notice, this list of conditions and the following | ||
| 20 | * disclaimer in the documentation and/or other materials | ||
| 21 | * provided with the distribution. | ||
| 22 | * | ||
| 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 26 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 27 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 28 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 30 | * SOFTWARE. | ||
| 31 | */ | ||
| 32 | |||
| 33 | #ifndef MLX5_ABI_USER_H | ||
| 34 | #define MLX5_ABI_USER_H | ||
| 35 | |||
| 36 | #include <linux/types.h> | ||
| 37 | |||
| 38 | enum { | ||
| 39 | MLX5_QP_FLAG_SIGNATURE = 1 << 0, | ||
| 40 | MLX5_QP_FLAG_SCATTER_CQE = 1 << 1, | ||
| 41 | }; | ||
| 42 | |||
| 43 | enum { | ||
| 44 | MLX5_SRQ_FLAG_SIGNATURE = 1 << 0, | ||
| 45 | }; | ||
| 46 | |||
| 47 | enum { | ||
| 48 | MLX5_WQ_FLAG_SIGNATURE = 1 << 0, | ||
| 49 | }; | ||
| 50 | |||
| 51 | /* Increment this value if any changes that break userspace ABI | ||
| 52 | * compatibility are made. | ||
| 53 | */ | ||
| 54 | #define MLX5_IB_UVERBS_ABI_VERSION 1 | ||
| 55 | |||
| 56 | /* Make sure that all structs defined in this file remain laid out so | ||
| 57 | * that they pack the same way on 32-bit and 64-bit architectures (to | ||
| 58 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). | ||
| 59 | * In particular do not use pointer types -- pass pointers in __u64 | ||
| 60 | * instead. | ||
| 61 | */ | ||
| 62 | |||
| 63 | struct mlx5_ib_alloc_ucontext_req { | ||
| 64 | __u32 total_num_uuars; | ||
| 65 | __u32 num_low_latency_uuars; | ||
| 66 | }; | ||
| 67 | |||
| 68 | struct mlx5_ib_alloc_ucontext_req_v2 { | ||
| 69 | __u32 total_num_uuars; | ||
| 70 | __u32 num_low_latency_uuars; | ||
| 71 | __u32 flags; | ||
| 72 | __u32 comp_mask; | ||
| 73 | __u8 max_cqe_version; | ||
| 74 | __u8 reserved0; | ||
| 75 | __u16 reserved1; | ||
| 76 | __u32 reserved2; | ||
| 77 | }; | ||
| 78 | |||
| 79 | enum mlx5_ib_alloc_ucontext_resp_mask { | ||
| 80 | MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0, | ||
| 81 | }; | ||
| 82 | |||
| 83 | enum mlx5_user_cmds_supp_uhw { | ||
| 84 | MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0, | ||
| 85 | }; | ||
| 86 | |||
| 87 | struct mlx5_ib_alloc_ucontext_resp { | ||
| 88 | __u32 qp_tab_size; | ||
| 89 | __u32 bf_reg_size; | ||
| 90 | __u32 tot_uuars; | ||
| 91 | __u32 cache_line_size; | ||
| 92 | __u16 max_sq_desc_sz; | ||
| 93 | __u16 max_rq_desc_sz; | ||
| 94 | __u32 max_send_wqebb; | ||
| 95 | __u32 max_recv_wr; | ||
| 96 | __u32 max_srq_recv_wr; | ||
| 97 | __u16 num_ports; | ||
| 98 | __u16 reserved1; | ||
| 99 | __u32 comp_mask; | ||
| 100 | __u32 response_length; | ||
| 101 | __u8 cqe_version; | ||
| 102 | __u8 cmds_supp_uhw; | ||
| 103 | __u16 reserved2; | ||
| 104 | __u64 hca_core_clock_offset; | ||
| 105 | }; | ||
| 106 | |||
| 107 | struct mlx5_ib_alloc_pd_resp { | ||
| 108 | __u32 pdn; | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct mlx5_ib_tso_caps { | ||
| 112 | __u32 max_tso; /* Maximum tso payload size in bytes */ | ||
| 113 | |||
| 114 | /* Corresponding bit will be set if qp type from | ||
| 115 | * 'enum ib_qp_type' is supported, e.g. | ||
| 116 | * supported_qpts |= 1 << IB_QPT_UD | ||
| 117 | */ | ||
| 118 | __u32 supported_qpts; | ||
| 119 | }; | ||
| 120 | |||
| 121 | struct mlx5_ib_rss_caps { | ||
| 122 | __u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ | ||
| 123 | __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ | ||
| 124 | __u8 reserved[7]; | ||
| 125 | }; | ||
| 126 | |||
| 127 | struct mlx5_ib_query_device_resp { | ||
| 128 | __u32 comp_mask; | ||
| 129 | __u32 response_length; | ||
| 130 | struct mlx5_ib_tso_caps tso_caps; | ||
| 131 | struct mlx5_ib_rss_caps rss_caps; | ||
| 132 | }; | ||
| 133 | |||
| 134 | struct mlx5_ib_create_cq { | ||
| 135 | __u64 buf_addr; | ||
| 136 | __u64 db_addr; | ||
| 137 | __u32 cqe_size; | ||
| 138 | __u32 reserved; /* explicit padding (optional on i386) */ | ||
| 139 | }; | ||
| 140 | |||
| 141 | struct mlx5_ib_create_cq_resp { | ||
| 142 | __u32 cqn; | ||
| 143 | __u32 reserved; | ||
| 144 | }; | ||
| 145 | |||
| 146 | struct mlx5_ib_resize_cq { | ||
| 147 | __u64 buf_addr; | ||
| 148 | __u16 cqe_size; | ||
| 149 | __u16 reserved0; | ||
| 150 | __u32 reserved1; | ||
| 151 | }; | ||
| 152 | |||
| 153 | struct mlx5_ib_create_srq { | ||
| 154 | __u64 buf_addr; | ||
| 155 | __u64 db_addr; | ||
| 156 | __u32 flags; | ||
| 157 | __u32 reserved0; /* explicit padding (optional on i386) */ | ||
| 158 | __u32 uidx; | ||
| 159 | __u32 reserved1; | ||
| 160 | }; | ||
| 161 | |||
| 162 | struct mlx5_ib_create_srq_resp { | ||
| 163 | __u32 srqn; | ||
| 164 | __u32 reserved; | ||
| 165 | }; | ||
| 166 | |||
| 167 | struct mlx5_ib_create_qp { | ||
| 168 | __u64 buf_addr; | ||
| 169 | __u64 db_addr; | ||
| 170 | __u32 sq_wqe_count; | ||
| 171 | __u32 rq_wqe_count; | ||
| 172 | __u32 rq_wqe_shift; | ||
| 173 | __u32 flags; | ||
| 174 | __u32 uidx; | ||
| 175 | __u32 reserved0; | ||
| 176 | __u64 sq_buf_addr; | ||
| 177 | }; | ||
| 178 | |||
| 179 | /* RX Hash function flags */ | ||
| 180 | enum mlx5_rx_hash_function_flags { | ||
| 181 | MLX5_RX_HASH_FUNC_TOEPLITZ = 1 << 0, | ||
| 182 | }; | ||
| 183 | |||
| 184 | /* | ||
| 185 | * RX Hash flags, these flags allows to set which incoming packet's field should | ||
| 186 | * participates in RX Hash. Each flag represent certain packet's field, | ||
| 187 | * when the flag is set the field that is represented by the flag will | ||
| 188 | * participate in RX Hash calculation. | ||
| 189 | * Note: *IPV4 and *IPV6 flags can't be enabled together on the same QP | ||
| 190 | * and *TCP and *UDP flags can't be enabled together on the same QP. | ||
| 191 | */ | ||
| 192 | enum mlx5_rx_hash_fields { | ||
| 193 | MLX5_RX_HASH_SRC_IPV4 = 1 << 0, | ||
| 194 | MLX5_RX_HASH_DST_IPV4 = 1 << 1, | ||
| 195 | MLX5_RX_HASH_SRC_IPV6 = 1 << 2, | ||
| 196 | MLX5_RX_HASH_DST_IPV6 = 1 << 3, | ||
| 197 | MLX5_RX_HASH_SRC_PORT_TCP = 1 << 4, | ||
| 198 | MLX5_RX_HASH_DST_PORT_TCP = 1 << 5, | ||
| 199 | MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6, | ||
| 200 | MLX5_RX_HASH_DST_PORT_UDP = 1 << 7 | ||
| 201 | }; | ||
| 202 | |||
| 203 | struct mlx5_ib_create_qp_rss { | ||
| 204 | __u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ | ||
| 205 | __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ | ||
| 206 | __u8 rx_key_len; /* valid only for Toeplitz */ | ||
| 207 | __u8 reserved[6]; | ||
| 208 | __u8 rx_hash_key[128]; /* valid only for Toeplitz */ | ||
| 209 | __u32 comp_mask; | ||
| 210 | __u32 reserved1; | ||
| 211 | }; | ||
| 212 | |||
| 213 | struct mlx5_ib_create_qp_resp { | ||
| 214 | __u32 uuar_index; | ||
| 215 | }; | ||
| 216 | |||
| 217 | struct mlx5_ib_alloc_mw { | ||
| 218 | __u32 comp_mask; | ||
| 219 | __u8 num_klms; | ||
| 220 | __u8 reserved1; | ||
| 221 | __u16 reserved2; | ||
| 222 | }; | ||
| 223 | |||
| 224 | struct mlx5_ib_create_wq { | ||
| 225 | __u64 buf_addr; | ||
| 226 | __u64 db_addr; | ||
| 227 | __u32 rq_wqe_count; | ||
| 228 | __u32 rq_wqe_shift; | ||
| 229 | __u32 user_index; | ||
| 230 | __u32 flags; | ||
| 231 | __u32 comp_mask; | ||
| 232 | __u32 reserved; | ||
| 233 | }; | ||
| 234 | |||
| 235 | struct mlx5_ib_create_wq_resp { | ||
| 236 | __u32 response_length; | ||
| 237 | __u32 reserved; | ||
| 238 | }; | ||
| 239 | |||
| 240 | struct mlx5_ib_create_rwq_ind_tbl_resp { | ||
| 241 | __u32 response_length; | ||
| 242 | __u32 reserved; | ||
| 243 | }; | ||
| 244 | |||
| 245 | struct mlx5_ib_modify_wq { | ||
| 246 | __u32 comp_mask; | ||
| 247 | __u32 reserved; | ||
| 248 | }; | ||
| 249 | #endif /* MLX5_ABI_USER_H */ | ||
diff --git a/include/uapi/rdma/mthca-abi.h b/include/uapi/rdma/mthca-abi.h new file mode 100644 index 000000000000..bcbf4ff2f6d1 --- /dev/null +++ b/include/uapi/rdma/mthca-abi.h | |||
| @@ -0,0 +1,111 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2005 Topspin Communications. All rights reserved. | ||
| 3 | * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. | ||
| 4 | * | ||
| 5 | * This software is available to you under a choice of one of two | ||
| 6 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 7 | * General Public License (GPL) Version 2, available from the file | ||
| 8 | * COPYING in the main directory of this source tree, or the | ||
| 9 | * OpenIB.org BSD license below: | ||
| 10 | * | ||
| 11 | * Redistribution and use in source and binary forms, with or | ||
| 12 | * without modification, are permitted provided that the following | ||
| 13 | * conditions are met: | ||
| 14 | * | ||
| 15 | * - Redistributions of source code must retain the above | ||
| 16 | * copyright notice, this list of conditions and the following | ||
| 17 | * disclaimer. | ||
| 18 | * | ||
| 19 | * - Redistributions in binary form must reproduce the above | ||
| 20 | * copyright notice, this list of conditions and the following | ||
| 21 | * disclaimer in the documentation and/or other materials | ||
| 22 | * provided with the distribution. | ||
| 23 | * | ||
| 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 28 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 29 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 30 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 31 | * SOFTWARE. | ||
| 32 | */ | ||
| 33 | |||
| 34 | #ifndef MTHCA_ABI_USER_H | ||
| 35 | #define MTHCA_ABI_USER_H | ||
| 36 | |||
| 37 | #include <linux/types.h> | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Increment this value if any changes that break userspace ABI | ||
| 41 | * compatibility are made. | ||
| 42 | */ | ||
| 43 | #define MTHCA_UVERBS_ABI_VERSION 1 | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Make sure that all structs defined in this file remain laid out so | ||
| 47 | * that they pack the same way on 32-bit and 64-bit architectures (to | ||
| 48 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). | ||
| 49 | * In particular do not use pointer types -- pass pointers in __u64 | ||
| 50 | * instead. | ||
| 51 | */ | ||
| 52 | struct mthca_alloc_ucontext_resp { | ||
| 53 | __u32 qp_tab_size; | ||
| 54 | __u32 uarc_size; | ||
| 55 | }; | ||
| 56 | |||
| 57 | struct mthca_alloc_pd_resp { | ||
| 58 | __u32 pdn; | ||
| 59 | __u32 reserved; | ||
| 60 | }; | ||
| 61 | |||
| 62 | /* | ||
| 63 | * Mark the memory region with a DMA attribute that causes | ||
| 64 | * in-flight DMA to be flushed when the region is written to: | ||
| 65 | */ | ||
| 66 | #define MTHCA_MR_DMASYNC 0x1 | ||
| 67 | |||
| 68 | struct mthca_reg_mr { | ||
| 69 | __u32 mr_attrs; | ||
| 70 | __u32 reserved; | ||
| 71 | }; | ||
| 72 | |||
| 73 | struct mthca_create_cq { | ||
| 74 | __u32 lkey; | ||
| 75 | __u32 pdn; | ||
| 76 | __u64 arm_db_page; | ||
| 77 | __u64 set_db_page; | ||
| 78 | __u32 arm_db_index; | ||
| 79 | __u32 set_db_index; | ||
| 80 | }; | ||
| 81 | |||
| 82 | struct mthca_create_cq_resp { | ||
| 83 | __u32 cqn; | ||
| 84 | __u32 reserved; | ||
| 85 | }; | ||
| 86 | |||
| 87 | struct mthca_resize_cq { | ||
| 88 | __u32 lkey; | ||
| 89 | __u32 reserved; | ||
| 90 | }; | ||
| 91 | |||
| 92 | struct mthca_create_srq { | ||
| 93 | __u32 lkey; | ||
| 94 | __u32 db_index; | ||
| 95 | __u64 db_page; | ||
| 96 | }; | ||
| 97 | |||
| 98 | struct mthca_create_srq_resp { | ||
| 99 | __u32 srqn; | ||
| 100 | __u32 reserved; | ||
| 101 | }; | ||
| 102 | |||
| 103 | struct mthca_create_qp { | ||
| 104 | __u32 lkey; | ||
| 105 | __u32 reserved; | ||
| 106 | __u64 sq_db_page; | ||
| 107 | __u64 rq_db_page; | ||
| 108 | __u32 sq_db_index; | ||
| 109 | __u32 rq_db_index; | ||
| 110 | }; | ||
| 111 | #endif /* MTHCA_ABI_USER_H */ | ||
diff --git a/include/uapi/rdma/nes-abi.h b/include/uapi/rdma/nes-abi.h new file mode 100644 index 000000000000..6eb3734394a2 --- /dev/null +++ b/include/uapi/rdma/nes-abi.h | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved. | ||
| 3 | * Copyright (c) 2005 Topspin Communications. All rights reserved. | ||
| 4 | * Copyright (c) 2005 Cisco Systems. All rights reserved. | ||
| 5 | * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. | ||
| 6 | * | ||
| 7 | * This software is available to you under a choice of one of two | ||
| 8 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 9 | * General Public License (GPL) Version 2, available from the file | ||
| 10 | * COPYING in the main directory of this source tree, or the | ||
| 11 | * OpenIB.org BSD license below: | ||
| 12 | * | ||
| 13 | * Redistribution and use in source and binary forms, with or | ||
| 14 | * without modification, are permitted provided that the following | ||
| 15 | * conditions are met: | ||
| 16 | * | ||
| 17 | * - Redistributions of source code must retain the above | ||
| 18 | * copyright notice, this list of conditions and the following | ||
| 19 | * disclaimer. | ||
| 20 | * | ||
| 21 | * - Redistributions in binary form must reproduce the above | ||
| 22 | * copyright notice, this list of conditions and the following | ||
| 23 | * disclaimer in the documentation and/or other materials | ||
| 24 | * provided with the distribution. | ||
| 25 | * | ||
| 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 27 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 29 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 30 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 31 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 32 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 33 | * SOFTWARE. | ||
| 34 | * | ||
| 35 | */ | ||
| 36 | |||
| 37 | #ifndef NES_ABI_USER_H | ||
| 38 | #define NES_ABI_USER_H | ||
| 39 | |||
| 40 | #include <linux/types.h> | ||
| 41 | |||
| 42 | #define NES_ABI_USERSPACE_VER 2 | ||
| 43 | #define NES_ABI_KERNEL_VER 2 | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Make sure that all structs defined in this file remain laid out so | ||
| 47 | * that they pack the same way on 32-bit and 64-bit architectures (to | ||
| 48 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). | ||
| 49 | * In particular do not use pointer types -- pass pointers in __u64 | ||
| 50 | * instead. | ||
| 51 | */ | ||
| 52 | |||
| 53 | struct nes_alloc_ucontext_req { | ||
| 54 | __u32 reserved32; | ||
| 55 | __u8 userspace_ver; | ||
| 56 | __u8 reserved8[3]; | ||
| 57 | }; | ||
| 58 | |||
| 59 | struct nes_alloc_ucontext_resp { | ||
| 60 | __u32 max_pds; /* maximum pds allowed for this user process */ | ||
| 61 | __u32 max_qps; /* maximum qps allowed for this user process */ | ||
| 62 | __u32 wq_size; /* size of the WQs (sq+rq) allocated to the mmaped area */ | ||
| 63 | __u8 virtwq; /* flag to indicate if virtual WQ are to be used or not */ | ||
| 64 | __u8 kernel_ver; | ||
| 65 | __u8 reserved[2]; | ||
| 66 | }; | ||
| 67 | |||
| 68 | struct nes_alloc_pd_resp { | ||
| 69 | __u32 pd_id; | ||
| 70 | __u32 mmap_db_index; | ||
| 71 | }; | ||
| 72 | |||
| 73 | struct nes_create_cq_req { | ||
| 74 | __u64 user_cq_buffer; | ||
| 75 | __u32 mcrqf; | ||
| 76 | __u8 reserved[4]; | ||
| 77 | }; | ||
| 78 | |||
| 79 | struct nes_create_qp_req { | ||
| 80 | __u64 user_wqe_buffers; | ||
| 81 | __u64 user_qp_buffer; | ||
| 82 | }; | ||
| 83 | |||
| 84 | enum iwnes_memreg_type { | ||
| 85 | IWNES_MEMREG_TYPE_MEM = 0x0000, | ||
| 86 | IWNES_MEMREG_TYPE_QP = 0x0001, | ||
| 87 | IWNES_MEMREG_TYPE_CQ = 0x0002, | ||
| 88 | IWNES_MEMREG_TYPE_MW = 0x0003, | ||
| 89 | IWNES_MEMREG_TYPE_FMR = 0x0004, | ||
| 90 | IWNES_MEMREG_TYPE_FMEM = 0x0005, | ||
| 91 | }; | ||
| 92 | |||
| 93 | struct nes_mem_reg_req { | ||
| 94 | __u32 reg_type; /* indicates if id is memory, QP or CQ */ | ||
| 95 | __u32 reserved; | ||
| 96 | }; | ||
| 97 | |||
| 98 | struct nes_create_cq_resp { | ||
| 99 | __u32 cq_id; | ||
| 100 | __u32 cq_size; | ||
| 101 | __u32 mmap_db_index; | ||
| 102 | __u32 reserved; | ||
| 103 | }; | ||
| 104 | |||
| 105 | struct nes_create_qp_resp { | ||
| 106 | __u32 qp_id; | ||
| 107 | __u32 actual_sq_size; | ||
| 108 | __u32 actual_rq_size; | ||
| 109 | __u32 mmap_sq_db_index; | ||
| 110 | __u32 mmap_rq_db_index; | ||
| 111 | __u32 nes_drv_opt; | ||
| 112 | }; | ||
| 113 | |||
| 114 | #endif /* NES_ABI_USER_H */ | ||
diff --git a/include/uapi/rdma/ocrdma-abi.h b/include/uapi/rdma/ocrdma-abi.h new file mode 100644 index 000000000000..9f28191bef4d --- /dev/null +++ b/include/uapi/rdma/ocrdma-abi.h | |||
| @@ -0,0 +1,151 @@ | |||
| 1 | /* This file is part of the Emulex RoCE Device Driver for | ||
| 2 | * RoCE (RDMA over Converged Ethernet) adapters. | ||
| 3 | * Copyright (C) 2012-2015 Emulex. All rights reserved. | ||
| 4 | * EMULEX and SLI are trademarks of Emulex. | ||
| 5 | * www.emulex.com | ||
| 6 | * | ||
| 7 | * This software is available to you under a choice of one of two licenses. | ||
| 8 | * You may choose to be licensed under the terms of the GNU General Public | ||
| 9 | * License (GPL) Version 2, available from the file COPYING in the main | ||
| 10 | * directory of this source tree, or the BSD license below: | ||
| 11 | * | ||
| 12 | * Redistribution and use in source and binary forms, with or without | ||
| 13 | * modification, are permitted provided that the following conditions | ||
| 14 | * are met: | ||
| 15 | * | ||
| 16 | * - Redistributions of source code must retain the above copyright notice, | ||
| 17 | * this list of conditions and the following disclaimer. | ||
| 18 | * | ||
| 19 | * - Redistributions in binary form must reproduce the above copyright | ||
| 20 | * notice, this list of conditions and the following disclaimer in | ||
| 21 | * the documentation and/or other materials provided with the distribution. | ||
| 22 | * | ||
| 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| 24 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE | ||
| 25 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 26 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
| 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
| 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
| 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
| 32 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
| 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 34 | * | ||
| 35 | * Contact Information: | ||
| 36 | * linux-drivers@emulex.com | ||
| 37 | * | ||
| 38 | * Emulex | ||
| 39 | * 3333 Susan Street | ||
| 40 | * Costa Mesa, CA 92626 | ||
| 41 | */ | ||
| 42 | |||
| 43 | #ifndef OCRDMA_ABI_USER_H | ||
| 44 | #define OCRDMA_ABI_USER_H | ||
| 45 | |||
| 46 | #include <linux/types.h> | ||
| 47 | |||
| 48 | #define OCRDMA_ABI_VERSION 2 | ||
| 49 | #define OCRDMA_BE_ROCE_ABI_VERSION 1 | ||
| 50 | /* user kernel communication data structures. */ | ||
| 51 | |||
| 52 | struct ocrdma_alloc_ucontext_resp { | ||
| 53 | __u32 dev_id; | ||
| 54 | __u32 wqe_size; | ||
| 55 | __u32 max_inline_data; | ||
| 56 | __u32 dpp_wqe_size; | ||
| 57 | __u64 ah_tbl_page; | ||
| 58 | __u32 ah_tbl_len; | ||
| 59 | __u32 rqe_size; | ||
| 60 | __u8 fw_ver[32]; | ||
| 61 | /* for future use/new features in progress */ | ||
| 62 | __u64 rsvd1; | ||
| 63 | __u64 rsvd2; | ||
| 64 | }; | ||
| 65 | |||
| 66 | struct ocrdma_alloc_pd_ureq { | ||
| 67 | __u64 rsvd1; | ||
| 68 | }; | ||
| 69 | |||
| 70 | struct ocrdma_alloc_pd_uresp { | ||
| 71 | __u32 id; | ||
| 72 | __u32 dpp_enabled; | ||
| 73 | __u32 dpp_page_addr_hi; | ||
| 74 | __u32 dpp_page_addr_lo; | ||
| 75 | __u64 rsvd1; | ||
| 76 | }; | ||
| 77 | |||
| 78 | struct ocrdma_create_cq_ureq { | ||
| 79 | __u32 dpp_cq; | ||
| 80 | __u32 rsvd; /* pad */ | ||
| 81 | }; | ||
| 82 | |||
| 83 | #define MAX_CQ_PAGES 8 | ||
| 84 | struct ocrdma_create_cq_uresp { | ||
| 85 | __u32 cq_id; | ||
| 86 | __u32 page_size; | ||
| 87 | __u32 num_pages; | ||
| 88 | __u32 max_hw_cqe; | ||
| 89 | __u64 page_addr[MAX_CQ_PAGES]; | ||
| 90 | __u64 db_page_addr; | ||
| 91 | __u32 db_page_size; | ||
| 92 | __u32 phase_change; | ||
| 93 | /* for future use/new features in progress */ | ||
| 94 | __u64 rsvd1; | ||
| 95 | __u64 rsvd2; | ||
| 96 | }; | ||
| 97 | |||
| 98 | #define MAX_QP_PAGES 8 | ||
| 99 | #define MAX_UD_AV_PAGES 8 | ||
| 100 | |||
| 101 | struct ocrdma_create_qp_ureq { | ||
| 102 | __u8 enable_dpp_cq; | ||
| 103 | __u8 rsvd; | ||
| 104 | __u16 dpp_cq_id; | ||
| 105 | __u32 rsvd1; /* pad */ | ||
| 106 | }; | ||
| 107 | |||
| 108 | struct ocrdma_create_qp_uresp { | ||
| 109 | __u16 qp_id; | ||
| 110 | __u16 sq_dbid; | ||
| 111 | __u16 rq_dbid; | ||
| 112 | __u16 resv0; /* pad */ | ||
| 113 | __u32 sq_page_size; | ||
| 114 | __u32 rq_page_size; | ||
| 115 | __u32 num_sq_pages; | ||
| 116 | __u32 num_rq_pages; | ||
| 117 | __u64 sq_page_addr[MAX_QP_PAGES]; | ||
| 118 | __u64 rq_page_addr[MAX_QP_PAGES]; | ||
| 119 | __u64 db_page_addr; | ||
| 120 | __u32 db_page_size; | ||
| 121 | __u32 dpp_credit; | ||
| 122 | __u32 dpp_offset; | ||
| 123 | __u32 num_wqe_allocated; | ||
| 124 | __u32 num_rqe_allocated; | ||
| 125 | __u32 db_sq_offset; | ||
| 126 | __u32 db_rq_offset; | ||
| 127 | __u32 db_shift; | ||
| 128 | __u64 rsvd[11]; | ||
| 129 | } __packed; | ||
| 130 | |||
| 131 | struct ocrdma_create_srq_uresp { | ||
| 132 | __u16 rq_dbid; | ||
| 133 | __u16 resv0; /* pad */ | ||
| 134 | __u32 resv1; | ||
| 135 | |||
| 136 | __u32 rq_page_size; | ||
| 137 | __u32 num_rq_pages; | ||
| 138 | |||
| 139 | __u64 rq_page_addr[MAX_QP_PAGES]; | ||
| 140 | __u64 db_page_addr; | ||
| 141 | |||
| 142 | __u32 db_page_size; | ||
| 143 | __u32 num_rqe_allocated; | ||
| 144 | __u32 db_rq_offset; | ||
| 145 | __u32 db_shift; | ||
| 146 | |||
| 147 | __u64 rsvd2; | ||
| 148 | __u64 rsvd3; | ||
| 149 | }; | ||
| 150 | |||
| 151 | #endif /* OCRDMA_ABI_USER_H */ | ||
