]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mlx4_core/ib: set the IB port MTU to 2K
authorSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 14 Oct 2016 23:47:49 +0000 (16:47 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 25 Oct 2016 07:39:49 +0000 (00:39 -0700)
'commit 096335b3f983 ("mlx4_core: Allow dynamic MTU configuration for IB
ports")' overwrite the default port MTU and sets it as 4K. Since this
directly impacts the HW VLs supported and Oracle workloads heavily uses
all supported 8 VLs for traffic classification, 2K default needs to
be kept as is.

We initilise it to default 2k so that the feature(dynamic MTU configuration)
is still available for non DB users to set the desired MTU value using sysctl.

Also for CX2 cards, commit  596c5ff4b7b3 ("net/mlx4: adjust initial
value of vl_cap in mlx4_SET_PORT") broke the vl_cap which made the
supported VLs to 4 irrespective of MTU size.

Orabug: 24946479

Tested-by: Pierre Orzechowski <pierre.e.orzechowski@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/port.c

index 95a754594ed0734c04ec591c56c631fe1afe54ea..b38a9a00481959fe51fccfdb8996d254b661cc3d 100644 (file)
@@ -2680,11 +2680,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
                                }
                        }
 
-                       if (mlx4_is_mfunc(dev))
-                               dev->caps.port_ib_mtu[port] = IB_MTU_2048;
-                       else
-                               dev->caps.port_ib_mtu[port] = IB_MTU_4096;
-
+                       dev->caps.port_ib_mtu[port] = IB_MTU_2048;
                        err = mlx4_SET_PORT(dev, port, mlx4_is_master(dev) ?
                                            dev->caps.pkey_table_len[port] : -1);
                        if (err) {
index f59f84e3c7fd5a8f62d62bc9b9e15342185d0f55..c2b21313dba7f64d0e51cff8ca3c601720a848ef 100644 (file)
@@ -930,15 +930,6 @@ enum {
        MLX4_CHANGE_PORT_MTU_CAP = 22,
 };
 
-#define        CX3_PPF_DEV_ID 0x1003
-static int vl_cap_start(struct mlx4_dev *dev)
-{
-       /* for non CX3 devices, start with 4 VLs to avoid errors in syslog */
-       if (dev->persist->pdev->device != CX3_PPF_DEV_ID)
-               return 4;
-       return 8;
-}
-
 int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port, int pkey_tbl_sz)
 {
        struct mlx4_cmd_mailbox *mailbox;
@@ -959,7 +950,7 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port, int pkey_tbl_sz)
        }
 
        /* IB VL CAP enum isn't used by the firmware, just numerical values */
-       for (vl_cap = vl_cap_start(dev); vl_cap >= 1; vl_cap >>= 1) {
+       for (vl_cap = 8; vl_cap >= 1; vl_cap >>= 1) {
                ((__be32 *) mailbox->buf)[0] = cpu_to_be32(
                        (1 << MLX4_CHANGE_PORT_MTU_CAP) |
                        (1 << MLX4_CHANGE_PORT_VL_CAP)  |