svn commit: r329575 - in projects/bsd_rdma_4_9_stable_11/sys: amd64/conf conf dev/mthca i386/conf modules modules/mthca ofed/include/uapi/rdma
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Feb 19 12:52:19 UTC 2018
Author: hselasky
Date: Mon Feb 19 12:52:17 2018
New Revision: 329575
URL: https://svnweb.freebsd.org/changeset/base/329575
Log:
MFC r329222:
Import the mthca kernel side infiniband driver from Linux 4.9 and fix
compilation under FreeBSD. The mthca driver was temporarily removed as
part of the Linux 4.9 RoCE/infinband upgrade.
Top commit in Linux source tree:
69973b830859bc6529a7a0468ba0d80ee5117826
Sponsored by: Mellanox Technologies
Added:
projects/bsd_rdma_4_9_stable_11/sys/dev/mthca/
- copied from r329222, head/sys/dev/mthca/
projects/bsd_rdma_4_9_stable_11/sys/modules/mthca/
- copied from r329222, head/sys/modules/mthca/
projects/bsd_rdma_4_9_stable_11/sys/ofed/include/uapi/rdma/mthca-abi.h
- copied unchanged from r329222, head/sys/ofed/include/uapi/rdma/mthca-abi.h
Modified:
projects/bsd_rdma_4_9_stable_11/sys/amd64/conf/NOTES
projects/bsd_rdma_4_9_stable_11/sys/conf/files
projects/bsd_rdma_4_9_stable_11/sys/i386/conf/NOTES
projects/bsd_rdma_4_9_stable_11/sys/modules/Makefile
Directory Properties:
projects/bsd_rdma_4_9_stable_11/ (props changed)
Modified: projects/bsd_rdma_4_9_stable_11/sys/amd64/conf/NOTES
==============================================================================
--- projects/bsd_rdma_4_9_stable_11/sys/amd64/conf/NOTES Mon Feb 19 12:47:59 2018 (r329574)
+++ projects/bsd_rdma_4_9_stable_11/sys/amd64/conf/NOTES Mon Feb 19 12:52:17 2018 (r329575)
@@ -323,6 +323,7 @@ options DRM_DEBUG # Include debug printfs (slow)
# Requires the iwn firmware module
# ixl: Intel XL710 40Gbe PCIE Ethernet
# ixlv: Intel XL710 40Gbe VF PCIE Ethernet
+# mthca: Mellanox HCA InfiniBand
# mlx4ib: Mellanox ConnectX HCA InfiniBand
# mlx4en: Mellanox ConnectX HCA Ethernet
# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
@@ -342,6 +343,7 @@ device iwn # Intel 4965/1000/5000/6000 wireless NICs
device ixl # Intel XL710 40Gbe PCIE Ethernet
options IXL_IW # Enable iWARP Client Interface in ixl(4)
device ixlv # Intel XL710 40Gbe VF PCIE Ethernet
+device mthca # Mellanox HCA InfiniBand
device mlx4 # Shared code module between IB and Ethernet
device mlx4ib # Mellanox ConnectX HCA InfiniBand
device mlx4en # Mellanox ConnectX HCA Ethernet
Modified: projects/bsd_rdma_4_9_stable_11/sys/conf/files
==============================================================================
--- projects/bsd_rdma_4_9_stable_11/sys/conf/files Mon Feb 19 12:47:59 2018 (r329574)
+++ projects/bsd_rdma_4_9_stable_11/sys/conf/files Mon Feb 19 12:52:17 2018 (r329575)
@@ -4290,6 +4290,43 @@ ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp
ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"
+dev/mthca/mthca_allocator.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_av.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_catas.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_cmd.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_cq.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_eq.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_mad.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_main.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_mcg.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_memfree.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_mr.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_pd.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_profile.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_provider.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_qp.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_reset.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_srq.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+dev/mthca/mthca_uar.c optional mthca pci ofed \
+ compile-with "${OFED_C}"
+
dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \
Modified: projects/bsd_rdma_4_9_stable_11/sys/i386/conf/NOTES
==============================================================================
--- projects/bsd_rdma_4_9_stable_11/sys/i386/conf/NOTES Mon Feb 19 12:47:59 2018 (r329574)
+++ projects/bsd_rdma_4_9_stable_11/sys/i386/conf/NOTES Mon Feb 19 12:52:17 2018 (r329575)
@@ -580,6 +580,7 @@ hint.mse.0.irq="5"
# iwn: Intel Wireless WiFi Link 1000/105/135/2000/4965/5000/6000/6050 abgn
# 802.11 network adapters
# Requires the iwn firmware module
+# mthca: Mellanox HCA InfiniBand
# mlx4ib: Mellanox ConnectX HCA InfiniBand
# mlx4en: Mellanox ConnectX HCA Ethernet
# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
@@ -625,6 +626,7 @@ hint.le.0.at="isa"
hint.le.0.port="0x280"
hint.le.0.irq="10"
hint.le.0.drq="0"
+device mthca # Mellanox HCA InfiniBand
device mlx4 # Shared code module between IB and Ethernet
device mlx4ib # Mellanox ConnectX HCA InfiniBand
device mlx4en # Mellanox ConnectX HCA Ethernet
Modified: projects/bsd_rdma_4_9_stable_11/sys/modules/Makefile
==============================================================================
--- projects/bsd_rdma_4_9_stable_11/sys/modules/Makefile Mon Feb 19 12:47:59 2018 (r329574)
+++ projects/bsd_rdma_4_9_stable_11/sys/modules/Makefile Mon Feb 19 12:52:17 2018 (r329575)
@@ -261,6 +261,7 @@ SUBDIR= \
msdosfs_iconv \
${_mse} \
msk \
+ ${_mthca} \
mvs \
mwl \
${_mwlfw} \
@@ -674,6 +675,7 @@ _mlx4en= mlx4en
_mlx5en= mlx5en
.endif
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
+_mthca= mthca
_mlx4ib= mlx4ib
_mlx5ib= mlx5ib
.endif
Copied: projects/bsd_rdma_4_9_stable_11/sys/ofed/include/uapi/rdma/mthca-abi.h (from r329222, head/sys/ofed/include/uapi/rdma/mthca-abi.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/bsd_rdma_4_9_stable_11/sys/ofed/include/uapi/rdma/mthca-abi.h Mon Feb 19 12:52:17 2018 (r329575, copy of r329222, head/sys/ofed/include/uapi/rdma/mthca-abi.h)
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2005 Topspin Communications. All rights reserved.
+ * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef MTHCA_ABI_USER_H
+#define MTHCA_ABI_USER_H
+
+#include <linux/types.h>
+
+/*
+ * Increment this value if any changes that break userspace ABI
+ * compatibility are made.
+ */
+#define MTHCA_UVERBS_ABI_VERSION 1
+
+/*
+ * Make sure that all structs defined in this file remain laid out so
+ * that they pack the same way on 32-bit and 64-bit architectures (to
+ * avoid incompatibility between 32-bit userspace and 64-bit kernels).
+ * In particular do not use pointer types -- pass pointers in __u64
+ * instead.
+ */
+struct mthca_alloc_ucontext_resp {
+ __u32 qp_tab_size;
+ __u32 uarc_size;
+};
+
+struct mthca_alloc_pd_resp {
+ __u32 pdn;
+ __u32 reserved;
+};
+
+/*
+ * Mark the memory region with a DMA attribute that causes
+ * in-flight DMA to be flushed when the region is written to:
+ */
+#define MTHCA_MR_DMASYNC 0x1
+
+struct mthca_reg_mr {
+ __u32 mr_attrs;
+ __u32 reserved;
+};
+
+struct mthca_create_cq {
+ __u32 lkey;
+ __u32 pdn;
+ __u64 arm_db_page;
+ __u64 set_db_page;
+ __u32 arm_db_index;
+ __u32 set_db_index;
+};
+
+struct mthca_create_cq_resp {
+ __u32 cqn;
+ __u32 reserved;
+};
+
+struct mthca_resize_cq {
+ __u32 lkey;
+ __u32 reserved;
+};
+
+struct mthca_create_srq {
+ __u32 lkey;
+ __u32 db_index;
+ __u64 db_page;
+};
+
+struct mthca_create_srq_resp {
+ __u32 srqn;
+ __u32 reserved;
+};
+
+struct mthca_create_qp {
+ __u32 lkey;
+ __u32 reserved;
+ __u64 sq_db_page;
+ __u64 rq_db_page;
+ __u32 sq_db_index;
+ __u32 rq_db_index;
+};
+#endif /* MTHCA_ABI_USER_H */
More information about the svn-src-projects
mailing list