summaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/main.c
diff options
context:
space:
mode:
authorOr Gerlitz2011-10-16 10:26:21 +0200
committerRoland Dreier2011-10-31 20:00:15 +0100
commitcb29688aaa4caa4d54df2976118fe99a839bb433 (patch)
treee6bce5a3970bb1607f025262ba316e6175982862 /drivers/net/mlx4/main.c
parentIB/mlx4: Don't set VLAN in IBoE WQEs' control segment (diff)
downloadkernel-qcow2-linux-cb29688aaa4caa4d54df2976118fe99a839bb433.tar.gz
kernel-qcow2-linux-cb29688aaa4caa4d54df2976118fe99a839bb433.tar.xz
kernel-qcow2-linux-cb29688aaa4caa4d54df2976118fe99a839bb433.zip
mlx4_core: Deprecate log_num_vlan module param
Enable the maximum size (128) supported by the device for the shadow vlans table, ignoring the module parameter that overrides it. This table is only used by the IBoE control plane for setting a vlan index into an RC/UC QP context or UD Address Handle. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/net/mlx4/main.c')
-rw-r--r--drivers/net/mlx4/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index f0ee35df4dd7..0c0c7d95133b 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -96,6 +96,8 @@ MODULE_PARM_DESC(log_num_mac, "Log2 max number of MACs per ETH port (1-7)");
static int log_num_vlan;
module_param_named(log_num_vlan, log_num_vlan, int, 0444);
MODULE_PARM_DESC(log_num_vlan, "Log2 max number of VLANs per ETH port (0-7)");
+/* Log2 max number of VLANs per ETH port (0-7) */
+#define MLX4_LOG_NUM_VLANS 7
static int use_prio;
module_param_named(use_prio, use_prio, bool, 0444);
@@ -230,7 +232,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
dev->caps.max_gso_sz = dev_cap->max_gso_sz;
dev->caps.log_num_macs = log_num_mac;
- dev->caps.log_num_vlans = log_num_vlan;
+ dev->caps.log_num_vlans = MLX4_LOG_NUM_VLANS;
dev->caps.log_num_prios = use_prio ? 3 : 0;
for (i = 1; i <= dev->caps.num_ports; ++i) {
@@ -1489,10 +1491,9 @@ static int __init mlx4_verify_params(void)
return -1;
}
- if ((log_num_vlan < 0) || (log_num_vlan > 7)) {
- pr_warning("mlx4_core: bad num_vlan: %d\n", log_num_vlan);
- return -1;
- }
+ if (log_num_vlan != 0)
+ pr_warning("mlx4_core: log_num_vlan - obsolete module param, using %d\n",
+ MLX4_LOG_NUM_VLANS);
if ((log_mtts_per_seg < 1) || (log_mtts_per_seg > 7)) {
pr_warning("mlx4_core: bad log_mtts_per_seg: %d\n", log_mtts_per_seg);