From owner-svn-src-all@freebsd.org Wed May 25 12:03:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE8BCB492EC; Wed, 25 May 2016 12:03:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3ED1BA2; Wed, 25 May 2016 12:03:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4PC3NLA009530; Wed, 25 May 2016 12:03:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4PC3LC2009507; Wed, 25 May 2016 12:03:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201605251203.u4PC3LC2009507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 May 2016 12:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300676 - in head/sys: dev/cxgbe/iw_cxgbe dev/mlx5/mlx5_core ofed/drivers/infiniband/core ofed/drivers/infiniband/debug ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2016 12:03:24 -0000 Author: hselasky Date: Wed May 25 12:03:21 2016 New Revision: 300676 URL: https://svnweb.freebsd.org/changeset/base/300676 Log: Prepare for activation of LinuxKPI module parameters as read-only tunable SYSCTL's. Linux module parameters are associated with the module they belong to. FreeBSD does not share this concept of a parent module. Instead add macros which define the prefix to use for the module parameters in the LinuxKPI consumers. While at it convert all "bool" LinuxKPI module parameters to "byte" type, because we don't have a "bool" type of SYSCTL in FreeBSD. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/ofed/drivers/infiniband/core/cma.c head/sys/ofed/drivers/infiniband/core/mad.c head/sys/ofed/drivers/infiniband/core/multicast.c head/sys/ofed/drivers/infiniband/core/umem.c head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c head/sys/ofed/drivers/infiniband/debug/memtrack.c head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h head/sys/ofed/drivers/infiniband/util/madeye.c head/sys/ofed/drivers/net/mlx4/catas.c head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/ofed/drivers/net/mlx4/en_tx.c head/sys/ofed/drivers/net/mlx4/fw.c head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/drivers/net/mlx4/port.c Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 25 12:03:21 2016 (r300676) @@ -32,6 +32,8 @@ #include __FBSDID("$FreeBSD$"); +#define LINUXKPI_PARAM_PREFIX iw_cxgbe_ + #include "opt_inet.h" #ifdef TCP_OFFLOAD Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed May 25 12:03:21 2016 (r300676) @@ -25,6 +25,8 @@ * $FreeBSD$ */ +#define LINUXKPI_PARAM_PREFIX mlx5_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cma.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/core/cma.c Wed May 25 12:03:21 2016 (r300676) @@ -34,6 +34,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX ibcore_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/mad.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/core/mad.c Wed May 25 12:03:21 2016 (r300676) @@ -33,6 +33,9 @@ * SOFTWARE. * */ + +#define LINUXKPI_PARAM_PREFIX ibcore_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/multicast.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/multicast.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/core/multicast.c Wed May 25 12:03:21 2016 (r300676) @@ -30,6 +30,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX ibcore_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/umem.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/umem.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/core/umem.c Wed May 25 12:03:21 2016 (r300676) @@ -32,6 +32,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX ibcore_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Wed May 25 12:03:21 2016 (r300676) @@ -33,6 +33,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX ibcore_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/debug/memtrack.c ============================================================================== --- head/sys/ofed/drivers/infiniband/debug/memtrack.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/debug/memtrack.c Wed May 25 12:03:21 2016 (r300676) @@ -19,6 +19,8 @@ Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved. */ +#define LINUXKPI_PARAM_PREFIX memtrack_ + #define C_MEMTRACK_C #ifdef kmalloc Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Wed May 25 12:03:21 2016 (r300676) @@ -31,6 +31,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX mlx4_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c Wed May 25 12:03:21 2016 (r300676) @@ -30,6 +30,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX mthca_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c Wed May 25 12:03:21 2016 (r300676) @@ -32,6 +32,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX mthca_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Wed May 25 12:03:21 2016 (r300676) @@ -32,6 +32,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX mthca_ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed May 25 12:03:21 2016 (r300676) @@ -35,6 +35,8 @@ #ifndef _IPOIB_H #define _IPOIB_H +#define LINUXKPI_PARAM_PREFIX ipoib_ + #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ofed.h" Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Wed May 25 12:03:21 2016 (r300676) @@ -1,6 +1,8 @@ #ifndef _SDP_H_ #define _SDP_H_ +#define LINUXKPI_PARAM_PREFIX ib_sdp_ + #include "opt_ddb.h" #include "opt_inet.h" #include "opt_ofed.h" Modified: head/sys/ofed/drivers/infiniband/util/madeye.c ============================================================================== --- head/sys/ofed/drivers/infiniband/util/madeye.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/infiniband/util/madeye.c Wed May 25 12:03:21 2016 (r300676) @@ -32,6 +32,9 @@ * * $Id$ */ + +#define LINUXKPI_PARAM_PREFIX ib_madeye_ + #include #include #include Modified: head/sys/ofed/drivers/net/mlx4/catas.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/catas.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/net/mlx4/catas.c Wed May 25 12:03:21 2016 (r300676) @@ -31,6 +31,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX mlx4_ + #include #include Modified: head/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_main.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/net/mlx4/en_main.c Wed May 25 12:03:21 2016 (r300676) @@ -31,6 +31,8 @@ * */ +#define LINUXKPI_PARAM_PREFIX mlx4_ + #include #include #include Modified: head/sys/ofed/drivers/net/mlx4/en_tx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_tx.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/net/mlx4/en_tx.c Wed May 25 12:03:21 2016 (r300676) @@ -31,6 +31,8 @@ * */ +#define LINUXKPI_PARAM_PREFIX mlx4_ + #include #include #include Modified: head/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/fw.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/net/mlx4/fw.c Wed May 25 12:03:21 2016 (r300676) @@ -32,6 +32,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX mlx4_ + #include #include #include @@ -49,8 +51,8 @@ enum { extern void __buggy_use_of_MLX4_GET(void); extern void __buggy_use_of_MLX4_PUT(void); -static bool enable_qos; -module_param(enable_qos, bool, 0444); +static u8 enable_qos; +module_param(enable_qos, byte, 0444); MODULE_PARM_DESC(enable_qos, "Enable Quality of Service support in the HCA (default: off)"); #define MLX4_GET(dest, source, offset) \ Modified: head/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/main.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/net/mlx4/main.c Wed May 25 12:03:21 2016 (r300676) @@ -33,6 +33,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX mlx4_ + #include #include #include Modified: head/sys/ofed/drivers/net/mlx4/port.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/port.c Wed May 25 11:58:55 2016 (r300675) +++ head/sys/ofed/drivers/net/mlx4/port.c Wed May 25 12:03:21 2016 (r300676) @@ -30,6 +30,8 @@ * SOFTWARE. */ +#define LINUXKPI_PARAM_PREFIX mlx4_ + #include #include #include