Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4

like other PCI network drivers. The sys/ofed directory is now mainly
reserved for generic infiniband code, with exception of the mthca driver.

- Add new manual page, mlx4en(4), describing how to configure and load
mlx4en.

- All relevant driver C-files are now prefixed mlx4, mlx4_en and
mlx4_ib respectivly to avoid object filename collisions when compiling
the kernel. This also fixes an issue with proper dependency file
generation for the C-files in question.

- Device mlxen is now device mlx4en and depends on device mlx4, see
mlx4en(4). Only the network device name remains unchanged.

- The mlx4 and mlx4en modules are now built by default on i386 and
amd64 targets. Only building the mlx4ib module depends on
WITH_OFED=YES .

Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2016-09-30 08:23:06 +00:00
parent 1a3c881209
commit 97549c34ec
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306486
70 changed files with 328 additions and 284 deletions

View File

@ -279,6 +279,7 @@ MAN= aac.4 \
mk48txx.4 \
mld.4 \
mlx.4 \
mlx4en.4 \
mlx5en.4 \
mly.4 \
mmc.4 \

95
share/man/man4/mlx4en.4 Normal file
View File

@ -0,0 +1,95 @@
.\" Copyright (c) 2016 Mellanox Technologies
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd September 30, 2016
.Dt MLX4EN 4
.Os
.Sh NAME
.Nm mlx4en
.Nd "Mellanox ConnectX-3 10GbE/40GbE network adapter driver"
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
kernel configuration file:
.Bd -ragged -offset indent
.Cd "options COMPAT_LINUXKPI"
.Cd "device mlx4"
.Cd "device mlx4en"
.Ed
.Pp
To load the driver as a module at run-time,
run the following command as root:
.Bd -literal -offset indent
kldload mlx4en
.Ed
.Pp
To load the driver as a
module at boot time, place the following lines in
.Xr loader.conf 5 :
.Bd -literal -offset indent
mlx4en_load="YES"
.Ed
.Sh DESCRIPTION
Mellanox ConnectX adapter cards with Virtual Protocol Interconnect
(VPI) provide the highest performing and most flexible interconnect
solution for Enterprise Data Centers, High-Performance Computing, and
Embedded environments.
Clustered data bases, parallelized applications, transactional
services and high-performance embedded I/O applications will achieve
significant performance improvements resulting in reduced completion
time and lower cost per operation.
.Sh HARDWARE
The
.Nm
driver supports the following network adapters:
.Pp
.Bl -bullet -compact
.It
Mellanox ConnectX-2 (ETH)
.It
Mellanox ConnectX-3 (ETH)
.El
.Sh SUPPORT
For general information and support,
go to the Mellanox support website at:
.Pa http://www.mellanox.com/ .
.Pp
If an issue is identified with this driver with a supported adapter,
email all the specific information related to the issue to
.Aq Mt freebsd-drivers@mellanox.com .
.Sh SEE ALSO
.Xr ifconfig 8
.Sh HISTORY
The
.Nm
device driver first appeared in
.Fx 9.x .
.Sh AUTHORS
.An -nosplit
The
.Nm
driver was written by
.An Mellanox Technologies <freebsd-drivers@mellanox.com> .

View File

@ -318,7 +318,7 @@ options DRM_DEBUG # Include debug printfs (slow)
# ixl: Intel XL710 40Gbe PCIE Ethernet
# ixlv: Intel XL710 40Gbe VF PCIE Ethernet
# mlx4ib: Mellanox ConnectX HCA InfiniBand
# mlxen: Mellanox ConnectX HCA Ethernet
# mlx4en: Mellanox ConnectX HCA Ethernet
# mthca: Mellanox HCA InfiniBand
# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
# sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters
@ -336,8 +336,9 @@ device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs.
device iwn # Intel 4965/1000/5000/6000 wireless NICs.
device ixl # Intel XL710 40Gbe PCIE Ethernet
device ixlv # Intel XL710 40Gbe VF PCIE Ethernet
device mlx4 # Shared code module between IB and Ethernet
device mlx4ib # Mellanox ConnectX HCA InfiniBand
device mlxen # Mellanox ConnectX HCA Ethernet
device mlx4en # Mellanox ConnectX HCA Ethernet
device mthca # Mellanox HCA InfiniBand
device nfe # nVidia nForce MCP on-board Ethernet
device sfxge # Solarflare SFC9000 10Gb Ethernet

View File

@ -4036,131 +4036,90 @@ ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \
ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"
ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/cm.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/ah.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/cq.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/doorbell.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/mad.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/main.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/mr.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/qp.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/srq.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/wc.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
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 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_exp.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
ofed/drivers/net/mlx4/alloc.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/catas.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/cmd.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/cq.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/eq.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/fw.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/icm.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/intf.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/main.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/mcg.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/ -Wno-unused"
ofed/drivers/net/mlx4/mr.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/pd.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/port.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/profile.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/qp.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/reset.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/sense.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/srq.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/resource_tracker.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/sys_tune.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_sys_tune.c optional mlx4 pci \
compile-with "${OFED_C}"
ofed/drivers/net/mlx4/en_cq.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_main.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_netdev.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_port.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_resources.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_rx.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_tx.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \
compile-with "${OFED_C}"

View File

@ -35,8 +35,8 @@
#include <linux/types.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/doorbell.h>
struct mlx4_cqe {
__be32 vlan_my_qpn;

View File

@ -33,7 +33,7 @@
#ifndef MLX4_DRIVER_H
#define MLX4_DRIVER_H
#include <linux/mlx4/device.h>
#include <dev/mlx4/device.h>
struct mlx4_dev;

View File

@ -44,10 +44,10 @@
#include <linux/semaphore.h>
#include <linux/workqueue.h>
#include <linux/device.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/driver.h>
#include <linux/mlx4/doorbell.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/driver.h>
#include <dev/mlx4/doorbell.h>
#include <dev/mlx4/cmd.h>
#define DRV_NAME "mlx4_core"
#define PFX DRV_NAME ": "

View File

@ -38,8 +38,8 @@
#include <linux/pci.h>
#include <linux/errno.h>
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/device.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/device.h>
#include <linux/semaphore.h>
#include <rdma/ib_smi.h>

View File

@ -36,8 +36,8 @@
#include <linux/hardirq.h>
#include <linux/module.h>
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/cq.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/cq.h>
#include "mlx4.h"
#include "icm.h"

View File

@ -37,7 +37,7 @@
#include <linux/mm.h>
#include <linux/dma-mapping.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include "mlx4.h"
#include "fw.h"

View File

@ -35,7 +35,7 @@
#define LINUXKPI_PARAM_PREFIX mlx4_
#include <linux/etherdevice.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/module.h>
#include <linux/cache.h>

View File

@ -37,7 +37,7 @@
#include <linux/slab.h>
#include <linux/math64.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include "mlx4.h"
#include "icm.h"

View File

@ -47,13 +47,13 @@
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/doorbell.h>
#include "mlx4.h"
#include "fw.h"
#include "icm.h"
#include "mlx4_stats.h"
#include <dev/mlx4/stats.h>
/* Mellanox ConnectX HCA low-level driver */

View File

@ -34,7 +34,7 @@
#include <linux/string.h>
#include <linux/etherdevice.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/module.h>
#include <linux/printk.h>

View File

@ -39,7 +39,7 @@
#include <linux/kernel.h>
#include <linux/vmalloc.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/math64.h>

View File

@ -37,10 +37,10 @@
#include <linux/module.h>
#include <linux/err.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/moduleparam.h>
#include "mlx4.h"
#include "mlx4_stats.h"
#include <dev/mlx4/stats.h>
int mlx4_set_4k_mtu = -1;

View File

@ -37,8 +37,8 @@
#include <linux/gfp.h>
#include <linux/module.h>
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/qp.h>
#include "mlx4.h"
#include "icm.h"

View File

@ -39,8 +39,8 @@
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/qp.h>
#include <linux/if_ether.h>
#include <linux/etherdevice.h>

View File

@ -34,7 +34,7 @@
#include <linux/errno.h>
#include <linux/if_ether.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include "mlx4.h"

View File

@ -31,8 +31,8 @@
* SOFTWARE.
*/
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/srq.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/srq.h>
#include <linux/module.h>
#include <linux/gfp.h>

View File

@ -46,17 +46,17 @@
#include <linux/dcbnl.h>
#endif
#include <linux/mlx4/device.h>
#include <linux/mlx4/qp.h>
#include <linux/mlx4/cq.h>
#include <linux/mlx4/srq.h>
#include <linux/mlx4/doorbell.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/cq.h>
#include <dev/mlx4/srq.h>
#include <dev/mlx4/doorbell.h>
#include <dev/mlx4/cmd.h>
#include <netinet/tcp_lro.h>
#include "en_port.h"
#include "mlx4_stats.h"
#include <dev/mlx4/stats.h>
#define DRV_NAME "mlx4_en"

View File

@ -31,11 +31,11 @@
*
*/
#include <linux/mlx4/cq.h>
#include <linux/mlx4/qp.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cq.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/cmd.h>
#include "mlx4_en.h"
#include "en.h"
static void mlx4_en_cq_event(struct mlx4_cq *cq, enum mlx4_event event)

View File

@ -38,11 +38,11 @@
#include <linux/netdevice.h>
#include <linux/slab.h>
#include <linux/mlx4/driver.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/driver.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/cmd.h>
#include "mlx4_en.h"
#include "en.h"
/* Mellanox ConnectX HCA Ethernet driver */
@ -330,14 +330,14 @@ module_init(mlx4_en_init);
module_exit(mlx4_en_cleanup);
static int
mlxen_evhand(module_t mod, int event, void *arg)
mlx4en_evhand(module_t mod, int event, void *arg)
{
return (0);
}
static moduledata_t mlxen_mod = {
.name = "mlxen",
.evhand = mlxen_evhand,
static moduledata_t mlx4en_mod = {
.name = "mlx4en",
.evhand = mlx4en_evhand,
};
DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY);
MODULE_DEPEND(mlxen, mlx4, 1, 1, 1);
MODULE_DEPEND(mlxen, linuxkpi, 1, 1, 1);
DECLARE_MODULE(mlx4en, mlx4en_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY);
MODULE_DEPEND(mlx4en, mlx4, 1, 1, 1);
MODULE_DEPEND(mlx4en, linuxkpi, 1, 1, 1);

View File

@ -41,15 +41,15 @@
#include <linux/list.h>
#include <linux/if_ether.h>
#include <linux/mlx4/driver.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/cq.h>
#include <dev/mlx4/driver.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/cq.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
#include "mlx4_en.h"
#include "en.h"
#include "en_port.h"
static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv);

View File

@ -34,11 +34,11 @@
#include <sys/types.h>
#include <linux/if_vlan.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/cmd.h>
#include "en_port.h"
#include "mlx4_en.h"
#include "en.h"
#define EN_IFQ_MIN_INTERVAL 3000

View File

@ -33,9 +33,9 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/qp.h>
#include "mlx4_en.h"
#include "en.h"
void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,

View File

@ -31,18 +31,18 @@
*
*/
#include "opt_inet.h"
#include <linux/mlx4/cq.h>
#include <dev/mlx4/cq.h>
#include <linux/slab.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/qp.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/vmalloc.h>
#include <linux/mlx4/driver.h>
#include <dev/mlx4/driver.h>
#ifdef CONFIG_NET_RX_BUSY_POLL
#include <net/busy_poll.h>
#endif
#include "mlx4_en.h"
#include "en.h"
static void mlx4_en_init_rx_desc(struct mlx4_en_priv *priv,

View File

@ -34,9 +34,9 @@
#define LINUXKPI_PARAM_PREFIX mlx4_
#include <linux/page.h>
#include <linux/mlx4/cq.h>
#include <dev/mlx4/cq.h>
#include <linux/slab.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/qp.h>
#include <linux/if_vlan.h>
#include <linux/vmalloc.h>
#include <linux/moduleparam.h>
@ -50,7 +50,7 @@
#include <netinet/tcp_lro.h>
#include <netinet/udp.h>
#include "mlx4_en.h"
#include "en.h"
enum {
MAX_INLINE = 104, /* 128 - 16 - 4 - 4 */

View File

@ -46,8 +46,8 @@
#include <rdma/ib_mad.h>
#include <rdma/ib_sa.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/doorbell.h>
#define MLX4_IB_DRV_NAME "mlx4_ib"

View File

@ -37,7 +37,7 @@
#include <rdma/ib_cache.h>
#include <rdma/ib_sa.h>
#include <rdma/ib_pack.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <rdma/ib_user_verbs.h>

View File

@ -32,7 +32,7 @@
#include <rdma/ib_mad.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/rbtree.h>
#include <linux/idr.h>
#include <rdma/ib_cm.h>

View File

@ -31,9 +31,9 @@
* SOFTWARE.
*/
#include <linux/mlx4/cq.h>
#include <linux/mlx4/qp.h>
#include <linux/mlx4/srq.h>
#include <dev/mlx4/cq.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/srq.h>
#include <linux/slab.h>
#include "mlx4_ib.h"

View File

@ -33,7 +33,7 @@
#include "mlx4_ib.h"
#include "mlx4_exp.h"
#include <linux/mlx4/qp.h>
#include <dev/mlx4/qp.h>
int mlx4_ib_exp_query_device(struct ib_device *ibdev,
struct ib_exp_device_attr *props)

View File

@ -36,7 +36,7 @@
#include <rdma/ib_cache.h>
#include <linux/random.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/gfp.h>
#include <rdma/ib_pma.h>

View File

@ -47,8 +47,8 @@
#include <rdma/ib_user_verbs_exp.h>
#include <rdma/ib_addr.h>
#include <linux/mlx4/driver.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/driver.h>
#include <dev/mlx4/cmd.h>
#include <linux/sched.h>
#include <linux/page.h>
#include <linux/printk.h>

View File

@ -35,7 +35,7 @@
#include <rdma/ib_cache.h>
#include <rdma/ib_sa.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/rbtree.h>
#include <linux/delay.h>

View File

@ -41,8 +41,8 @@
#include <rdma/ib_addr.h>
#include <rdma/ib_mad.h>
#include <linux/mlx4/qp.h>
#include <linux/mlx4/driver.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/driver.h>
#include <linux/io.h>
#include "mlx4_ib.h"

View File

@ -31,8 +31,8 @@
* SOFTWARE.
*/
#include <linux/mlx4/qp.h>
#include <linux/mlx4/srq.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/srq.h>
#include <linux/slab.h>
#include "mlx4_ib.h"

View File

@ -35,7 +35,7 @@
#include <linux/types.h>
#include <linux/mlx4/device.h>
#include <dev/mlx4/device.h>
#define MLX4_INVALID_LKEY 0x100

View File

@ -593,7 +593,7 @@ hint.mse.0.irq="5"
# 802.11 network adapters
# Requires the iwn firmware module
# mlx4ib: Mellanox ConnectX HCA InfiniBand
# mlxen: Mellanox ConnectX HCA Ethernet
# mlx4en: Mellanox ConnectX HCA Ethernet
# mthca: Mellanox HCA InfiniBand
# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
# sbni: Granch SBNI12-xx ISA and PCI adapters
@ -632,8 +632,9 @@ hint.le.0.at="isa"
hint.le.0.port="0x280"
hint.le.0.irq="10"
hint.le.0.drq="0"
device mlx4 # Shared code module between IB and Ethernet
device mlx4ib # Mellanox ConnectX HCA InfiniBand
device mlxen # Mellanox ConnectX HCA Ethernet
device mlx4en # Mellanox ConnectX HCA Ethernet
device mthca # Mellanox HCA InfiniBand
device nfe # nVidia nForce MCP on-board Ethernet
device sbni

View File

@ -233,7 +233,7 @@ SUBDIR= \
mlx \
${_mlx4} \
${_mlx4ib} \
${_mlxen} \
${_mlx4en} \
${_mlx5} \
${_mlx5en} \
${_mly} \
@ -631,16 +631,16 @@ _iwifw= iwifw
_iwmfw= iwmfw
_iwnfw= iwnfw
.endif
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mlx4= mlx4
_mlx4ib= mlx4ib
_mlxen= mlxen
.endif
_mlx5= mlx5
.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
defined(ALL_MODULES)
_mlx4en= mlx4en
_mlx5en= mlx5en
.endif
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mlx4ib= mlx4ib
.endif
_mly= mly
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mthca= mthca

View File

@ -1,15 +1,30 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4
.PATH: ${.CURDIR}/../../dev/mlx4/mlx4_core
KMOD= mlx4
SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \
opt_inet.h opt_inet6.h \
alloc.c catas.c cmd.c cq.c eq.c \
fw.c icm.c intf.c main.c mcg.c mr.c \
pd.c port.c profile.c qp.c reset.c sense.c \
srq.c resource_tracker.c sys_tune.c
mlx4_alloc.c \
mlx4_catas.c \
mlx4_cmd.c \
mlx4_cq.c \
mlx4_eq.c \
mlx4_fw.c \
mlx4_icm.c \
mlx4_intf.c \
mlx4_main.c \
mlx4_mcg.c \
mlx4_mr.c \
mlx4_pd.c \
mlx4_port.c \
mlx4_profile.c \
mlx4_qp.c \
mlx4_reset.c \
mlx4_sense.c \
mlx4_srq.c \
mlx4_resource_tracker.c \
mlx4_sys_tune.c
CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4
CFLAGS+= -I${.CURDIR}/../../ofed/include
CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include
@ -17,4 +32,4 @@ CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith
CWARNFLAGS.mcg.c= -Wno-unused
CWARNFLAGS.mlx4_mcg.c= -Wno-unused

View File

@ -0,0 +1,18 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../dev/mlx4/mlx4_en
KMOD= mlx4en
SRCS= device_if.h bus_if.h pci_if.h vnode_if.h \
opt_inet.h opt_inet6.h \
mlx4_en_cq.c \
mlx4_en_main.c \
mlx4_en_netdev.c \
mlx4_en_port.c \
mlx4_en_resources.c \
mlx4_en_rx.c \
mlx4_en_tx.c
CFLAGS+= -I${.CURDIR}/../../ofed/include
CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include
.include <bsd.kmod.mk>

View File

@ -1,14 +1,24 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4
.PATH: ${.CURDIR}/../../dev/mlx4/mlx4_ib
KMOD= mlx4ib
SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \
opt_inet.h opt_inet6.h \
alias_GUID.c mcg.c sysfs.c ah.c cq.c \
mlx4_exp.c \
doorbell.c mad.c main.c mr.c qp.c srq.c wc.c cm.c
mlx4_ib_alias_GUID.c \
mlx4_ib_mcg.c \
mlx4_ib_sysfs.c \
mlx4_ib_ah.c \
mlx4_ib_cq.c \
mlx4_ib_exp.c \
mlx4_ib_doorbell.c \
mlx4_ib_mad.c \
mlx4_ib_main.c \
mlx4_ib_mr.c \
mlx4_ib_qp.c \
mlx4_ib_srq.c \
mlx4_ib_wc.c \
mlx4_ib_cm.c
CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4
CFLAGS+= -I${.CURDIR}/../../ofed/include
CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include
CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM

View File

@ -1,13 +0,0 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4
KMOD = mlxen
SRCS = device_if.h bus_if.h pci_if.h vnode_if.h
SRCS += en_cq.c en_main.c en_netdev.c en_port.c en_resources.c
SRCS += en_rx.c en_tx.c
SRCS += opt_inet.h opt_inet6.h
CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4
CFLAGS+= -I${.CURDIR}/../../ofed/include
CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include
.include <bsd.kmod.mk>

View File

@ -1,10 +0,0 @@
config MLX4_INFINIBAND
tristate "Mellanox ConnectX HCA support"
depends on NETDEVICES && ETHERNET && PCI
select NET_VENDOR_MELLANOX
select MLX4_CORE
---help---
This driver provides low-level InfiniBand support for
Mellanox ConnectX PCI Express host channel adapters (HCAs).
This is required to use InfiniBand protocols such as
IP-over-IB or SRP with these devices.

View File

@ -1,33 +0,0 @@
# $FreeBSD$
#.PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4:${.CURDIR}/../../ofed/include/linux
.PATH: ${.CURDIR}/../../../../../include/linux
.include <src.opts.mk>
KMOD = mlx4
SRCS = device_if.h bus_if.h pci_if.h vnode_if.h
SRCS+= alloc.c catas.c cmd.c cq.c eq.c fw.c icm.c intf.c main.c mcg.c mr.c linux_compat.c linux_radix.c
SRCS+= pd.c port.c profile.c qp.c reset.c sense.c srq.c resource_tracker.c sys_tune.c
SRCS+= opt_inet.h opt_inet6.h
#CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4
#CFLAGS+= -I${.CURDIR}/../../ofed/include/
CFLAGS+= -I${.CURDIR}/../../../../../include
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith