Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Sep 2017 13:10:33 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r323218 - in stable/11: share/man/man4 sys/conf sys/dev/mlx5/mlx5_ib sys/modules sys/modules/mlx5ib
Message-ID:  <201709061310.v86DAXZe054869@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Sep  6 13:10:33 2017
New Revision: 323218
URL: https://svnweb.freebsd.org/changeset/base/323218

Log:
  MFC r322810 and r322830:
  Add new mlx5ib(4) driver to the kernel source tree which supports
  Remote DMA over Converged Ethernet, RoCE, for the ConnectX-4 series of
  PCI express network cards.
  
  There is currently no user-space support and this driver only supports
  kernel side non-routable RoCE V1. The krping kernel module can be used
  to test this driver. Full user-space support including RoCE V2 will be
  added as part of the ongoing upgrade to ibcore from Linux 4.9. Otherwise
  this driver is feature equivalent to mlx4ib(4). The mlx5ib(4) kernel
  module will only be built when WITH_OFED=YES is specified.
  
  Sponsored by:		Mellanox Technologies

Added:
  stable/11/share/man/man4/mlx5ib.4
     - copied unchanged from r322810, head/share/man/man4/mlx5ib.4
  stable/11/sys/dev/mlx5/mlx5_ib/
     - copied from r322810, head/sys/dev/mlx5/mlx5_ib/
  stable/11/sys/modules/mlx5ib/
     - copied from r322810, head/sys/modules/mlx5ib/
Modified:
  stable/11/share/man/man4/Makefile
  stable/11/sys/conf/files
  stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
  stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c
  stable/11/sys/modules/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/Makefile
==============================================================================
--- stable/11/share/man/man4/Makefile	Wed Sep  6 11:47:59 2017	(r323217)
+++ stable/11/share/man/man4/Makefile	Wed Sep  6 13:10:33 2017	(r323218)
@@ -906,6 +906,7 @@ MAN+=		iser.4
 
 .if ${MK_OFED} != "no"
 MAN+=		mlx4ib.4
+MAN+=		mlx5ib.4
 .endif
 
 .if ${MK_TESTS} != "no"

Copied: stable/11/share/man/man4/mlx5ib.4 (from r322810, head/share/man/man4/mlx5ib.4)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/11/share/man/man4/mlx5ib.4	Wed Sep  6 13:10:33 2017	(r323218, copy of r322810, head/share/man/man4/mlx5ib.4)
@@ -0,0 +1,124 @@
+.\" Copyright (c) 2017 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 August 23, 2017
+.Dt MLX5IB 4
+.Os
+.Sh NAME
+.Nm mlx5ib
+.Nd "Mellanox ConnectX-4 and ConnectX-4 LX based 100Gb, 50Gb, 40Gb, 25Gb and 10Gb network adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place these lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options COMPAT_LINUXKPI"
+.Cd "device mlx5"
+.Cd "device mlx5ib"
+.Ed
+.Pp
+To load the driver as a module at run-time,
+run this command as root:
+.Bd -literal -offset indent
+kldload mlx5ib
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place this line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mlx5ib_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for infiniband and Remote DMA over Converged Ethernet,
+RoCE, for PCI Express network adapters based on ConnectX-4 and ConnectX-4 LX.
+.br
+For further hardware information and questions related to hardware
+requirements, see
+.Pa http://www.mellanox.com/ .
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports 100Gb, 50Gb, 40Gb, 25Gb and 10Gb network adapters.
+ConnectX-4 supports: 10/20/25/40/50/56/100Gb/s speeds.
+ConnectX-4 LX supports: 10/25/40/50Gb/s speeds (and reduced power consumption):
+.Pp
+.Bl -bullet -compact
+.It
+Mellanox MCX455A-ECAT
+.It
+Mellanox MCX456A-ECAT
+.It
+Mellanox MCX415A-CCAT
+.It
+Mellanox MCX416A-CCAT
+.It
+Mellanox MCX455A-FCAT
+.It
+Mellanox MCX456A-FCAT
+.It
+Mellanox MCX415A-BCAT
+.It
+Mellanox MCX416A-BCAT
+.It
+Mellanox MCX4131A-GCAT
+.It
+Mellanox MCX4131A-BCAT
+.It
+Mellanox MCX4121A-ACAT
+.It
+Mellanox MCX4111A-ACAT
+.It
+Mellanox MCX4121A-XCAT
+.It
+Mellanox MCX4111A-XCAT
+.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 mlx5en 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 12.x .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Mellanox Technologies <freebsd-drivers@mellanox.com> .

Modified: stable/11/sys/conf/files
==============================================================================
--- stable/11/sys/conf/files	Wed Sep  6 11:47:59 2017	(r323217)
+++ stable/11/sys/conf/files	Wed Sep  6 13:10:33 2017	(r323218)
@@ -4287,6 +4287,27 @@ 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/mlx5/mlx5_ib/mlx5_ib_ah.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_cq.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c		optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_mad.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_main.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_mem.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_mr.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_qp.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_roce.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+dev/mlx5/mlx5_ib/mlx5_ib_srq.c			optional mlx5ib pci ofed \
+	compile-with "${OFED_C}"
+
 dev/mlx5/mlx5_core/mlx5_alloc.c			optional mlx5 pci	\
 	compile-with "${OFED_C}"
 dev/mlx5/mlx5_core/mlx5_cmd.c			optional mlx5 pci	\

Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c	Wed Aug 23 12:09:37 2017	(r322810)
+++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c	Wed Sep  6 13:10:33 2017	(r323218)
@@ -856,7 +856,7 @@ static struct ib_ucontext *mlx5_ib_alloc_ucontext(stru
 	else if (reqlen == sizeof(struct mlx5_ib_alloc_ucontext_req_v2))
 		ver = 2;
 	else {
-		mlx5_ib_err(dev, "request malformed, reqlen: %ld\n", reqlen);
+		mlx5_ib_err(dev, "request malformed, reqlen: %ld\n", (long)reqlen);
 		return ERR_PTR(-EINVAL);
 	}
 

Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c	Wed Aug 23 12:09:37 2017	(r322810)
+++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c	Wed Sep  6 13:10:33 2017	(r323218)
@@ -29,6 +29,8 @@
 #include <rdma/ib_umem.h>
 #include "mlx5_ib.h"
 
+CTASSERT(sizeof(uintptr_t) == sizeof(unsigned long));
+
 /* @umem: umem object to scan
  * @addr: ib virtual address requested by the user
  * @count: number of PAGE_SIZE pages covered by umem
@@ -40,7 +42,7 @@
 void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr, int *count, int *shift,
 			int *ncont, int *order)
 {
-	uintptr_t tmp;
+	unsigned long tmp;
 	unsigned long m;
 	int i, k;
 	u64 base = 0;

Modified: stable/11/sys/modules/Makefile
==============================================================================
--- stable/11/sys/modules/Makefile	Wed Sep  6 11:47:59 2017	(r323217)
+++ stable/11/sys/modules/Makefile	Wed Sep  6 13:10:33 2017	(r323218)
@@ -246,6 +246,7 @@ SUBDIR=	\
 	${_mlxen} \
 	${_mlx5} \
 	${_mlx5en} \
+	${_mlx5ib} \
 	${_mly} \
 	mmc \
 	mmcsd \
@@ -663,6 +664,7 @@ _iwnfw=		iwnfw
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
 _mlx4=		mlx4
 _mlx4ib=	mlx4ib
+_mlx5ib=	mlx5ib
 _mlxen=		mlxen
 .endif
 _mlx5=		mlx5



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709061310.v86DAXZe054869>