aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4.h
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2012-01-11 12:02:17 -0500
committerRoland Dreier <roland@purestorage.com>2012-03-12 19:24:59 -0400
commit096335b3f9830b90d13aee77252cf6f5f12a258c (patch)
tree08d90d43ff9b4db64bc977210b67f2b05a3d15d9 /drivers/net/ethernet/mellanox/mlx4/mlx4.h
parenta9c766bb75ee2caad2735e41784387784ffd87db (diff)
mlx4_core: Allow dynamic MTU configuration for IB ports
Set the MTU for IB ports in the driver instead of using the firmware default of 2KB (the driver defaults to 4KB). Allow for dynamic mtu configuration through a new, per-port sysfs entry. Since there's a dependency between the port MTU and the max number of HW VLs the port can support, apply a mim/max approach, using a loop that goes down from the highest possible number of VLs to the lowest, using the firmware return status to know whether the requested number of VLs is possible with a given MTU. For now, as with the dynamic link type change / VPI support, the sysfs entry to change the mtu is exposed only when NOT running in SR-IOV mode. To allow changing the MTU for the master in SR-IOV mode, primary-function-initiated FLR (Function Level Reset) needs to be implemented. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index ac2d6061268d..1aa362181a09 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -686,6 +686,8 @@ struct mlx4_port_info {
686 char dev_name[16]; 686 char dev_name[16];
687 struct device_attribute port_attr; 687 struct device_attribute port_attr;
688 enum mlx4_port_type tmp_type; 688 enum mlx4_port_type tmp_type;
689 char dev_mtu_name[16];
690 struct device_attribute port_mtu_attr;
689 struct mlx4_mac_table mac_table; 691 struct mlx4_mac_table mac_table;
690 struct radix_tree_root mac_tree; 692 struct radix_tree_root mac_tree;
691 struct mlx4_vlan_table vlan_table; 693 struct mlx4_vlan_table vlan_table;