Date: Wed, 25 May 2016 12:03:21 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> 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 ... Message-ID: <201605251203.u4PC3LC2009507@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> __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 <linux/kmod.h> #include <linux/module.h> #include <linux/errno.h> 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 <linux/completion.h> #include <linux/in.h> #include <linux/in6.h> 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 <linux/dma-mapping.h> #include <linux/slab.h> #include <linux/module.h> 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 <linux/completion.h> #include <linux/dma-mapping.h> #include <linux/err.h> 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 <linux/mm.h> #include <linux/dma-mapping.h> #include <linux/sched.h> 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 <linux/file.h> #include <linux/fs.h> #include <linux/slab.h> 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 <linux/module.h> #include <linux/slab.h> #include <linux/errno.h> 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 <linux/jiffies.h> #include <linux/timer.h> #include <linux/workqueue.h> 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 <linux/completion.h> #include <linux/pci.h> #include <linux/errno.h> 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 <linux/module.h> #include <linux/errno.h> #include <linux/pci.h> 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 <linux/module.h> #include <linux/device.h> #include <linux/err.h> 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 <linux/workqueue.h> #include <linux/module.h> 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 <linux/module.h> #include <linux/delay.h> #include <linux/netdevice.h> 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 <linux/page.h> #include <linux/mlx4/cq.h> #include <linux/slab.h> 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 <linux/etherdevice.h> #include <linux/mlx4/cmd.h> #include <linux/module.h> @@ -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 <linux/kmod.h> #include <linux/module.h> #include <linux/errno.h> 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 <linux/errno.h> #include <linux/if_ether.h> #include <linux/module.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605251203.u4PC3LC2009507>